tra added a comment.

Using OpenCL's flag for the purpose adds a *third* way we handle denormals 
flushing in clang. Now it would be HIP (which is CUDA-like) using OpenCL's flag 
for denormals instead of CUDA's one.
You could change AMDGPUTargetInfo::adjustTargetOptions() to use 
CGOpts.getLangOpts().CUDADeviceFlushDenormalsToZero instead. That would at 
least make HIP and CUDA do the same thing.

I think it would work better if we could coalesce 
CUDADeviceFlushDenormalsToZero and CodeGenOpts.FlushDenorm and, maybe move the 
flag to LangOpts , so we could use LangOpts.CUDAIsDevice.


https://reviews.llvm.org/D48287



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

Reply via email to