[PATCH] D75008: [InstCombine] DCE instructions earlier
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 26 05:32:24 PST 2020
spatel added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:3418
+ LLVM_DEBUG(dbgs() << "IC: DCE: " << *I << '\n');
+ eraseInstFromFunction(*I);
+ ++NumDeadInst;
----------------
Seems like we already have redundant lines between this and what is included within "eraseInstFromFunction()". Can we:
1. Remove the debug print.
2. Remove the set of MadeIRChange.
That could be a preliminary NFC cleanup for the existing call below this block too?
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:3682-3687
+ ++NumDeadInst;
+ LLVM_DEBUG(dbgs() << "IC: DCE: " << *Inst << '\n');
+ salvageDebugInfoOrMarkUndef(*Inst);
+ Inst->eraseFromParent();
+ MadeIRChange = true;
+ continue;
----------------
eraseInstFromFunction(*Inst) ?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75008/new/
https://reviews.llvm.org/D75008
More information about the llvm-commits
mailing list