[PATCH] D27939: [LICM] Report failing to hoist a load with an invariant address

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 8 12:49:03 PST 2017


hfinkel added inline comments.


================
Comment at: lib/Transforms/Scalar/LICM.cpp:477
+        pointerInvalidatedByLoop(LI->getOperand(0), Size, AAInfo, CurAST);
+    if (ORE && Invalidated && CurLoop->isLoopInvariant(LI->getPointerOperand()))
+      ORE->emit(OptimizationRemarkMissed(
----------------
Can we hoist a load without a loop-invariant address? It seems like we shouldn't be making aliasing queries for loads we can't possibly hoist, and so I don't understand why we specifically need the `CurLoop->isLoopInvariant` check here.


https://reviews.llvm.org/D27939





More information about the llvm-commits mailing list