← Back to Pull requests

[release-1.13] pipeline.cpp: run IRCE after the SimplifyCFG + InstCombine loop cleanup #64018

Merged
giordano merged 1 files (40 lines) on Oct 25, 2026 19:45 UTC
View on GitHub
giordano giordano commented on Oct 21, 2026 21:44 UTC
Author

Backport of the pipeline part of #63626 to LLVM 20. IRCE used to run right after the rotation and unswitching loop passes, before SimplifyCFG and InstCombine clean up the loops, so it failed to remove bounds checks it

could handle, e.g. in fill! of views of FixedSizeArrays inlined in a loop over the slices of an array (JuliaArrays/FixedSizeArrays.jl#200). IRCE now runs after that cleanup (and before IndVarSimplify), followed by another
cleanup only for the functions it changed. Also run SimplifyCFG between the late CVP and SLP, as in #63626.

Suggested by @vchuravy.

Diff: 40 lines (+38 / -2) across 1 files Reviewer: maleadt Review duration: 5641m
All Vouch review confidence checks passed
Residual risk 0.04 = Change Risk (0.25) × (1 − Review Confidence (0.85)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.25 · 40 lines diff across 1 files
0.25
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.71 · 5 substantive comment(s)
0.71
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 85%
84%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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.222
Real PR Conversation Timeline
10 items
maleadt maleadt approved these changes on Oct 22, 2026 14:02 UTC
Approved Reviewer

Approved these changes.

giordano giordano commented on Oct 22, 2026 18:58 UTC
Author

@nanosoldier runbenchmarks()

giordano giordano commented on Oct 22, 2026 19:35 UTC
Author

Uhm, is the bot smart enough to use the target branch as baseline or I should have set it explicitly (how?)? Edit: based on https://github.com/JuliaCI/Nanosoldier.jl/blob/337e360a4a5ca6d9e9b96245ce90e4f3a3be95c6/README.md#trigger-syntax, maybe it is smart enough after all.

nanosoldier nanosoldier commented on Oct 23, 2026 02:14 UTC
Contributor

The benchmark job you requested has completed - possible performance regressions were detected. 4829 benchmarks were executed, 95 showed regressions, and 87 showed improvements.
Commits: 7a0cdb7 vs 9068e01 (comparing against merge-base of backports-release-1.13)
The full report is available.
<img src=https://github.com/JuliaCI/NanosoldierReports/raw/master/benchmark/by_hash/7a0cdb7_vs_9068e01/summary.png>

vchuravy vchuravy approved these changes on Oct 23, 2026 06:31 UTC
Approved Reviewer

Approved these changes.

vchuravy vchuravy commented on code on Oct 23, 2026 06:31 UTC
Code Review
src/pipeline.cpp:1
@@ -427,6 +427,37 @@ static void buildEarlyOptimizerPipeline(ModulePassManager &MPM, PassBuilder *PB,
     MPM.addPass(AfterEarlyOptimizationMarkerPass());
 }
 
+namespace {
+// IRCE, followed by the SimplifyCFG + InstCombine cleanup its output needs, but only if it

Maybe rewrite some of the comments here. We normally don't use this structure for conditionally scheduling cleanup passes

giordano giordano commented on code on Oct 23, 2026 08:26 UTC
Code Review
src/pipeline.cpp:1
@@ -427,6 +427,37 @@ static void buildEarlyOptimizerPipeline(ModulePassManager &MPM, PassBuilder *PB,
     MPM.addPass(AfterEarlyOptimizationMarkerPass());
 }
 
+namespace {
+// IRCE, followed by the SimplifyCFG + InstCombine cleanup its output needs, but only if it
DilumAluthge DilumAluthge commented on Oct 24, 2026 21:46 UTC
Contributor

Re-targeting to backports branch.

DilumAluthge DilumAluthge commented on Oct 25, 2026 05:24 UTC
Contributor

@giordano @vchuravy @maleadt Can you merge this into the backports branch once it's good to go?

Reviewers
Assignees
giordano giordano
Labels
risk: low confidence: 84.6% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 25.2% (LOW) · Higher = larger blast radius
25.2%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 84.6% · Lower = rushed or shallow review
84.6%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 3.9% · Safe to merge
3.9%