(opt): remove cancel_ops phase, subsumed by variable forwarding - #10015
Conversation
1c51736 to
2bd0ebc
Compare
e6124f2 to
fc9cef2
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR SummaryMedium Risk Overview The default optimization pipeline no longer runs Legacy Reviewed by Cursor Bugbot for commit dc87ae5. Bugbot is set up for automated code reviews on this repo. Configure here. |
orizi
left a comment
There was a problem hiding this comment.
@orizi reviewed 32 files and all commit messages, and made 3 comments.
Reviewable status: 32 of 46 files reviewed, 3 unresolved discussions (waiting on eytan-starkware, ilyalesokhin-starkware, and TomerStarkware).
crates/cairo-lang-lowering/src/optimizations/test_data/cancel_ops at r1 (raw file):
wire to forwarding.
move or delete in following PR.
crates/cairo-lang-semantic/src/expr/expansion_test_data/inline_macros line 272 at r1 (raw file):
--> lib.cairo:6:1 take_ident!($) ^^^^^^^^^^^^^^
revert
tests/test_data/fib_array.sierra line 114 at r1 (raw file):
store_temp<Box<felt252>>([20]) -> ([20]); unbox<felt252>([20]) -> ([22]); snapshot_take<Array<felt252>>([8]) -> ([23], [24]);
regression.
orizi
left a comment
There was a problem hiding this comment.
@orizi reviewed 12 files.
Reviewable status: 44 of 46 files reviewed, 3 unresolved discussions (waiting on eytan-starkware, ilyalesokhin-starkware, and TomerStarkware).
2bd0ebc to
d1bd315
Compare
fc9cef2 to
261a77a
Compare
261a77a to
99bbc03
Compare
eytan-starkware
left a comment
There was a problem hiding this comment.
@eytan-starkware made 3 comments.
Reviewable status: 44 of 47 files reviewed, 3 unresolved discussions (waiting on ilyalesokhin-starkware, orizi, and TomerStarkware).
crates/cairo-lang-lowering/src/optimizations/test_data/cancel_ops at r1 (raw file):
Previously, orizi wrote…
wire to forwarding.
move or delete in following PR.
Done.
crates/cairo-lang-semantic/src/expr/expansion_test_data/inline_macros line 272 at r1 (raw file):
Previously, orizi wrote…
revert
Done.
tests/test_data/fib_array.sierra line 114 at r1 (raw file):
Previously, orizi wrote…
regression.
Yes. Acceptable no?
99bbc03 to
69e0cd4
Compare
d1bd315 to
1e2cf54
Compare
orizi
left a comment
There was a problem hiding this comment.
@orizi reviewed 9 files and all commit messages, made 1 comment, and resolved 2 discussions.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on eytan-starkware, ilyalesokhin-starkware, and TomerStarkware).
tests/test_data/fib_array.sierra line 114 at r1 (raw file):
Previously, eytan-starkware wrote…
Yes. Acceptable no?
mostly depends on why this happens.
eytan-starkware
left a comment
There was a problem hiding this comment.
@eytan-starkware made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on ilyalesokhin-starkware, orizi, and TomerStarkware).
tests/test_data/fib_array.sierra line 114 at r1 (raw file):
Previously, orizi wrote…
mostly depends on why this happens.
I had claude check this, it is around how the removal cascading works (or doesn't in this case): For the fib_array case the producer is a lowering snapshot statement, which has two outputs (orig, snap). VF forwards the desnap consumers onto orig, which makes snap dead — but it can't DCE the snapshot statement because the other output (orig) is still live. A two-output op with one live output survives ordinary dead-code elimination. Sierra-gen then lowers that surviving statement to exactly what Ori flagged:
orizi
left a comment
There was a problem hiding this comment.
@orizi made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on eytan-starkware, ilyalesokhin-starkware, and TomerStarkware).
tests/test_data/fib_array.sierra line 114 at r1 (raw file):
Previously, eytan-starkware wrote…
I had claude check this, it is around how the removal cascading works (or doesn't in this case): For the fib_array case the producer is a lowering snapshot statement, which has two outputs (orig, snap). VF forwards the desnap consumers onto orig, which makes snap dead — but it can't DCE the snapshot statement because the other output (orig) is still live. A two-output op with one live output survives ordinary dead-code elimination. Sierra-gen then lowers that surviving statement to exactly what Ori flagged:
it previously was removed by cancel ops?
1e2cf54 to
ed21f8d
Compare
69e0cd4 to
aa346da
Compare
aa346da to
4e59c47
Compare
ed21f8d to
286b3d4
Compare
4e59c47 to
ade0cef
Compare
1292dc5 to
ee2b6a5
Compare
ade0cef to
36cf5df
Compare
36cf5df to
c5e773d
Compare
ee2b6a5 to
3e28757
Compare
orizi
left a comment
There was a problem hiding this comment.
@orizi reviewed 3 files and all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on eytan-starkware, ilyalesokhin-starkware, and TomerStarkware).
c5e773d to
dc87ae5
Compare
Merge activity
|
eytan-starkware
left a comment
There was a problem hiding this comment.
@eytan-starkware made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on ilyalesokhin-starkware, orizi, and TomerStarkware).
tests/test_data/fib_array.sierra line 114 at r1 (raw file):
Previously, orizi wrote…
it previously was removed by cancel ops?
Yes
eytan-starkware
left a comment
There was a problem hiding this comment.
@eytan-starkware made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on ilyalesokhin-starkware, orizi, and TomerStarkware).
tests/test_data/fib_array.sierra line 114 at r1 (raw file):
Previously, eytan-starkware wrote…
Yes
Though only in combination with VF. Apperantly before VF it didn't
orizi
left a comment
There was a problem hiding this comment.
@orizi made 1 comment and resolved 1 discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on ilyalesokhin-starkware and TomerStarkware).

Summary
Type of change
Please check one:
Why is this change needed?
What was the behavior or documentation before?
What is the behavior or documentation after?
Related issue or discussion (if any)
Additional context