-
Notifications
You must be signed in to change notification settings - Fork 204
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: Implement handling of array aliasing in the mem2reg optimization pass #2463
Conversation
Co-authored-by: Maxim Vezenov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor questions about TODOs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Is this issue (#2221) resolved after this PR?
@vezenovm, unfortunately not, looks like it needs the constant folding change as well |
* master: (42 commits) fix(ssa): Handle right shift with constants (#2481) chore(noir): Release 0.10.4 (#2354) fix: Divide by zero should fail to satisfy constraints for `Field` and ints (#2475) fix(ssa): Remove padding from ToRadix call with constant inputs (#2479) fix: Implement handling of array aliasing in the mem2reg optimization pass (#2463) chore: resolve `Instruction` inputs fully before checking against cache (#2472) chore: Move independent `run_test` function into nargo core (#2468) feat: Standard library functions can now be called with closure args (#2471) feat(frontend): aztec syntactic sugar (feature flagged) (#2403) chore(ci): enforce compliance with `cargo fmt` (#2467) chore(ci): Allow releases to have additional feature flags (#2405) feat: Add `assert_eq` keyword (#2137) fix(ssa): Do not optimize for allocates in constant folding (#2466) feat(ssa): Reuse existing results for duplicated instructions with no side-effects (#2460) fix: Closure lvalue capture bugfix (#2457) feat: Syntax for environment types now works with generics (#2383) fix(parser): fixes for the parsing of 'where' clauses (#2430) fix: Run `wasm` nodejs tests with no fails (#2387) chore: Run `cargo fmt` (#2455) chore: Perform formatting changes to integration tests (#2448) ...
* master: (42 commits) fix(ssa): Handle right shift with constants (#2481) chore(noir): Release 0.10.4 (#2354) fix: Divide by zero should fail to satisfy constraints for `Field` and ints (#2475) fix(ssa): Remove padding from ToRadix call with constant inputs (#2479) fix: Implement handling of array aliasing in the mem2reg optimization pass (#2463) chore: resolve `Instruction` inputs fully before checking against cache (#2472) chore: Move independent `run_test` function into nargo core (#2468) feat: Standard library functions can now be called with closure args (#2471) feat(frontend): aztec syntactic sugar (feature flagged) (#2403) chore(ci): enforce compliance with `cargo fmt` (#2467) chore(ci): Allow releases to have additional feature flags (#2405) feat: Add `assert_eq` keyword (#2137) fix(ssa): Do not optimize for allocates in constant folding (#2466) feat(ssa): Reuse existing results for duplicated instructions with no side-effects (#2460) fix: Closure lvalue capture bugfix (#2457) feat: Syntax for environment types now works with generics (#2383) fix(parser): fixes for the parsing of 'where' clauses (#2430) fix: Run `wasm` nodejs tests with no fails (#2387) chore: Run `cargo fmt` (#2455) chore: Perform formatting changes to integration tests (#2448) ...
Description
Problem*
Resolves #2431
Summary*
This is the first of two PRs containing updates to the mem2reg pass. This one expands it to handle array aliasing (primitively - individual elements are not tracked). The next PR implements constant folding within mem2reg and contains the main regression test case which requires both PRs to pass. I've elected to split up the PRs so that the functionality split is a bit clearer and there is less code to review.
Documentation
This PR requires documentation updates when merged.
Additional Context
PR Checklist*
cargo fmt
on default settings.