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

fix(experimental): Fix execution of match expressions with multiple branches #7570

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jfecher
Copy link
Contributor

@jfecher jfecher commented Mar 3, 2025

Description

Problem*

Resolves #7323

Summary*

Our SSA flattening pass still doesn't support > 2 predecessors on a block so lower a match by jumping to a new block each time instead. Each end block is merged LIFO like nested if statements. This is less efficient than jumping to the end directly or merging the blocks tournament-bracket style but flattening supports neither of those options.

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@jfecher jfecher requested a review from a team March 3, 2025 21:02
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Compilation Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 32934cb Previous: 899e8c8 Ratio
rollup-block-root-single-tx 123 s 101 s 1.22

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Match expressions panic during SSA flattening if they're on a runtime value with > 2 branches
1 participant