Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
5eee680
fix(ssa): do not fold ArraySet to MakeArray in simplifier
TomAFrench Feb 23, 2026
a159ce3
chore(ssa): add defensive test for array_get through predicated array…
TomAFrench Feb 23, 2026
0298f55
chore: update test name to match new functionality
TomAFrench Feb 23, 2026
9081cf0
fix(ssa): only skip ArraySet-to-MakeArray folding for ACIR functions
TomAFrench Feb 23, 2026
44810e2
refactor(ssa): move ArraySet-to-MakeArray folding from simplifier to …
TomAFrench Feb 24, 2026
e984fa4
Merge branch 'master' into tf/fix-array-set-predicate-simplification
TomAFrench Feb 24, 2026
063c52a
Merge branch 'master' into tf/fix-array-set-predicate-simplification
TomAFrench Feb 24, 2026
e65ba20
chore: restore array_set
TomAFrench Feb 24, 2026
10b9259
chore: fix test names and comments in array_set_optimization
TomAFrench Feb 24, 2026
0e923b9
chore: remove dead tests
TomAFrench Feb 24, 2026
f1f168a
whitespace
TomAFrench Feb 24, 2026
e2bba3b
chore: add extra mem2reg
TomAFrench Feb 24, 2026
9bc7f5c
update snapshot
TomAFrench Feb 24, 2026
90ed407
Apply the optimization if both instructions are under the same predicate
asterite Feb 27, 2026
9533e8a
Can also fold if array_set is unconditional
asterite Feb 27, 2026
80c1032
Do a similar thing with array_get
asterite Feb 27, 2026
d8463ac
Remove unnecessary condition when simplifying vector_push_back
asterite Feb 27, 2026
c3e3749
Make array predicate might not be there
asterite Feb 27, 2026
32d16f9
Move check inside function
asterite Feb 27, 2026
7f735dc
Apply changes from #11717
asterite Feb 27, 2026
e6f433f
Fix snapshot
asterite Feb 27, 2026
29af7df
Optimize turned off array_set
asterite Feb 27, 2026
deb5944
Keep track of predicates of just inserted make_array
asterite Feb 27, 2026
afb42e6
Move optimization after inlining
asterite Feb 27, 2026
f216077
Update compiler/noirc_evaluator/src/ssa/opt/array_set.rs
asterite Mar 3, 2026
bac948b
Better test
asterite Mar 3, 2026
071c4d1
Remove wrong comment
asterite Mar 3, 2026
2e6e5a2
Merge branch 'master' into tf/fix-array-set-predicate-simplification
asterite Mar 3, 2026
770555f
Add a regression test to start tracking the opcode count of this use …
aakoshh Mar 4, 2026
a012f4a
Add a test to remove_if_else to show a potential optimization
asterite Mar 4, 2026
396508f
Fix test
asterite Mar 4, 2026
b035541
Fix test again
asterite Mar 4, 2026
7e4d584
chore: array_set_to_make_array
asterite Mar 4, 2026
0772b7e
Remove unnecessary test
asterite Mar 4, 2026
c407060
Don't track dependencies through if-else
asterite Mar 5, 2026
1e5f187
Also check the else value
asterite Mar 5, 2026
81910f2
Handle `Instruction::IfElse` separately
asterite Mar 5, 2026
c865890
fix(ssa): Use the `ValueMerger` on the element instead of keeping `Ar…
aakoshh Mar 5, 2026
d2dce6a
Cleanup
asterite Mar 5, 2026
53a8dfd
Fix doc comments
asterite Mar 5, 2026
c18c5bf
Merge branch 'tf/fix-array-set-predicate-simplification' of github.co…
asterite Mar 5, 2026
73b985a
Merge branch 'tf/fix-array-set-predicate-simplification' into ab/ab/a…
asterite Mar 5, 2026
f92d236
Fix docs again
asterite Mar 5, 2026
2bcf3bb
Merge origin/master into tf/fix-array-set-predicate-simplification
TomAFrench Mar 5, 2026
5630dff
Merge branch 'tf/fix-array-set-predicate-simplification' into ab/ab/a…
asterite Mar 5, 2026
a06c850
Merge branch 'master' into tf/fix-array-set-predicate-simplification
asterite Mar 5, 2026
ce6269f
Remove unrelated changes
asterite Mar 5, 2026
7730346
Merge branch 'tf/fix-array-set-predicate-simplification' into ab/ab/a…
asterite Mar 5, 2026
44e5b1d
Merge branch 'master' into tf/fix-array-set-predicate-simplification
asterite Mar 5, 2026
b5ec837
Merge branch 'tf/fix-array-set-predicate-simplification' into ab/ab/a…
asterite Mar 5, 2026
a3aaf49
Remove disqualified entries immediately instead of at the end
asterite Mar 5, 2026
4bd8c09
Apply suggestions from code review
asterite Mar 6, 2026
3577629
Merge branch 'master' into ab/ab/array_set_to_make_array
TomAFrench Mar 6, 2026
deee74c
Fixes
asterite Mar 6, 2026
15828f6
Use `union`
asterite Mar 6, 2026
9dd12d5
Rename to `array_set_window_optimization`
asterite Mar 6, 2026
9889632
Do check once
asterite Mar 6, 2026
a8b7fc6
Use clone once more
asterite Mar 6, 2026
ab88808
Merge branch 'master' into ab/ab/array_set_to_make_array
asterite Mar 6, 2026
05685a7
Don't track dependencies if there are no results
asterite Mar 6, 2026
ff29006
Add another test
asterite Mar 6, 2026
8b9172d
Rename SSA label
asterite Mar 6, 2026
2aeebc8
Yet another clone
asterite Mar 6, 2026
f060c8b
Move optimization up a bit
asterite Mar 6, 2026
f71cc6f
Move it upwards
asterite Mar 6, 2026
041ddca
Run it right after flattening
asterite Mar 6, 2026
571a4d8
Try to reuse array constant
asterite Mar 6, 2026
e9966c1
Remove a test that's too long
asterite Mar 6, 2026
b598578
Check escaping values in enable_side_effects
asterite Mar 6, 2026
27ccbd9
Don't set array_set as a dependency of itself
asterite Mar 6, 2026
028cd98
Move check regarding values escaping via references upwards
asterite Mar 6, 2026
83eb308
Merge branch 'master' into ab/ab/array_set_to_make_array
asterite Mar 6, 2026
6f03aed
Only run the optimization on "small" arrays
asterite Mar 9, 2026
d3455e5
Mention a possible follow-up optimization
asterite Mar 9, 2026
c72a3ae
Merge branch 'master' into ab/ab/array_set_to_make_array
asterite Mar 9, 2026
af8bfbd
Considers two windows to be the same if they are under the same predi…
asterite Mar 9, 2026
f70016d
Fix docs
asterite Mar 9, 2026
fa0018e
Candidates are only those eventually used in an IfElse instruction
asterite Mar 9, 2026
450477a
Update compiler/noirc_evaluator/src/ssa/opt/array_set_window_optimiza…
asterite Mar 10, 2026
f64a902
Apply suggestions from code review
TomAFrench Mar 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compiler/noirc_evaluator/src/ssa/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ pub fn primary_passes(options: &SsaEvaluatorOptions) -> Vec<SsaPass<'_>> {
SsaPass::new(Ssa::expand_signed_math, "Expand signed math"),
SsaPass::new(Ssa::simplify_cfg, "Simplifying"),
SsaPass::new(Ssa::flatten_cfg, "Flattening"),
SsaPass::new(Ssa::array_set_window_optimization, "ArraySet Window optimization"),
// Run mem2reg once more with the flattened CFG to catch any remaining loads/stores,
// then try to free memory before inlining, which involves copying a instructions.
SsaPass::new(Ssa::mem2reg, "Mem2Reg").and_then(Ssa::remove_unused_instructions),
Expand Down
Loading
Loading