Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[compiler] Maintain RPO and unique instruction ids when constructing …
…scope terminals Later passes may rely on HIR invariants such as blocks being in RPO or instructions having unique, ascending InstructionIds. However, BuildReactiveScopeTerminalsHIR doesn't currently gurantee this. This PR updates that pass to first restore RPO, fixup predecessors (the previous logic tried to do this but failed on unreachable blocks, where `markPredecessors()` handles that case), and renumber instructions. Then it walks instructions and scopes to update identifier and scope ranges given the new instruction ids. ghstack-source-id: 2a99df02ac9d125b202cae369e2dc4dccefb0625 Pull Request resolved: facebook#30399
- Loading branch information