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() {
747747 // We want to replace dead terminators with unconditional branches to
748748 // the nearest post-dominator that has useful instructions.
749749 if (auto *termInst = dyn_cast<TermInst>(Inst)) {
750- SILBasicBlock *postDom = nearestUsefulPostDominator (Inst->getParent ());
750+ SILBasicBlock *postDom =
751+ nearestUsefulPostDominator (termInst->getParent ());
751752 if (!postDom)
752753 continue ;
753754
@@ -757,12 +758,12 @@ bool DCE::removeDead() {
757758 }
758759 }
759760 LLVM_DEBUG (llvm::dbgs () << " Replacing branch: " );
760- LLVM_DEBUG (Inst ->dump ());
761+ LLVM_DEBUG (termInst ->dump ());
761762 LLVM_DEBUG (llvm::dbgs ()
762763 << " with jump to: BB" << postDom->getDebugID () << " \n " );
763764
764- replaceBranchWithJump (Inst , postDom);
765- Inst ->eraseFromParent ();
765+ replaceBranchWithJump (termInst , postDom);
766+ termInst ->eraseFromParent ();
766767 BranchesChanged = true ;
767768 Changed = true ;
768769 continue ;
You can’t perform that action at this time.
0 commit comments