[PATCH] D91121: [InferAddrSpace] Teach to handle assumed address space.
Michael Liao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 12 12:18:12 PST 2020
hliao added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:540
+ const auto *Ptr = LD->getPointerOperand();
+ if (Ptr->getType()->getPointerAddressSpace() != AMDGPUAS::CONSTANT_ADDRESS)
+ return None;
----------------
arsenm wrote:
> I think this may be too aggressive and should check if it's specifically a kernel argument load. Contant address space should also not be necessary
If the variable locates in `__constant__` memory, it could only be modified on the host side. It's safe to assume any generic pointer loaded from `__constant__` memory is a global one.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91121/new/
https://reviews.llvm.org/D91121
More information about the llvm-commits
mailing list