-
Notifications
You must be signed in to change notification settings - Fork 370
chore: Add mem2reg_simple pass #11033
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
base: master
Are you sure you want to change the base?
Conversation
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.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'ACVM Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: deca2cd | Previous: dbdfe6f | Ratio |
|---|---|---|---|
perfectly_parallel_batch_inversion_opcodes |
2790371 ns/iter (± 2019) |
2262655 ns/iter (± 1808) |
1.23 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
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.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 8a72a40 | Previous: 0db6c97 | Ratio |
|---|---|---|---|
test_report_zkpassport_noir-ecdsa_ |
2 s |
1 s |
2 |
test_report_zkpassport_noir_rsa_ |
1 s |
0 s |
+∞ |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
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.
⚠️ 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: 8a72a40 | Previous: 0db6c97 | Ratio |
|---|---|---|---|
rollup-tx-base-private |
27.72 s |
19.12 s |
1.45 |
rollup-tx-base-public |
131.8 s |
80.78 s |
1.63 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
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.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Execution Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: deca2cd | Previous: dbdfe6f | Ratio |
|---|---|---|---|
rollup-root |
0.005 s |
0.004 s |
1.25 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
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.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Opcode count'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.10.
| Benchmark suite | Current: 8a72a40 | Previous: 0db6c97 | Ratio |
|---|---|---|---|
rollup-tx-merge |
1504 opcodes |
1304 opcodes |
1.15 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
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.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Execution Memory'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 8a72a40 | Previous: 0db6c97 | Ratio |
|---|---|---|---|
rollup-checkpoint-root-single-block |
2140 MB |
1760 MB |
1.22 |
rollup-checkpoint-root |
2140 MB |
1760 MB |
1.22 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
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.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Brillig Execution Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 8a72a40 | Previous: 0db6c97 | Ratio |
|---|---|---|---|
rollup-tx-merge |
0.002 s |
0.001 s |
2 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
Description
Problem
Resolves #9838
Summary
Adds a new ssa pass mem2reg_simple based on https://bernsteinbear.com/assets/img/bebenita-ssa.pdf which itself is a summary of https://link.springer.com/content/pdf/10.1007/3-540-46423-9_8.pdf.
The algorithm is roughly:
Or, again but in more detail:
jmpifterminators.allocateinstruction which is only used in theaddressfield ofstoreorloadinstructions - e.g. the address itself is never used in a first-class manner. Note that this excludes any variable that may be aliased, used in an array, function, etc.4.a. the value of each parameter at the start of the block (which will always just be the block argument)
4.b. the value of each parameter at the end of the block (follow all the stores), optimizing out intermediate loads.
Additional Context
It turns out adding more block arguments to most blocks breaks a lot of things. Although by a lot of things it mostly just breaks unrolling in quite a few different ways. The process cfg mini pass also breaks unrolling's ability to identify all blocks in a loop, so that also had to be adjusted.
User Documentation
Check one:
PR Checklist
cargo fmton default settings.