FinalLowerGC: emit GC frame slot addresses as byte offsets #65275
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 226 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: 35%
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.325
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #65275"
general
weight: 0.35
vtjnash
julia.get_gc_frame_slotis lowered togetelementptr inbounds ptr, ptr %gcframe, i32 N, which the InstCombine run after GC lowering rewrites to its canonical form,getelementptr inbounds nuw i8, ptr %gcframe, i64 8N. Each rewrite puts the frame alloca back on the worklist, and visiting the alloca walks all of its uses (llvm/llvm-project#242235), so that InstCombine run is quadratic in the number of GC-frame stores.A function that keeps many split-union values with inline roots live across many safepoints gets tens of thousands of such stores. Broadcasting
getpropertyover the 18 property names of an OrdinaryDiffEqODESolution(whatConstructionBase.getpropertiesdoes) gets 19,000 of them, and that one InstCombine run took 2.3 s of the 5.5 s it took to compile. This emits the canonical form directly, so InstCombine has nothing to rewrite: the compile drops to 3.4 s, and the optimized IR and machine code are unchanged.Package-free reproducer (run with
NF=40 JULIA_OBJCACHE=0; about 1.9 s before and 1.6 s after):The rest of the time in such a function (instruction selection, scheduling, DSE) comes from the number of stores itself: late GC lowering stores every live root again in each safepoint block that entry can reach without passing a safepoint. That is a separate question and not addressed here.
Written with Claude Code.