Skip to content

[SOL] Run simplifyswitch pass for SBF #153

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

Merged

Conversation

LucasSte
Copy link
Collaborator

@LucasSte LucasSte commented Jun 6, 2025

Problem

Up until now, the simplify switch pass had been disabled for SBF, so we were generating long sequences of jeqs for a Rust match statement.

Solution

Enable the generation of lookup tables for SBF, which simplifies switch-like statements.

PS: Relative lookup tables do not work in SBF yet.

@LucasSte LucasSte requested a review from Lichtso June 6, 2025 20:57
@LucasSte LucasSte marked this pull request as ready for review June 6, 2025 20:57
@LucasSte LucasSte merged commit 04d1c6c into anza-xyz:solana-rustc/19.1-2024-12-03 Jun 9, 2025
18 checks passed
@LucasSte LucasSte deleted the patch-switch branch June 9, 2025 13:36
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.

2 participants