Hahnfeld added a comment.

In https://reviews.llvm.org/D40275#930981, @tra wrote:

> In https://reviews.llvm.org/D40275#930948, @Hahnfeld wrote:
>
> > In https://reviews.llvm.org/D39505 @rjmccall requested that the check 
> > should be made independent of the language. To preserve this, I think the 
> > CUDA specific checks should be added to the generic case instead of 
> > restricting its evaluation.
>
>
> I'm not sure what exactly you or @rjmccall  have in mind. Specifically - what 
> is the 'generic case' CUDA checks should be added to? Could you give me an 
> example?


Not supporting VLAs is a property of the target we are compiling for, see newly 
added `Context.getTargetInfo().isVLASupported()`. So neither CUDA nor OpenMP 
are special cases in general, it's rather that the targeted architecture 
doesn't support that feature. What is a special case though is that both CUDA 
and OpenMP analyze the complete host code again and we need to suppress the 
diagnostic if the VLA is encountered in the host code that is never codegen'd 
for the device. For OpenMP, this special case is encoded in 
`shouldDiagnoseTargetSupportFromOpenMP` (a horrible name - suggestions 
welcome!) and I think you should add a similar check for CUDA.


https://reviews.llvm.org/D40275



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to