Skip to content

Comments

chore(ssa): Replace JmpIf with BrIf#1193

Merged
jfecher merged 4 commits intomasterfrom
joss/brif
Apr 21, 2023
Merged

chore(ssa): Replace JmpIf with BrIf#1193
jfecher merged 4 commits intomasterfrom
joss/brif

Conversation

@joss-aztec
Copy link
Contributor

JmpIf isn't sufficient for encoding block arguments for the fall through successor. It is also more convenient if block terminator instructions describe all successors, such that we do not have to infer fall throughs from some block ordering.

Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.

Documentation needs

  • This PR requires documentation updates when merged.

Additional context

@joss-aztec joss-aztec requested a review from jfecher April 21, 2023 11:24
Co-authored-by: kevaundray <kevtheappdev@gmail.com>
@kevaundray
Copy link
Contributor

Just need to run cargo fmt as I did the suggestion from inside of Github web IDE

@kevaundray
Copy link
Contributor

Lets see if we can get #1114 as the only commit in the next release, by delaying this PR for roughly an hour

@jfecher
Copy link
Contributor

jfecher commented Apr 21, 2023

This PR looks more like what I had in mind with regard to having an explicit else destination without fallthrough. Can you elaborate on the naming though?

I suppose "jump if (cond)" is technically not right if we're always jumping and just changing where we jump based on the cond. Similarly though, "branch if (cond)" seems wrong as well for the same reason. Barring a single correct answer, I'd like to keep both the conditional jump and unconditional instructions with similar naming schemes. So either both Jmp or both Br currently.

Copy link
Contributor

@jfecher jfecher left a comment

Choose a reason for hiding this comment

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

Thanks 👍

@jfecher jfecher enabled auto-merge April 21, 2023 15:48
@jfecher jfecher added this pull request to the merge queue Apr 21, 2023
Merged via the queue into master with commit 7f8d2c2 Apr 21, 2023
@jfecher jfecher deleted the joss/brif branch April 21, 2023 16:31
TomAFrench added a commit that referenced this pull request Apr 24, 2023
* master:
  chore: update flake version to match current release (#1204)
  feat!: Switch to aztec_backend that uses upstream BB & UltraPlonk (#1114)
  chore(ssa refactor): Add Context structs and start ssa gen pass (#1196)
  chore(ssa): Replace JmpIf with BrIf (#1193)
  chore(noir): Release 0.4.1 (#1164)
  chore(ssa refactor): Add DenseMap and SparseMap types (#1184)
  feat: bump noir-source-resolver version (#1182)
  chore(deps): bump h2 from 0.3.16 to 0.3.18 (#1186)
  fix(nargo): restore `nargo codegen-verifier` functionality (#1185)
  chore: simplify setup code in `noir_integration` test (#1180)
  feat: Add Poseidon-BN254 hash functions (#1176)
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.

3 participants