[PATCH] D91121: [InferAddrSpace] Teach to handle assumed address space.

Michael Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 14:24:11 PST 2020


hliao added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp:483
+    // Skip values with an assumed address space.
+    if (TTI->getAssumedAddrSpace(TopVal) == UninitializedAddressSpace) {
+      for (Value *PtrOperand : getPointerOperands(*TopVal, *DL, TTI)) {
----------------
arsenm wrote:
> Checking this here looks strange, since it is also catching values that weren't processed as assumed address space
It stops tracking through instructions generating pointers with assumed AS. It's not necessary to check their operands as the result is assumed. For instructions without assumed AS results, we need to track them through their operands.


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