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() {
744744 // We want to replace dead terminators with unconditional branches to
745745 // the nearest post-dominator that has useful instructions.
746746 if (auto *termInst = dyn_cast<TermInst>(Inst)) {
747- SILBasicBlock *postDom = nearestUsefulPostDominator (Inst->getParent ());
747+ SILBasicBlock *postDom =
748+ nearestUsefulPostDominator (termInst->getParent ());
748749 if (!postDom)
749750 continue ;
750751
@@ -754,12 +755,12 @@ bool DCE::removeDead() {
754755 }
755756 }
756757 LLVM_DEBUG (llvm::dbgs () << " Replacing branch: " );
757- LLVM_DEBUG (Inst ->dump ());
758+ LLVM_DEBUG (termInst ->dump ());
758759 LLVM_DEBUG (llvm::dbgs ()
759760 << " with jump to: BB" << postDom->getDebugID () << " \n " );
760761
761- replaceBranchWithJump (Inst , postDom);
762- Inst ->eraseFromParent ();
762+ replaceBranchWithJump (termInst , postDom);
763+ termInst ->eraseFromParent ();
763764 BranchesChanged = true ;
764765 Changed = true ;
765766 continue ;
You can’t perform that action at this time.
0 commit comments