Skip to content

inference: include const-abi CodeInstances in need_inlineable_code check#61553

Merged
adienes merged 1 commit intoJuliaLang:masterfrom
adienes:fix-constabi-inlining
Apr 10, 2026
Merged

inference: include const-abi CodeInstances in need_inlineable_code check#61553
adienes merged 1 commit intoJuliaLang:masterfrom
adienes:fix-constabi-inlining

Conversation

@adienes
Copy link
Copy Markdown
Member

@adienes adienes commented Apr 10, 2026

Const-abi CodeInstances have inferred === nothing, so is_inlineable returns false and typeinf_edge skips source retrieval. This prevents the inliner from folding these calls to constants.

Fixes #61552

can't wait for Mythos to release and then maybe claude will be able to take over all my other hobbies too

Const-abi CodeInstances have `inferred === nothing`, so `is_inlineable`
returns false and `typeinf_edge` skips source retrieval. This prevents
the inliner from folding these calls to constants.

Fixes JuliaLang#61552

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@adienes adienes added bugfix This change fixes an existing bug compiler:inference Type inference labels Apr 10, 2026
@adienes adienes requested a review from topolarity April 10, 2026 13:11
@oscardssmith
Copy link
Copy Markdown
Member

Should we instead make is_inlineable true for const-abi?

@adienes
Copy link
Copy Markdown
Member Author

adienes commented Apr 10, 2026

not sure I fully understand the suggestion. iiuc use_const_api takes codeinst but is_inlineable takes codeinst.src so we'd have to call use_const_api anyway

@oscardssmith oscardssmith added the performance Must go faster label Apr 10, 2026
@adienes adienes merged commit 46fcd1f into JuliaLang:master Apr 10, 2026
9 of 10 checks passed
@adienes adienes deleted the fix-constabi-inlining branch April 10, 2026 16:31
JamesWrigley pushed a commit to JamesWrigley/julia that referenced this pull request Apr 13, 2026
…eck (JuliaLang#61553)

Const-abi CodeInstances have `inferred === nothing`, so `is_inlineable`
returns false and `typeinf_edge` skips source retrieval. This prevents
the inliner from folding these calls to constants.

Fixes JuliaLang#61552

can't wait for Mythos to release and then maybe claude will be able to
take over all my other hobbies too

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix This change fixes an existing bug compiler:inference Type inference performance Must go faster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Const-propagation through ntuple worse than on 1.12

3 participants