[PATCH] D130096: [Clang][AMDGPU] Emit AMDGPU library control constants in clang
Matt Arsenault via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 26 15:04:44 PDT 2023
arsenm added inline comments.
================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:9461-9463
+ bool CorrectSqrt = CGM.getLangOpts().OpenCL
+ ? CGM.getCodeGenOpts().OpenCLCorrectlyRoundedDivSqrt
+ : CGM.getCodeGenOpts().HIPCorrectlyRoundedDivSqrt;
----------------
Can we move this into something more proper in LangOpts?
================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:9467
+ AddGlobal("__oclc_daz_opt", DenormAreZero, /*Size=*/8);
+ AddGlobal("__oclc_finite_only_opt", FiniteOnly || RelaxedMath, /*Size=*/8);
+ AddGlobal("__oclc_unsafe_math_opt", UnsafeMath || RelaxedMath, /*Size=*/8);
----------------
I'd hope you don't have to check relaxed math, finite only should suffice
================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:9476
+ llvm::GlobalValue::LinkOnceODRLinkage);
+ AddGlobal("__oclc_ABI_version",
+ CGM.getTarget().getTargetOpts().CodeObjectVersion, /*Size=*/32,
----------------
This should probably get an __llvm_amdgcn prefix and be renamed
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130096/new/
https://reviews.llvm.org/D130096
More information about the cfe-commits
mailing list