-
Notifications
You must be signed in to change notification settings - Fork 250
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
feat(ssa): Post dominator tree #7595
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 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20
.
Benchmark suite | Current: 853a355 | Previous: 1fa0dd9 | Ratio |
---|---|---|---|
AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_blob |
51 s |
42 s |
1.21 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
…n to populate blocks in order
Description
Problem*
Resolves #7571
Summary*
This PR is mostly contained to tests as it will be the basis for further control dependence analysis.
Step 3 being necessary can be illustrated by the following example (
test_jmpif
underparser/tests.rs
):The RPO for the above function (following this PR's CFG updates) is [0, 2, 1]. This means during normalization b2 will map to b1. Trying to call the
assert_ssa_roundtrip
test method on this code will fail. This should not happen. In fact, having to update normalization to account for the new RPO exposed a greater error in our post-order calculation.On master the above program only works with the specified terminator. Switching b2 and b1,
jmpif v0 then: b1, else: b2
, will also fail to perform an SSA roundtrip. This discrepancy is due to the current post order computation using successors ordered as specified in the SSA. Specifying successors in an ordered set lets us more accurately test SSA as the ordering of terminator arguments no longer determines our resulting SSA. I have expandedtest_jmpif
to account for the above.Additional Context
The new
reverse
andwith_function_post_dom
methods are only used in tests. The#[cfg(test)]
attribute will be removed as these methods are used by later work.Documentation*
Check one:
PR Checklist*
cargo fmt
on default settings.