Skip to content

Conversation

@giladchase
Copy link
Contributor

  • usage subject to dedicated db-flag
  • after tracking local variables in analyze_ap_changes, into_box sierra-gen conditionally emits
    either into_box or local_into_box if the input is small enough to be worth it.

@reviewable-StarkWare
Copy link

This change is Reviewable

@giladchase giladchase marked this pull request as ready for review December 11, 2025 15:28
Copy link
Contributor Author

giladchase commented Dec 11, 2025

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.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@giladchase giladchase force-pushed the gilad/12-11-feat_use_local_into_box branch from 9d7bb23 to d8fe4c1 Compare December 11, 2025 15:32
@giladchase giladchase force-pushed the gilad/12-08-add_intobox_instead_of_into_box_in_lowering branch from cf3a16f to cc4db7d Compare December 11, 2025 15:32
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.

@orizi reviewed 2 of 10 files at r1, all commit messages.
Reviewable status: 2 of 10 files reviewed, 2 unresolved discussions (waiting on @eytan-starkware and @giladchase)


crates/cairo-lang-filesystem/src/flag.rs line 26 at r1 (raw file):

    ///
    /// Default is true.
    LocalIntoBoxOptimization(bool),

use "sierra_future" flag - should exist after you rebase.

so revert the file.


crates/cairo-lang-sierra-generator/src/local_variables.rs line 41 at r1 (raw file):

    pub ap_tracking_configuration: ApTrackingConfiguration,
    /// Variables that are known to be non-AP-based (expanded to include all aliases).
    pub non_ap_based_variables: UnorderedHashSet<VariableId>,

why isn't this just included in the set of local variables?

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.

Reviewable status: 2 of 10 files reviewed, 3 unresolved discussions (waiting on @eytan-starkware and @giladchase)


crates/cairo-lang-sierra-generator/src/function_generator_test_data/boxing line 110 at r1 (raw file):

fn foo() -> Box<MyStruct> {
    let x = create_struct();
    revoke_ap();

why is the revoke required? it should be store_local anyway because it is large - no?

@giladchase giladchase changed the base branch from gilad/12-08-add_intobox_instead_of_into_box_in_lowering to graphite-base/9046 December 14, 2025 09:55
@giladchase giladchase force-pushed the gilad/12-11-feat_use_local_into_box branch from d8fe4c1 to 3783121 Compare December 14, 2025 09:55
@giladchase giladchase changed the base branch from graphite-base/9046 to gilad/12-14-feat_add_unbox_for_symmetry_with_intobox_ December 14, 2025 09:55
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.

@orizi reviewed all commit messages.
Reviewable status: 0 of 10 files reviewed, 3 unresolved discussions (waiting on @eytan-starkware and @giladchase)

@giladchase giladchase force-pushed the gilad/12-11-feat_use_local_into_box branch from 3783121 to e718bfd Compare December 14, 2025 11:09
@giladchase giladchase force-pushed the gilad/12-14-feat_add_unbox_for_symmetry_with_intobox_ branch from 9b151ef to 0316145 Compare December 14, 2025 11:09
@giladchase giladchase force-pushed the gilad/12-11-feat_use_local_into_box branch from e718bfd to 88dfb36 Compare December 14, 2025 11:11
@giladchase giladchase force-pushed the gilad/12-14-feat_add_unbox_for_symmetry_with_intobox_ branch from 0316145 to eca350a Compare December 14, 2025 11:11
@giladchase giladchase force-pushed the gilad/12-11-feat_use_local_into_box branch from 88dfb36 to a916e5c Compare December 14, 2025 11:12
@giladchase giladchase force-pushed the gilad/12-14-feat_add_unbox_for_symmetry_with_intobox_ branch from eca350a to 5678893 Compare December 14, 2025 11:12
- usage subject to dedicated db-flag
- after tracking local variables in `analyze_ap_changes`, into_box sierra-gen conditionally emits
  either `into_box` or `local_into_box` if the input is small enough to be worth it.
@giladchase giladchase force-pushed the gilad/12-14-feat_add_unbox_for_symmetry_with_intobox_ branch from 5678893 to 99620ed Compare December 14, 2025 11:33
@giladchase giladchase force-pushed the gilad/12-11-feat_use_local_into_box branch from a916e5c to 39ee7ec Compare December 14, 2025 11:33
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.

4 participants