[llvm] [NVPTX][NVPTXLowerArgs] Add NewPM interface for NVPTXLowerArgs (PR #128960)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 27 14:28:30 PST 2025
================
@@ -641,7 +629,11 @@ void NVPTXLowerArgs::handleByValParam(const NVPTXTargetMachine &TM,
copyByValParam(*Func, *Arg);
}
-void NVPTXLowerArgs::markPointerAsGlobal(Value *Ptr) {
+// Knowing Ptr must point to the global address space, this function
+// addrspacecasts Ptr to global and then back to generic. This allows
+// NVPTXInferAddressSpaces to fold the global-to-generic cast into
+// loads/stores that appear later.
----------------
Artem-B wrote:
This could use some editing. E.g.
```
If generic `Ptr` is known to point to global memory, add ASC to global AS and back to generic.
It will allow us to lower load/store operations on it via `{ld,st}.global`
```
https://github.com/llvm/llvm-project/pull/128960
More information about the llvm-commits
mailing list