Skip to content
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

Add split_structs optimization. #5034

Merged
merged 1 commit into from
Feb 8, 2024
Merged

Conversation

ilyalesokhin-starkware
Copy link
Contributor

@ilyalesokhin-starkware ilyalesokhin-starkware commented Feb 8, 2024

This change is Reviewable

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 4 files at r1, all commit messages.
Reviewable status: 1 of 4 files reviewed, 5 unresolved discussions (waiting on @ilyalesokhin-starkware)


crates/cairo-lang-lowering/src/optimizations/split_structs.rs line 31 at r1 (raw file):

}

/// returns a mapping from varaibles that should be split to thier split.

Suggestion:

/// returns a mapping from variables that should be split to the variables resulting from the split.

crates/cairo-lang-lowering/src/optimizations/split_structs.rs line 72 at r1 (raw file):

}

/// Splits 'dst' according to the split of 'src'.

i don't understand the doc.
add an example.

Code quote:

/// Splits 'dst' according to the split of 'src'.

crates/cairo-lang-lowering/src/optimizations/split_structs.rs line 89 at r1 (raw file):

            for split_src in src_vars {
                let new_var = variables.alloc(variables[*split_src].clone());
                // queue inner for for possible splitting.

?

Code quote:

                // queue inner for for possible splitting.

crates/cairo-lang-lowering/src/optimizations/split_structs.rs line 205 at r1 (raw file):

}

fn unsplit_var(

doc


crates/cairo-lang-lowering/src/optimizations/split_structs.rs line 235 at r1 (raw file):

}

fn rebuild_remapping(

doc

Copy link
Contributor Author

@ilyalesokhin-starkware ilyalesokhin-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 of 4 files reviewed, 5 unresolved discussions (waiting on @orizi)


crates/cairo-lang-lowering/src/optimizations/split_structs.rs line 31 at r1 (raw file):

}

/// returns a mapping from varaibles that should be split to thier split.

Done.


crates/cairo-lang-lowering/src/optimizations/split_structs.rs line 72 at r1 (raw file):

Previously, orizi wrote…

i don't understand the doc.
add an example.

Done.


crates/cairo-lang-lowering/src/optimizations/split_structs.rs line 89 at r1 (raw file):

Previously, orizi wrote…

?

Done.


crates/cairo-lang-lowering/src/optimizations/split_structs.rs line 205 at r1 (raw file):

Previously, orizi wrote…

doc

Done.


crates/cairo-lang-lowering/src/optimizations/split_structs.rs line 235 at r1 (raw file):

Previously, orizi wrote…

doc

Done.

@ilyalesokhin-starkware ilyalesokhin-starkware force-pushed the ilya/split_structs branch 3 times, most recently from 06bf883 to 0e2fb55 Compare February 8, 2024 12:02
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 4 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ilyalesokhin-starkware)

@ilyalesokhin-starkware ilyalesokhin-starkware added this pull request to the merge queue Feb 8, 2024
Merged via the queue into main with commit a93e206 Feb 8, 2024
43 checks passed
delaaxe pushed a commit to delaaxe/cairo that referenced this pull request Feb 8, 2024
@orizi orizi deleted the ilya/split_structs branch February 14, 2024 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants