Skip to content

chore(ssa refactor): Fix inlining bug#1335

Merged
kevaundray merged 1 commit intomasterfrom
jf/ssa-inline-fix
May 11, 2023
Merged

chore(ssa refactor): Fix inlining bug#1335
kevaundray merged 1 commit intomasterfrom
jf/ssa-inline-fix

Conversation

@jfecher
Copy link
Copy Markdown
Contributor

@jfecher jfecher commented May 10, 2023

Related issue(s)

Resolves #

Description

Summary of changes

I found this bug while working on loop unrolling: we never call translate_value on function arguments before during inlining which could cause the functions to be called with the incorrect values. This wasn't obvious because ValueIds are only valid for the function they're created in, so the untranslated ones were being used outside of their function and were referring to different values than they were meant to.

Dependency additions / changes

Test additions / changes

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

@kevaundray kevaundray added this pull request to the merge queue May 11, 2023
Merged via the queue into master with commit f33a004 May 11, 2023
@kevaundray kevaundray deleted the jf/ssa-inline-fix branch May 11, 2023 21:31
TomAFrench added a commit that referenced this pull request May 17, 2023
* master: (66 commits)
  feat(nargo)!: retire print-acir in favour of flag (#1328)
  chore(ssa): enable cse for assert (#1350)
  chore(ssa refactor): Add basic instruction simplification (#1329)
  chore(noir): Release 0.6.0 (#1279)
  feat: enable to_radix for any field element (#1343)
  chore(ssa refactor): Simplify inlining pass and fix inlining failure (#1337)
  chore!: Update to acvm 0.11.0 (#1322)
  feat: Add ECDSA secp256k1 builtin test (#1294)
  chore: add support for encoding/decoding inputs from JSON (#1325)
  feat: Issue an error when attempting to use a `return` expression (#1330)
  chore(ssa refactor): Fix inlining bug (#1335)
  fix: to-bits and to-radix for > 128 bits (#1312)
  chore(parser): Parser error optimisation (#1292)
  chore(ssa refactor): Implement function inlining (#1293)
  chore: fix installation link in readme (#1326)
  chore: fix installation link in readme (#1326)
  feat(stdlib): Add keccak (#1249)
  fix: Parsing nested generics (#1319)
  chore(ssa refactor): Document some SSA-gen functions (#1321)
  fix: Assigning to tuple fields (#1318)
  ...
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