File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
lib/SILOptimizer/Transforms Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -597,6 +597,8 @@ static bool tryDominatorBasedSimplifications(
597
597
if (stripExpectIntrinsic (Op.get ()) == DominatingCondition) {
598
598
if (!EdgeValue)
599
599
EdgeValue = createValueForEdge (UserInst, DominatingTerminator, Idx);
600
+ LLVM_DEBUG (llvm::dbgs () << " replace dominated operand\n in "
601
+ << *UserInst << " with " << EdgeValue);
600
602
Op.set (EdgeValue);
601
603
Changed = true ;
602
604
}
@@ -1207,6 +1209,14 @@ bool SimplifyCFG::tryJumpThreading(BranchInst *BI) {
1207
1209
// / result in exposing opportunities for CFG simplification.
1208
1210
bool SimplifyCFG::simplifyBranchOperands (OperandValueArrayRef Operands) {
1209
1211
InstModCallbacks callbacks;
1212
+ #ifndef NDEBUG
1213
+ callbacks = callbacks.onDelete (
1214
+ [](SILInstruction *instToKill) {
1215
+ LLVM_DEBUG (llvm::dbgs () << " simplify and erase " << *instToKill);
1216
+ instToKill->eraseFromParent ();
1217
+ });
1218
+ #endif
1219
+
1210
1220
for (auto O = Operands.begin (), E = Operands.end (); O != E; ++O) {
1211
1221
// All of our interesting simplifications are on single-value instructions
1212
1222
// for now.
You can’t perform that action at this time.
0 commit comments