Use Base.allocatedinline to decide whether an argument is boxed #1084
All Vouch review confidence checks passed
Residual risk 0.13 = Change Risk (0.36) × (1 − Review Confidence (0.64)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 193 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 70%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.315
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1084"
general
weight: 0.35
maleadt
deserves_argbox/deserves_retboxare meant to mirrordeserves_stackin Julia's codegen, but the hand-writtenis_inlineallocchecked only themayinlineallocflag and uninitialized fields. Julia also stores an immutable with GC pointers boxed when its field descriptors need 32 bits (fielddesc_type > 1), e.g.Tuple{NTuple{4100, Float64}, Vector{Float64}}. For such a typedeserves_argboxreturnedfalsewhile Julia passes the argument as a single boxed pointer, on every supported Julia version.GPUCompiler doesn't act on this itself, but Enzyme does, and on 1.12+ it breaks: its argument classification uses
deserves_argboxto decide whether an argument comes with a separate inline-roots argument. A custom rule whose tape is such a type, or a plain@noinlinecallee taking one, fails withcodegen_i=N > length(codegen_types)inclassify_arguments. Found while reviewing EnzymeAD/Enzyme.jl#3953, which fixes the same mismatch for the returned tape; EnzymeAD/Enzyme.jl#3954 works around it with a localdeserves_argbox.Base.allocatedinlineisjl_stored_inline, which for aDataTypeis the samejl_datatype_isinlinealloccheck codegen'sdeserves_stackmakes (1.10 through master).deserves_stacknow calls it directly andis_inlineallocis gone; nothing downstream used it.deserves_stackstill checksis_concrete_immutablefirst, so unions and abstract types are unaffected.Tests: a new
deserves_argboxtestset intest/utils.jl, which fails onmainand passes here on 1.10, 1.12 and 1.13.