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.
2 parents 6e05240 + c63a1c0 commit 45e210bCopy full SHA for 45e210b
lib/SILOptimizer/Transforms/DeadCodeElimination.cpp
@@ -551,13 +551,12 @@ bool DCE::removeDead(SILFunction &F) {
551
// This is not necessary in non-OSSA, and will infact be incorrect.
552
// Because, passing a value as a phi argument does not imply end of
553
// lifetime in non-OSSA.
554
- BB.eraseArgument(i);
555
for (auto *pred : BB.getPredecessorBlocks()) {
556
auto *predTerm = pred->getTerminator();
557
auto predArg = predTerm->getAllOperands()[i].get();
558
endLifetimeOfLiveValue(predArg, predTerm);
559
- deleteEdgeValue(pred->getTerminator(), &BB, i);
560
}
+ erasePhiArgument(&BB, i);
561
Changed = true;
562
BranchesChanged = true;
563
0 commit comments