[PATCH] D68852: [Attributor] Pointer privatization attribute (argument promotion)

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 18:45:12 PST 2019


efriedma added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:4697
+    } else {
+      ReplacementValues.push_back(new LoadInst(PrivType, Base, "", IP));
+    }
----------------
No alignment set on loads?


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:4732
+          auto *AI = new AllocaInst(PrivatizableType.getValue(), 0,
+                                    Arg->getName() + ".priv", IP);
+          createInitialization(PrivatizableType.getValue(), *AI, ReplacementFn,
----------------
No alignment set on alloca?


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:4796
+    if (auto *AI = dyn_cast<AllocaInst>(Obj))
+      if (auto *CI = dyn_cast<ConstantInt>(AI->getArraySize()))
+        if (CI->isOne())
----------------
isArrayAllocation()


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68852/new/

https://reviews.llvm.org/D68852





More information about the llvm-commits mailing list