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 @@ -747,7 +747,8 @@ bool DCE::removeDead() {
747
747
// We want to replace dead terminators with unconditional branches to
748
748
// the nearest post-dominator that has useful instructions.
749
749
if (auto *termInst = dyn_cast<TermInst>(Inst)) {
750
- SILBasicBlock *postDom = nearestUsefulPostDominator (Inst->getParent ());
750
+ SILBasicBlock *postDom =
751
+ nearestUsefulPostDominator (termInst->getParent ());
751
752
if (!postDom)
752
753
continue ;
753
754
@@ -757,12 +758,12 @@ bool DCE::removeDead() {
757
758
}
758
759
}
759
760
LLVM_DEBUG (llvm::dbgs () << " Replacing branch: " );
760
- LLVM_DEBUG (Inst ->dump ());
761
+ LLVM_DEBUG (termInst ->dump ());
761
762
LLVM_DEBUG (llvm::dbgs ()
762
763
<< " with jump to: BB" << postDom->getDebugID () << " \n " );
763
764
764
- replaceBranchWithJump (Inst , postDom);
765
- Inst ->eraseFromParent ();
765
+ replaceBranchWithJump (termInst , postDom);
766
+ termInst ->eraseFromParent ();
766
767
BranchesChanged = true ;
767
768
Changed = true ;
768
769
continue ;
You can’t perform that action at this time.
0 commit comments