[PATCH] D48287: [HIP] Support -fcuda-flush-denormals-to-zero for amdgcn
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 20 13:35:59 PDT 2018
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
More information about the cfe-commits
mailing list