Compiler: test the IR verifier and dominator tree updates, and fix the bugs they found #64518
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.44) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.44 · 247 lines diff across 3 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.330
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #64518"
general
weight: 0.35
IanButterworth
Claude:
---
Most of the IR verifier's error paths, and the incremental dominator tree update and renaming code, had no tests. The first commit tests that each kind of malformed IR is rejected with its own message. It also checks that incremental dominator tree updates match a tree recomputed from scratch.
Bugs found, each fixed in its own commit:
ReturnNodeorGotoIfNotcould use a value its block is not dominated by, or a terminator's own value, and still pass.:leavechecks could not run, because:leaveis caught as a terminator first. Once they ran, they caught one hand-written test IR inirpasses.jlthat named agoto; that IR now names its:enterinstead.print=falsewas ignored for messages with interpolation, which is most of them.:entercontradicted a later check that rejects that IR anyway. The allowance is removed.@assertinstead of giving a verifier error.rename_nodes!threw aBoundsErrorwhen an unreachable block was kept.The stricter checks may reject IR the compiler produces. Locally, I forced verification on (normally only in assert builds) through 15 Compiler test files, also verifying after each mid-pipeline pass. Nothing fired on compiler output. The assert CI build is the first full-suite run.
Not added: a range check on
Argument(n). About 200 hand-written test IRs are built without argument types.Written with Claude Code (Opus 5.5).