[PATCH] D54011: [NFC][LICM] Factor out instruction erasing logic

Artur Pilipenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 1 17:13:18 PDT 2018


apilipenko accepted this revision.
apilipenko added a comment.
This revision is now accepted and ready to land.

With this change you seem to be invalidating AST for instructions which have not been previously invalidated.  I would hesitate to call this NFC.



================
Comment at: lib/Transforms/Scalar/LICM.cpp:483-485
         if (isInstructionTriviallyDead(&I, TLI)) {
-          CurAST->deleteValue(&I);
-          I.eraseFromParent();
+          eraseInstruction(I, CurAST);
         }
----------------
Remove { }


================
Comment at: lib/Transforms/Scalar/LICM.cpp:890
 
+void eraseInstruction(Instruction &I, AliasSetTracker *AST) {
+  if (AST)
----------------
static


https://reviews.llvm.org/D54011





More information about the llvm-commits mailing list