[llvm] 7da3b5e - [InstCombine] Simplify DCE code; NFC

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 26 11:33:17 PST 2020


Author: Nikita Popov
Date: 2020-02-26T20:33:00+01:00
New Revision: 7da3b5e45c254c2366bd330fd4411f80011724ef

URL: https://github.com/llvm/llvm-project/commit/7da3b5e45c254c2366bd330fd4411f80011724ef
DIFF: https://github.com/llvm/llvm-project/commit/7da3b5e45c254c2366bd330fd4411f80011724ef.diff

LOG: [InstCombine] Simplify DCE code; NFC

As pointed out on D75008, MadeIRChange is already set by
eraseInstFromFunction(), which also already does a debug print.

Added: 
    

Modified: 
    llvm/lib/Transforms/InstCombine/InstructionCombining.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index d7df66d5a9f6..e25dfdef474d 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -3411,10 +3411,8 @@ bool InstCombiner::run() {
 
     // Check to see if we can DCE the instruction.
     if (isInstructionTriviallyDead(I, &TLI)) {
-      LLVM_DEBUG(dbgs() << "IC: DCE: " << *I << '\n');
       eraseInstFromFunction(*I);
       ++NumDeadInst;
-      MadeIRChange = true;
       continue;
     }
 


        


More information about the llvm-commits mailing list