simplify-affine-exprs: simplify against domains with symbols #3174
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 191 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.315
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3174"
general
weight: 0.35
ftynse
simplify-affine-exprsgists every access map andaffine.ifcondition against the enclosing loop and branch domain with ISL, which is what folds(%j + %i floordiv 3) floordiv 3to0when%i, %jrange over[0, 3). It gave up whenever the domain carried a symbol, so any access under a loop with a symbolic bound was skipped. Every GPU kernel's grid loop has a symbolic bound, which left the pass dead on the raising path: on MFEM'snonlininteg_vecconvection_pathe shared-memory scratch accesses stay asunder
affine.parallel (%i, %j) = (0, 0) to (3, 3), where[0, %j, %i]is the answer.Map operands the domain does not know (an access's own symbol operand, or a dim no enclosing affine op binds) are appended to the constraint system and the ISL set as unconstrained variables, symbols get parameter identifiers on both spaces so the gist aligns them, semi-affine expressions (a division or modulus by a symbol) are left alone, and a simplified result that reads a domain variable the map has no operand for (which a domain equality can produce) is rejected instead of being decoded as position 0.
Test
simplify-affine-exprs-symbols.mlir: a symbolic grid bound above the folding loop, an access with its own symbol operand, and a condition under a symbolic bound.🤖 Generated with Claude Code
https://claude.ai/code/session_016zErYp7upmqr4NHfhod9UD