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 8af76de commit ee9d309Copy full SHA for ee9d309
lib/SILOptimizer/Transforms/SILMem2Reg.cpp
@@ -666,6 +666,11 @@ StoreInst *StackAllocationPromoter::promoteAllocationInBlock(
666
runningVals = beginLexicalLifetimeAfterStore(asi, si);
667
// Create a use of the newly created copy in order to keep phi pruning
668
// from deleting our lifetime beginning instructions.
669
+ //
670
+ // TODO: Remove this hack, it is only necessary because erasePhiArgument
671
+ // calls deleteEdgeValue which calls
672
+ // deleteTriviallyDeadOperandsOfDeadArgument and deletes the copy
673
+ // and borrow that we added and want not to have deleted.
674
SILBuilderWithScope::insertAfter(
675
runningVals->value.copy->getDefiningInstruction(),
676
[&](auto builder) {
0 commit comments