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

Artur Pilipenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 2 16:22:40 PDT 2018


apilipenko accepted this revision.
apilipenko added inline comments.


================
Comment at: lib/Transforms/Scalar/LICM.cpp:514
         ReciprocalDivisor->setFastMathFlags(I.getFastMathFlags());
+        SafetyInfo->insertInstructionTo(I.getParent());
         ReciprocalDivisor->insertBefore(&I);
----------------
I think we can invalidate once. 

I know, in previous comments I was asking to move the complexity of the decision making whether the invalidation needed or not to the implementation of  the SafetyInfo, but calling invalidation two times in a row is simple enough to fix in the caller.


https://reviews.llvm.org/D50377





More information about the llvm-commits mailing list