swift
5dbd34d0 - [semantic-arc] Prevent future pointer invalidation issues in the OwnedToGuaranteedPhiOp transform.

Commit
5 years ago
[semantic-arc] Prevent future pointer invalidation issues in the OwnedToGuaranteedPhiOp transform. The specific problem here is that I am going to be adding some code to SemanticARCOpts that eliminates reborrows and may need to create new phi arguments and thus add arguments to edges. The weird thing about this is that doing so actually requires us to create a new terminator! This means that subtle pointer invalidation issues can occur here. To work around that we store our terminators as SILBasicBlock, operand number since we can always immediately find a terminator from its basic block. If we do not have a terminator, we keep on just storing the SILInstruction itself. NOTE: This only saves us from additive changes. Deletions are still an issue.
Author
Committer
Parents
Loading