Skip to content

Commit 9039996

Browse files
committed
Post-rebase clean-up
1 parent 7834708 commit 9039996

File tree

5 files changed

+9
-27
lines changed

5 files changed

+9
-27
lines changed

llvm/include/llvm/Analysis/LoopAccessAnalysis.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
#include "llvm/ADT/EquivalenceClasses.h"
1818
#include "llvm/Analysis/ScalarEvolution.h"
19-
#include "llvm/Analysis/LoopAnalysisManager.h"
20-
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
2119
#include "llvm/IR/DiagnosticInfo.h"
2220
#include <optional>
2321
#include <variant>

llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
#include "VPlan.h"
2828
#include "llvm/ADT/SmallSet.h"
29-
#include "llvm/Analysis/LoopAccessAnalysis.h"
3029
#include "llvm/Support/InstructionCost.h"
3130

3231
namespace llvm {
@@ -369,7 +368,8 @@ class LoopVectorizationPlanner {
369368
/// and the vector loop should be entered even if the pointers alias across a
370369
/// loop iteration.
371370
void plan(ElementCount UserVF, unsigned UserIC,
372-
std::optional<ArrayRef<PointerDiffInfo>> DiffChecks, bool &HasAliasMask);
371+
std::optional<ArrayRef<PointerDiffInfo>> DiffChecks,
372+
bool &HasAliasMask);
373373

374374
/// Use the VPlan-native path to plan how to best vectorize, return the best
375375
/// VF and its cost.

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7002,7 +7002,8 @@ LoopVectorizationPlanner::planInVPlanNativePath(ElementCount UserVF) {
70027002
return VectorizationFactor::Disabled();
70037003
}
70047004

7005-
void LoopVectorizationPlanner::plan(ElementCount UserVF, unsigned UserIC,
7005+
void LoopVectorizationPlanner::plan(
7006+
ElementCount UserVF, unsigned UserIC,
70067007
std::optional<ArrayRef<PointerDiffInfo>> RTChecks, bool &HasAliasMask) {
70077008
assert(OrigLoop->isInnermost() && "Inner loop expected.");
70087009
CM.collectValuesToIgnore();
@@ -7012,8 +7013,6 @@ void LoopVectorizationPlanner::plan(ElementCount UserVF, unsigned UserIC,
70127013
if (!MaxFactors) // Cases that should not to be vectorized nor interleaved.
70137014
return;
70147015

7015-
// VPlan needs the aliasing pointers as Values and not SCEVs, so expand them
7016-
// here and put them into a list.
70177016
ArrayRef<PointerDiffInfo> DiffChecks;
70187017
if (RTChecks.has_value() && useActiveLaneMask(CM.getTailFoldingStyle(true)))
70197018
DiffChecks = *RTChecks;
@@ -10000,11 +9999,13 @@ bool LoopVectorizePass::processLoop(Loop *L) {
100009999

1000110000
bool AddBranchWeights =
1000210001
hasBranchWeightMD(*L->getLoopLatch()->getTerminator());
10003-
GeneratedRTChecks Checks(*PSE.getSE(), DT, LI, TTI,
10004-
F->getDataLayout(), AddBranchWeights);
10002+
GeneratedRTChecks Checks(*PSE.getSE(), DT, LI, TTI, F->getDataLayout(),
10003+
AddBranchWeights);
1000510004

1000610005
// Plan how to best vectorize.
10007-
LVP.plan(UserVF, UserIC, LVL.getLAI()->getRuntimePointerChecking()->getDiffChecks(), Checks.HasAliasMask);
10006+
LVP.plan(UserVF, UserIC,
10007+
LVL.getLAI()->getRuntimePointerChecking()->getDiffChecks(),
10008+
Checks.HasAliasMask);
1000810009
VectorizationFactor VF = LVP.computeBestVF();
1000910010
if (Checks.HasAliasMask)
1001010011
LoopsAliasMasked++;

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
#include "llvm/IR/FMF.h"
4444
#include "llvm/IR/Operator.h"
4545
#include "llvm/Support/InstructionCost.h"
46-
#include "llvm/Transforms/Utils/ScalarEvolutionExpander.h"
4746
#include <algorithm>
4847
#include <cassert>
4948
#include <cstddef>
@@ -3882,20 +3881,6 @@ inline bool isUniformAfterVectorization(const VPValue *VPV) {
38823881
bool isHeaderMask(const VPValue *V, VPlan &Plan);
38833882
} // end namespace vputils
38843883

3885-
/// A pair of pointers that could overlap across a loop iteration.
3886-
struct PointerDiffInfoValues {
3887-
/// The pointer being read from
3888-
Value *Src;
3889-
/// The pointer being stored to
3890-
Value *Sink;
3891-
3892-
PointerDiffInfoValues(const SCEV *SrcStart, const SCEV *SinkStart,
3893-
SCEVExpander Exp, Instruction *Loc)
3894-
: Src(Exp.expandCodeFor(SrcStart, SrcStart->getType(), Loc)),
3895-
Sink(Exp.expandCodeFor(SinkStart, SinkStart->getType(), Loc)) {}
3896-
PointerDiffInfoValues(Value *Src, Value *Sink) : Src(Src), Sink(Sink) {}
3897-
};
3898-
38993884
} // end namespace llvm
39003885

39013886
#endif // LLVM_TRANSFORMS_VECTORIZE_VPLAN_H

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@
1818
#include "llvm/ADT/Twine.h"
1919
#include "llvm/Analysis/IVDescriptors.h"
2020
#include "llvm/IR/BasicBlock.h"
21-
#include "llvm/IR/DerivedTypes.h"
2221
#include "llvm/IR/IRBuilder.h"
2322
#include "llvm/IR/Instruction.h"
2423
#include "llvm/IR/Instructions.h"
25-
#include "llvm/IR/Intrinsics.h"
2624
#include "llvm/IR/Type.h"
2725
#include "llvm/IR/Value.h"
2826
#include "llvm/Support/Casting.h"

0 commit comments

Comments
 (0)