[llvm] [Attributor] Support SPIR-V address spaces (PR #192725)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 22 21:47:38 PDT 2026
================
@@ -873,17 +943,26 @@ bool AA::isAssumedThreadLocalObject(Attributor &A, Value &Obj,
}
if (A.getInfoCache().targetIsGPU()) {
- if (Obj.getType()->getPointerAddressSpace() ==
- (int)AA::GPUAddressSpace::Local) {
- LLVM_DEBUG(dbgs() << "[AA] Object '" << Obj
- << "' is thread local; GPU local memory\n");
- return true;
- }
- if (Obj.getType()->getPointerAddressSpace() ==
- (int)AA::GPUAddressSpace::Constant) {
- LLVM_DEBUG(dbgs() << "[AA] Object '" << Obj
- << "' is thread local; GPU constant memory\n");
- return true;
+ const Module *M = nullptr;
----------------
shiltian wrote:
I'm quite surprised that the attributor itself doesn't have a reference to the module. Maybe we can add one such that it doesn't have to go through this not-elegant approach?
https://github.com/llvm/llvm-project/pull/192725
More information about the llvm-commits
mailing list