File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
lib/SILOptimizer/Transforms Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -744,7 +744,8 @@ bool DCE::removeDead() {
744
744
// We want to replace dead terminators with unconditional branches to
745
745
// the nearest post-dominator that has useful instructions.
746
746
if (auto *termInst = dyn_cast<TermInst>(Inst)) {
747
- SILBasicBlock *postDom = nearestUsefulPostDominator (Inst->getParent ());
747
+ SILBasicBlock *postDom =
748
+ nearestUsefulPostDominator (termInst->getParent ());
748
749
if (!postDom)
749
750
continue ;
750
751
@@ -754,12 +755,12 @@ bool DCE::removeDead() {
754
755
}
755
756
}
756
757
LLVM_DEBUG (llvm::dbgs () << " Replacing branch: " );
757
- LLVM_DEBUG (Inst ->dump ());
758
+ LLVM_DEBUG (termInst ->dump ());
758
759
LLVM_DEBUG (llvm::dbgs ()
759
760
<< " with jump to: BB" << postDom->getDebugID () << " \n " );
760
761
761
- replaceBranchWithJump (Inst , postDom);
762
- Inst ->eraseFromParent ();
762
+ replaceBranchWithJump (termInst , postDom);
763
+ termInst ->eraseFromParent ();
763
764
BranchesChanged = true ;
764
765
Changed = true ;
765
766
continue ;
You can’t perform that action at this time.
0 commit comments