[llvm-branch-commits] [llvm] Patch 2: [LV][NFCI] Parameterize IAI instance for the Planner (PR #202819)
Hassnaa Hamdi via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jul 2 05:16:45 PDT 2026
https://github.com/hassnaaHamdi updated https://github.com/llvm/llvm-project/pull/202819
>From 19e3dff11070c630387e38f8949f69990852957e Mon Sep 17 00:00:00 2001
From: Hassnaa Hamdi <hassnaa.hamdi at arm.com>
Date: Tue, 9 Jun 2026 14:00:12 +0100
Subject: [PATCH] Patch 2: [LV][NFCI] Parameterize IAI instance for the Planner
---
.../Transforms/Vectorize/LoopVectorizationPlanner.h | 10 +++-------
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 7 ++++---
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h b/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
index 76f6ac22c2d47..16701702779f4 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
@@ -823,9 +823,6 @@ class LoopVectorizationPlanner {
/// VF selection state independent of cost-modeling decisions.
VFSelectionContext &Config;
- /// The interleaved access analysis.
- InterleavedAccessInfo &IAI;
-
PredicatedScalarEvolution &PSE;
const LoopVectorizeHints &Hints;
@@ -861,11 +858,10 @@ class LoopVectorizationPlanner {
LoopVectorizationPlanner(
Loop *L, LoopInfo *LI, DominatorTree *DT, const TargetLibraryInfo *TLI,
const TargetTransformInfo &TTI, LoopVectorizationLegality *Legal,
- VFSelectionContext &Config, InterleavedAccessInfo &IAI,
- PredicatedScalarEvolution &PSE, const LoopVectorizeHints &Hints,
- OptimizationRemarkEmitter *ORE)
+ VFSelectionContext &Config, PredicatedScalarEvolution &PSE,
+ const LoopVectorizeHints &Hints, OptimizationRemarkEmitter *ORE)
: OrigLoop(L), LI(LI), DT(DT), TLI(TLI), TTI(TTI), Legal(Legal),
- Config(Config), IAI(IAI), PSE(PSE), Hints(Hints), ORE(ORE) {}
+ Config(Config), PSE(PSE), Hints(Hints), ORE(ORE) {}
/// Build VPlans for the specified \p UserVF and \p UserIC if they are
/// non-zero or all applicable candidate VFs otherwise. If vectorization and
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 8131856ca7a62..2952e69332d78 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -6714,7 +6714,8 @@ LoopVectorizationPlanner::tryToBuildVPlan(VPlanPtr Plan, VFRange &Range,
// Range, add it to the set of groups to be later applied to the VPlan and add
// placeholders for its members' Recipes which we'll be replacing with a
// single VPInterleaveRecipe.
- for (InterleaveGroup<Instruction> *IG : IAI.getInterleaveGroups()) {
+ for (InterleaveGroup<Instruction> *IG :
+ CM.InterleaveInfo.getInterleaveGroups()) {
auto ApplyIG = [IG, &CM](ElementCount VF) -> bool {
bool Result = (VF.isVector() && // Query is illegal for VF == 1
CM.getWideningDecision(IG->getInsertPos(), VF) ==
@@ -8056,8 +8057,8 @@ bool LoopVectorizePass::processLoop(Loop *L) {
LoopVectorizationCostModel CM(SEL, L, PSE, LI, &LVL, *TTI, TLI, AC, ORE,
GetBFI, F, &Hints, IAI, Config);
// Use the planner for vectorization.
- LoopVectorizationPlanner LVP(L, LI, DT, TLI, *TTI, &LVL, Config, IAI, PSE,
- Hints, ORE);
+ LoopVectorizationPlanner LVP(L, LI, DT, TLI, *TTI, &LVL, Config, PSE, Hints,
+ ORE);
EpilogueLowering EpilogueTailLoweringStatus =
getEpilogueTailLowering(CM, L, ORE);
More information about the llvm-branch-commits
mailing list