[PATCH] D50377: [LICM] Use ICFLoopSafetyInfo in LICM

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 1 02:47:22 PDT 2018


mkazantsev added inline comments.


================
Comment at: lib/Transforms/Scalar/LICM.cpp:407-409
+        SafetyInfo->dropCachedInfo(I.getParent());
         CurAST->deleteValue(&I);
         I.eraseFromParent();
----------------
apilipenko wrote:
> I'd suggest introducing a helper for removing the instruction. We need to do some invalidation every time an instruction is removed. Having a helper would help to avoid missing invalidation in new code.
We don't always do invalidation by eraseFromParent. There are cases when we move instructions, insert instructions or call `run` on promoter.


https://reviews.llvm.org/D50377





More information about the llvm-commits mailing list