[PATCH] D28834: Improve what can be promoted in LICM.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 13:29:06 PST 2017


efriedma added inline comments.


================
Comment at: lib/Transforms/Scalar/LICM.cpp:1026
+    // can not be captured.
+    if (isAllocLikeFn(Object, TLI)) {
+      if (PointerMayBeCaptured(Object, true, true))
----------------
Maybe reorganize this so you don't call isAllocLikeFn twice?


================
Comment at: lib/Transforms/Scalar/LICM.cpp:1136
+    // alloc-like calls.
+    if (isAllocLikeFn(Object, TLI) && AllocFnCaptureStatus.hasValue())
+      SafeToInsertStore = !*AllocFnCaptureStatus;
----------------
I don't think you need to check isAllocLikeFn here.


https://reviews.llvm.org/D28834





More information about the llvm-commits mailing list