We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ef7b2a commit c63a1c0Copy full SHA for c63a1c0
lib/SILOptimizer/Transforms/DeadCodeElimination.cpp
@@ -552,13 +552,12 @@ bool DCE::removeDead(SILFunction &F) {
552
// This is not necessary in non-OSSA, and will infact be incorrect.
553
// Because, passing a value as a phi argument does not imply end of
554
// lifetime in non-OSSA.
555
- BB.eraseArgument(i);
556
for (auto *pred : BB.getPredecessorBlocks()) {
557
auto *predTerm = pred->getTerminator();
558
auto predArg = predTerm->getAllOperands()[i].get();
559
endLifetimeOfLiveValue(predArg, predTerm);
560
- deleteEdgeValue(pred->getTerminator(), &BB, i);
561
}
+ erasePhiArgument(&BB, i);
562
Changed = true;
563
BranchesChanged = true;
564
0 commit comments