[clang] [Clang][OpenCL] Mark scalar loads from constant address space invariant (PR #218356)
Keshav Vinayak Jha via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 8 21:12:26 PST 2026
================
@@ -6355,6 +6355,14 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) {
return getTargetCodeGenInfo().getGlobalVarAddressSpace(*this, D);
}
+bool CodeGenModule::isGlobalVarInvariant(const VarDecl *D) {
+ // Only OpenCL and CUDA device globals are handled here. On other targets,
+ // GetGlobalVarAddressSpace can emit duplicate declaration diagnostics.
----------------
keshavvinayak01 wrote:
Yeah.. the workaround is gone so it's fine now.
https://github.com/llvm/llvm-project/pull/218356
More information about the cfe-commits
mailing list