-
Notifications
You must be signed in to change notification settings - Fork 699
(optimization): Reboxing also applied on Box of snapshots #8954
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: eytan_graphite/_optimization_automatically_detecting_reboxing_of_struct_member_and_applying_struct_box_deconstruct_libfunc
Are you sure you want to change the base?
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
ilyalesokhin-starkware
left a comment
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.
@ilyalesokhin-starkware reviewed 4 of 4 files at r1.
Reviewable status: all files reviewed (commit messages unreviewed), all discussions resolved (waiting on @giladchase and @orizi)
orizi
left a comment
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.
@orizi reviewed 3 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @eytan-starkware and @giladchase)
crates/cairo-lang-lowering/src/optimizations/test_data/reboxing line 813 at r1 (raw file):
let member_a = unboxed.a; (BoxTrait::new(member_a), unboxed.non_drop) }
Suggestion:
fn main(a: Box<@A>) -> (Box<@felt252>, @NonDrop) {
(BoxTrait::new(a.a), a.non_drop)
}
48105ae to
ad75ba7
Compare
dbe1bcf to
0a0e49c
Compare
ad75ba7 to
2326263
Compare
orizi
left a comment
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.
@orizi reviewed 4 of 4 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @eytan-starkware and @giladchase)
eytan-starkware
left a comment
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.
Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @giladchase, @ilyalesokhin-starkware, and @orizi)
crates/cairo-lang-lowering/src/optimizations/test_data/reboxing line 813 at r1 (raw file):
let member_a = unboxed.a; (BoxTrait::new(member_a), unboxed.non_drop) }
Done.
orizi
left a comment
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.
@orizi reviewed 1 of 1 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @giladchase)
2326263 to
ef335a5
Compare
0a0e49c to
f7f38b9
Compare
ilyalesokhin-starkware
left a comment
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.
@ilyalesokhin-starkware reviewed all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @giladchase)
f7f38b9 to
f373f7d
Compare
ef335a5 to
630ce29
Compare
f373f7d to
cc5f6b4
Compare
630ce29 to
1dd5922
Compare
cc5f6b4 to
04c6b94
Compare
1dd5922 to
2e496a0
Compare
orizi
left a comment
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.
@orizi reviewed 1 of 1 files at r4, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @giladchase)

Enable reboxing optimization for snapshotted structs.
This PR extends the reboxing optimization to support structs wrapped in snapshots. Previously, the optimization would skip any struct that had snapshots, as indicated by the removed code that checked for
n_snapshots > 0. Now, the optimization properly handles snapshots by:wrap_in_snapshotsfrom the semantic types moduleThe PR also adds test cases for reboxing with snapshots.