[llvm] [NVPTX][InferAS] assume alloca instructions are in local AS (PR #121710)

Alex MacLean via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 12:14:56 PST 2025


================
@@ -562,4 +563,11 @@ Value *NVPTXTTIImpl::rewriteIntrinsicWithAddressSpace(IntrinsicInst *II,
   }
   }
   return nullptr;
-}
\ No newline at end of file
+}
+
+unsigned NVPTXTTIImpl::getAssumedAddrSpace(const Value *V) const {
+  if (isa<AllocaInst>(V))
+    return ADDRESS_SPACE_LOCAL;
+
----------------
AlexMaclean wrote:

Ping @Artem-B / @arsenm for any further thoughts on the feasibility of switching allocas to the local addrspace and whether this change is acceptable as a complimentary/intermediate-term solution. 

https://github.com/llvm/llvm-project/pull/121710


More information about the llvm-commits mailing list