swift
7574c1fe - Fix AccessUtils Value.referenceRoot to handle ForwardingInstructions.

Commit
2 years ago
Fix AccessUtils Value.referenceRoot to handle ForwardingInstructions. This fixes all analyses that use AccessUtils in the presence of new forwarding instructions. This is also needed for consistency with the C++ source base. And for general sanity. Utilities that walk the use-def chain should never hard-code a list of opcodes that happened to work with some specific pass. Passes should never assume that a basic SIL utility handles specific SIL operations a certain way. Instead, the utility needs to be defined in terms of SIL semantics. In this case, the utility is supposed to handle all instructions that semantically forward ownership of a reference.
Author
Committer
Parents
Loading