Conversation
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
orizi
force-pushed
the
orizi/08-14-_opt_inline_calls_appended_to_a_block_by_const_folding
branch
from
August 15, 2026 15:09
771a3b3 to
caec800
Compare
orizi
force-pushed
the
orizi/08-14-_opt_skip_specializing_calls_the_size_heuristic_would_inline
branch
from
August 15, 2026 15:09
5b93864 to
2364400
Compare
orizi
force-pushed
the
orizi/08-14-_opt_inline_calls_appended_to_a_block_by_const_folding
branch
from
August 16, 2026 10:20
caec800 to
6faccdd
Compare
orizi
force-pushed
the
orizi/08-14-_opt_skip_specializing_calls_the_size_heuristic_would_inline
branch
2 times, most recently
from
August 16, 2026 10:36
cd84957 to
b7fd14d
Compare
orizi
force-pushed
the
orizi/08-14-_opt_inline_calls_appended_to_a_block_by_const_folding
branch
from
August 16, 2026 10:56
6faccdd to
7a3da04
Compare
orizi
force-pushed
the
orizi/08-14-_opt_skip_specializing_calls_the_size_heuristic_would_inline
branch
from
August 16, 2026 10:56
b7fd14d to
4a1a744
Compare
orizi
changed the base branch from
orizi/08-14-_opt_inline_calls_appended_to_a_block_by_const_folding
to
graphite-base/10350
August 25, 2026 07:54
orizi
force-pushed
the
graphite-base/10350
branch
from
August 25, 2026 07:58
7a3da04 to
05e51e7
Compare
orizi
force-pushed
the
orizi/08-14-_opt_skip_specializing_calls_the_size_heuristic_would_inline
branch
from
August 25, 2026 07:58
4a1a744 to
c999b5f
Compare
orizi
changed the base branch from
graphite-base/10350
to
orizi/08-14-_opt_inline_calls_appended_to_a_block_by_const_folding
August 25, 2026 07:58
orizi
changed the base branch from
orizi/08-14-_opt_inline_calls_appended_to_a_block_by_const_folding
to
graphite-base/10350
August 25, 2026 08:00
orizi
force-pushed
the
orizi/08-14-_opt_skip_specializing_calls_the_size_heuristic_would_inline
branch
from
August 25, 2026 08:00
c999b5f to
b8836d0
Compare
orizi
force-pushed
the
graphite-base/10350
branch
from
August 25, 2026 08:00
05e51e7 to
1f2e292
Compare
orizi
changed the base branch from
graphite-base/10350
to
orizi/08-14-_opt_inline_calls_appended_to_a_block_by_const_folding
August 25, 2026 08:00
orizi
changed the base branch from
orizi/08-14-_opt_inline_calls_appended_to_a_block_by_const_folding
to
graphite-base/10350
August 25, 2026 08:29
orizi
force-pushed
the
orizi/08-14-_opt_skip_specializing_calls_the_size_heuristic_would_inline
branch
from
August 25, 2026 08:29
b8836d0 to
5d7bd37
Compare
orizi
changed the base branch from
graphite-base/10350
to
orizi/08-25-_opt_fold_struct_destructure_of_a_constant_into_member_constants
August 25, 2026 08:29
orizi
changed the base branch from
orizi/08-25-_opt_fold_struct_destructure_of_a_constant_into_member_constants
to
graphite-base/10350
August 25, 2026 08:35
orizi
force-pushed
the
graphite-base/10350
branch
from
August 25, 2026 08:36
155e76b to
55ed529
Compare
orizi
force-pushed
the
orizi/08-14-_opt_skip_specializing_calls_the_size_heuristic_would_inline
branch
from
August 25, 2026 08:36
5d7bd37 to
0a63156
Compare
orizi
changed the base branch from
graphite-base/10350
to
orizi/08-25-_opt_fold_struct_destructure_of_a_constant_into_member_constants
August 25, 2026 08:36
orizi
changed the base branch from
orizi/08-25-_opt_fold_struct_destructure_of_a_constant_into_member_constants
to
graphite-base/10350
August 25, 2026 08:59
orizi
changed the base branch from
orizi/08-25-_opt_fold_struct_destructure_of_a_constant_into_member_constants
to
graphite-base/10350
August 25, 2026 10:01
orizi
force-pushed
the
orizi/08-14-_opt_skip_specializing_calls_the_size_heuristic_would_inline
branch
from
August 25, 2026 10:01
32c952b to
d62c854
Compare
orizi
force-pushed
the
graphite-base/10350
branch
from
August 25, 2026 10:01
12dd24d to
2fc317e
Compare
orizi
changed the base branch from
graphite-base/10350
to
orizi/08-25-_opt_fold_struct_destructure_of_a_constant_into_member_constants
August 25, 2026 10:01
orizi
changed the base branch from
orizi/08-25-_opt_fold_struct_destructure_of_a_constant_into_member_constants
to
graphite-base/10350
August 25, 2026 10:14
orizi
force-pushed
the
orizi/08-14-_opt_skip_specializing_calls_the_size_heuristic_would_inline
branch
from
August 25, 2026 10:15
d62c854 to
c64d843
Compare
orizi
force-pushed
the
graphite-base/10350
branch
from
August 25, 2026 10:15
2fc317e to
9f80526
Compare
orizi
changed the base branch from
graphite-base/10350
to
orizi/08-25-_opt_fold_struct_destructure_of_a_constant_into_member_constants
August 25, 2026 10:15
orizi
force-pushed
the
orizi/08-14-_opt_skip_specializing_calls_the_size_heuristic_would_inline
branch
from
August 25, 2026 11:09
c64d843 to
36d4262
Compare
orizi
changed the base branch from
orizi/08-25-_opt_fold_struct_destructure_of_a_constant_into_member_constants
to
graphite-base/10350
August 25, 2026 11:14
orizi
force-pushed
the
orizi/08-14-_opt_skip_specializing_calls_the_size_heuristic_would_inline
branch
from
August 25, 2026 11:14
36d4262 to
c055ead
Compare
orizi
force-pushed
the
graphite-base/10350
branch
from
August 25, 2026 11:14
9f80526 to
b5698d6
Compare
orizi
changed the base branch from
graphite-base/10350
to
orizi/08-25-_opt_fold_struct_destructure_of_a_constant_into_member_constants
August 25, 2026 11:14
orizi
force-pushed
the
orizi/08-14-_opt_skip_specializing_calls_the_size_heuristic_would_inline
branch
from
August 25, 2026 11:51
c055ead to
634bf8a
Compare
orizi
force-pushed
the
orizi/08-25-_opt_fold_struct_destructure_of_a_constant_into_member_constants
branch
from
August 25, 2026 11:52
b5698d6 to
bad7ba0
Compare
orizi
force-pushed
the
orizi/08-14-_opt_skip_specializing_calls_the_size_heuristic_would_inline
branch
from
August 25, 2026 11:52
634bf8a to
f59b422
Compare
TomerStarkware
approved these changes
Aug 25, 2026
TomerStarkware
left a comment
Collaborator
There was a problem hiding this comment.
@TomerStarkware reviewed 7 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on eytan-starkware).
orizi
force-pushed
the
orizi/08-14-_opt_skip_specializing_calls_the_size_heuristic_would_inline
branch
from
August 31, 2026 08:57
f59b422 to
6885e4e
Compare
orizi
force-pushed
the
orizi/08-25-_opt_fold_struct_destructure_of_a_constant_into_member_constants
branch
from
August 31, 2026 08:57
bad7ba0 to
a247eb6
Compare
TomerStarkware
approved these changes
Aug 31, 2026
TomerStarkware
left a comment
Collaborator
There was a problem hiding this comment.
@TomerStarkware reviewed 1 file and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on eytan-starkware).
During the interleaved inlining/const-folding pass, a call with constant arguments to a function that would be inlined was first specialized - paying a full casm size estimation of the specialized function in priv_should_specialize - and the specialized function was then immediately inlined anyway (a specialized function inherits its base's inline configuration, and a small base's specialization is smaller yet). Inlining the base directly and const folding in place reaches equivalent code without the extra estimation and specialized function lowering. Skip specialization for such calls. As every statement is checked for inlining right after its const-folding visit, such calls are always inlined by the interleaved pass and never survive to the standalone const-folding pass. Improves full-compilation time by ~4.5% (measured on top of the size estimation memoization). Emitted code is equivalent: e2e and contract outputs are unchanged, and debug locations lose a redundant self-inlining frame. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
orizi
changed the base branch from
orizi/08-25-_opt_fold_struct_destructure_of_a_constant_into_member_constants
to
graphite-base/10350
August 31, 2026 10:15
orizi
force-pushed
the
orizi/08-14-_opt_skip_specializing_calls_the_size_heuristic_would_inline
branch
from
August 31, 2026 10:15
6885e4e to
e8db694
Compare
orizi
force-pushed
the
graphite-base/10350
branch
from
August 31, 2026 10:15
a247eb6 to
6e4b96f
Compare
orizi
enabled auto-merge
August 31, 2026 10:15
orizi
deleted the
orizi/08-14-_opt_skip_specializing_calls_the_size_heuristic_would_inline
branch
August 31, 2026 12:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

During the interleaved inlining/const-folding pass, a call with constant
arguments to a function that would be inlined was first specialized - paying
a full casm size estimation of the specialized function in
priv_should_specialize - and the specialized function was then immediately
inlined anyway (a specialized function inherits its base's inline
configuration, and a small base's specialization is smaller yet). Inlining
the base directly and const folding in place reaches equivalent code without
the extra estimation and specialized function lowering.
Skip specialization for such calls. As every statement is checked for
inlining right after its const-folding visit, such calls are always inlined
by the interleaved pass and never survive to the standalone const-folding
pass.
Improves full-compilation time by ~4.5% (measured on top of the size
estimation memoization). Emitted code is equivalent: e2e and contract
outputs are unchanged, and debug locations lose a redundant self-inlining
frame.