Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[compiler] Maintain RPO and unique instruction ids when constructing scope terminals #30399

Merged
merged 5 commits into from
Jul 24, 2024

Commits on Jul 19, 2024

  1. [compiler] Maintain RPO and uniquely instruction ids when constructin…

    …g 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-poisoned]
    josephsavona committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    1af828e View commit details
    Browse the repository at this point in the history
  2. Update on "[compiler] Maintain RPO and uniquely 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-poisoned]
    josephsavona committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    346eefb View commit details
    Browse the repository at this point in the history
  3. Update on "[compiler] Maintain RPO and uniquely 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-poisoned]
    josephsavona committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    4059ee3 View commit details
    Browse the repository at this point in the history
  4. Update on "[compiler] Maintain RPO and unique instruction ids when co…

    …nstructing 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-poisoned]
    josephsavona committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    45e889b View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2024

  1. rebase on "[compiler] Maintain RPO and unique instruction ids when co…

    …nstructing 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-poisoned]
    josephsavona committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    9983ccf View commit details
    Browse the repository at this point in the history