feat(MIRPrinter): preserve physical allocation and stack slots in MIR #2195
All Vouch review confidence checks passed
Residual risk 0.13 = Change Risk (0.33) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 147 lines diff across 1 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.299
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2195"
general
weight: 0.35
regehr
In MIRPrinter
riscv_regallocdialectsplanFrame, countriscv_regalloc.spillresults intospillSlotsisPhysicalAllocateddecides whether an input function is fully allocated (every int/stack registers). If so, output the allocated physical registers (only runllcpost register allocation passes later). Otherwise remain the existing behaviour, output SSA values.COPYif use physical allocation and the source value is already in target registers.SD/LDwith frame object spill-slot "%stack.{fr.objects.size + k}".llclater translate the frame object to a stack-pointer-relative offset.I run MIR filecheck on spilling / no-spilling. Also run
llcfor prologue/epilogue completion and some post RA pseudocode, produce assembly with LLVM assembler and execute the binaries under qemu.VeIR-allocated assembly gives slightly worse code (cos remove precoloured
a0. etc from allocatable pool, no register coalescing), but they output the same return values:<img width="737" height="192" alt="image" src="https://github.com/user-attachments/assets/74ec212e-c1ac-4c4b-8a55-9c91320f90b3" />