Skip to content

Commit c79589f

Browse files
committed
Address conflicts during rebase
1 parent a14f20a commit c79589f

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,12 +1787,15 @@ class GeneratedRTChecks {
17871787

17881788
Loop *OuterLoop = nullptr;
17891789

1790+
PredicatedScalarEvolution &PSE;
1791+
17901792
public:
1791-
GeneratedRTChecks(ScalarEvolution &SE, DominatorTree *DT, LoopInfo *LI,
1792-
TargetTransformInfo *TTI, const DataLayout &DL,
1793-
bool AddBranchWeights)
1794-
: DT(DT), LI(LI), TTI(TTI), SCEVExp(SE, DL, "scev.check"),
1795-
MemCheckExp(SE, DL, "scev.check"), AddBranchWeights(AddBranchWeights) {}
1793+
GeneratedRTChecks(PredicatedScalarEvolution &PSE, DominatorTree *DT,
1794+
LoopInfo *LI, TargetTransformInfo *TTI,
1795+
const DataLayout &DL, bool AddBranchWeights)
1796+
: DT(DT), LI(LI), TTI(TTI), SCEVExp(*PSE.getSE(), DL, "scev.check"),
1797+
MemCheckExp(*PSE.getSE(), DL, "scev.check"),
1798+
AddBranchWeights(AddBranchWeights), PSE(PSE) {}
17961799

17971800
/// Generate runtime checks in SCEVCheckBlock and MemCheckBlock, so we can
17981801
/// accurately estimate the cost of the runtime checks. The blocks are
@@ -1939,7 +1942,7 @@ class GeneratedRTChecks {
19391942

19401943
// Get the best known TC estimate.
19411944
if (auto EstimatedTC = getSmallBestKnownTC(
1942-
*SE, OuterLoop, /* CanUseConstantMax = */ false))
1945+
PSE, OuterLoop, /* CanUseConstantMax = */ false))
19431946
BestTripCount = *EstimatedTC;
19441947

19451948
BestTripCount = std::max(BestTripCount, 1U);
@@ -9590,8 +9593,8 @@ static bool processLoopInVPlanNativePath(
95909593
{
95919594
bool AddBranchWeights =
95929595
hasBranchWeightMD(*L->getLoopLatch()->getTerminator());
9593-
GeneratedRTChecks Checks(*PSE.getSE(), DT, LI, TTI,
9594-
F->getDataLayout(), AddBranchWeights);
9596+
GeneratedRTChecks Checks(PSE, DT, LI, TTI, F->getDataLayout(),
9597+
AddBranchWeights);
95959598
InnerLoopVectorizer LB(L, PSE, LI, DT, TLI, TTI, AC, ORE, VF.Width,
95969599
VF.Width, 1, LVL, &CM, BFI, PSI, Checks);
95979600
LLVM_DEBUG(dbgs() << "Vectorizing outer loop in \""
@@ -9945,8 +9948,8 @@ bool LoopVectorizePass::processLoop(Loop *L) {
99459948

99469949
bool AddBranchWeights =
99479950
hasBranchWeightMD(*L->getLoopLatch()->getTerminator());
9948-
GeneratedRTChecks Checks(*PSE.getSE(), DT, LI, TTI,
9949-
F->getDataLayout(), AddBranchWeights);
9951+
GeneratedRTChecks Checks(PSE, DT, LI, TTI, F->getDataLayout(),
9952+
AddBranchWeights);
99509953
if (LVP.hasPlanWithVF(VF.Width)) {
99519954
// Select the interleave count.
99529955
IC = CM.selectInterleaveCount(VF.Width, VF.Cost);

0 commit comments

Comments
 (0)