Skip to content

Commit 9f0382b

Browse files
committed
Address review
1 parent fb7ebba commit 9f0382b

File tree

17 files changed

+423
-375
lines changed

17 files changed

+423
-375
lines changed

llvm/include/llvm/CodeGen/BasicTTIImpl.h

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2190,53 +2190,6 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
21902190
// Otherwise, fallback to default scalarization cost.
21912191
break;
21922192
}
2193-
case Intrinsic::loop_dependence_raw_mask:
2194-
case Intrinsic::loop_dependence_war_mask: {
2195-
InstructionCost Cost = 0;
2196-
Type *PtrTy = ICA.getArgTypes()[0];
2197-
bool IsReadAfterWrite = IID == Intrinsic::loop_dependence_raw_mask;
2198-
2199-
Cost +=
2200-
thisT()->getArithmeticInstrCost(Instruction::Sub, PtrTy, CostKind);
2201-
if (IsReadAfterWrite) {
2202-
IntrinsicCostAttributes AbsAttrs(Intrinsic::abs, PtrTy, {PtrTy}, {});
2203-
Cost += thisT()->getIntrinsicInstrCost(AbsAttrs, CostKind);
2204-
}
2205-
2206-
Cost +=
2207-
thisT()->getArithmeticInstrCost(Instruction::SDiv, PtrTy, CostKind);
2208-
Type *CmpTy =
2209-
getTLI()
2210-
->getSetCCResultType(
2211-
thisT()->getDataLayout(), RetTy->getContext(),
2212-
getTLI()->getValueType(thisT()->getDataLayout(), PtrTy))
2213-
.getTypeForEVT(RetTy->getContext());
2214-
Cost += thisT()->getCmpSelInstrCost(
2215-
BinaryOperator::ICmp, CmpTy, PtrTy,
2216-
IsReadAfterWrite ? CmpInst::ICMP_EQ : CmpInst::ICMP_SLE, CostKind);
2217-
2218-
// The deconstructed active lane mask
2219-
VectorType *RetTyVec = cast<VectorType>(RetTy);
2220-
VectorType *SplatTy = cast<VectorType>(RetTyVec->getWithNewType(PtrTy));
2221-
Cost += thisT()->getShuffleCost(TTI::SK_Broadcast, SplatTy, SplatTy, {},
2222-
CostKind, 0, nullptr);
2223-
IntrinsicCostAttributes StepVecAttrs(Intrinsic::stepvector, SplatTy, {},
2224-
FMF);
2225-
Cost += thisT()->getIntrinsicInstrCost(StepVecAttrs, CostKind);
2226-
Cost += thisT()->getCmpSelInstrCost(BinaryOperator::ICmp, SplatTy,
2227-
SplatTy, CmpInst::ICMP_ULT, CostKind);
2228-
2229-
Cost +=
2230-
thisT()->getCastInstrCost(Instruction::CastOps::ZExt, RetTy, SplatTy,
2231-
TTI::CastContextHint::None, CostKind);
2232-
Cost += thisT()->getCastInstrCost(Instruction::CastOps::ZExt,
2233-
RetTyVec->getElementType(), CmpTy,
2234-
TTI::CastContextHint::None, CostKind);
2235-
Cost += thisT()->getShuffleCost(TTI::SK_Broadcast, RetTyVec, RetTyVec, {},
2236-
CostKind, 0, nullptr);
2237-
Cost += thisT()->getArithmeticInstrCost(Instruction::Or, RetTy, CostKind);
2238-
return Cost;
2239-
}
22402193
}
22412194

22422195
// Assume that we need to scalarize this intrinsic.)

llvm/include/llvm/Transforms/Utils/LoopUtils.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -614,11 +614,6 @@ addRuntimeChecks(Instruction *Loc, Loop *TheLoop,
614614
const SmallVectorImpl<RuntimePointerCheck> &PointerChecks,
615615
SCEVExpander &Expander, bool HoistRuntimeChecks = false);
616616

617-
LLVM_ABI Value *addSafeEltsRuntimeChecks(Instruction *Loc,
618-
ArrayRef<PointerDiffInfo> Checks,
619-
SCEVExpander &Expander,
620-
ElementCount VF);
621-
622617
LLVM_ABI Value *addDiffRuntimeChecks(
623618
Instruction *Loc, ArrayRef<PointerDiffInfo> Checks, SCEVExpander &Expander,
624619
function_ref<Value *(IRBuilderBase &, unsigned)> GetVF, unsigned IC);

llvm/lib/Transforms/Utils/LoopUtils.cpp

Lines changed: 3 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,58 +2135,6 @@ Value *llvm::addRuntimeChecks(
21352135
return MemoryRuntimeCheck;
21362136
}
21372137

2138-
Value *llvm::addSafeEltsRuntimeChecks(Instruction *Loc,
2139-
ArrayRef<PointerDiffInfo> Checks,
2140-
SCEVExpander &Expander, ElementCount VF) {
2141-
IRBuilder ChkBuilder(Loc->getContext(),
2142-
InstSimplifyFolder(Loc->getDataLayout()));
2143-
ChkBuilder.SetInsertPoint(Loc);
2144-
Value *MemoryRuntimeCheck = nullptr;
2145-
2146-
// Map to keep track of created compares, The key is the pair of operands for
2147-
// the compare, to allow detecting and re-using redundant compares.
2148-
DenseMap<std::pair<Value *, Value *>, Value *> SeenCompares;
2149-
Value *AliasLaneMask = nullptr;
2150-
for (const auto &[SrcStart, SinkStart, AccessSize, NeedsFreeze,
2151-
WriteAfterRead] : Checks) {
2152-
Type *Ty = SinkStart->getType();
2153-
Value *Sink = Expander.expandCodeFor(SinkStart, Ty, Loc);
2154-
Value *Src = Expander.expandCodeFor(SrcStart, Ty, Loc);
2155-
if (SeenCompares.lookup({Sink, Src}))
2156-
continue;
2157-
2158-
unsigned IntOpc = WriteAfterRead ? Intrinsic::loop_dependence_war_mask
2159-
: Intrinsic::loop_dependence_raw_mask;
2160-
Value *SourceAsPtr = ChkBuilder.CreateCast(Instruction::IntToPtr, Src,
2161-
ChkBuilder.getPtrTy());
2162-
Value *SinkAsPtr = ChkBuilder.CreateCast(Instruction::IntToPtr, Sink,
2163-
ChkBuilder.getPtrTy());
2164-
Value *M = ChkBuilder.CreateIntrinsic(
2165-
IntOpc, {VectorType::get(ChkBuilder.getInt1Ty(), VF)},
2166-
{SourceAsPtr, SinkAsPtr, ChkBuilder.getInt64(AccessSize)}, nullptr,
2167-
"alias.lane.mask");
2168-
SeenCompares.insert({{Sink, Src}, M});
2169-
if (AliasLaneMask)
2170-
M = ChkBuilder.CreateAnd(AliasLaneMask, M);
2171-
else
2172-
AliasLaneMask = M;
2173-
}
2174-
assert(AliasLaneMask && "Expected an alias lane mask to have been created.");
2175-
auto *VecVT = VectorType::get(ChkBuilder.getInt1Ty(), VF);
2176-
// Extend to an i8 since i1 is too small to add with
2177-
Value *PopCount = ChkBuilder.CreateCast(
2178-
Instruction::ZExt, AliasLaneMask,
2179-
VectorType::get(ChkBuilder.getInt8Ty(), VecVT->getElementCount()));
2180-
2181-
PopCount =
2182-
ChkBuilder.CreateUnaryIntrinsic(Intrinsic::vector_reduce_add, PopCount);
2183-
PopCount = ChkBuilder.CreateCast(Instruction::ZExt, PopCount,
2184-
ChkBuilder.getInt64Ty());
2185-
MemoryRuntimeCheck = ChkBuilder.CreateICmpUGT(
2186-
PopCount, ConstantInt::get(ChkBuilder.getInt64Ty(), 0));
2187-
return MemoryRuntimeCheck;
2188-
}
2189-
21902138
Value *llvm::addDiffRuntimeChecks(
21912139
Instruction *Loc, ArrayRef<PointerDiffInfo> Checks, SCEVExpander &Expander,
21922140
function_ref<Value *(IRBuilderBase &, unsigned)> GetVF, unsigned IC) {
@@ -2201,8 +2149,7 @@ Value *llvm::addDiffRuntimeChecks(
22012149
// Map to keep track of created compares, The key is the pair of operands for
22022150
// the compare, to allow detecting and re-using redundant compares.
22032151
DenseMap<std::pair<Value *, Value *>, Value *> SeenCompares;
2204-
for (const auto &[SrcStart, SinkStart, AccessSize, NeedsFreeze,
2205-
WriteAfterRead] : Checks) {
2152+
for (const auto &[SrcStart, SinkStart, AccessSize, NeedsFreeze, _] : Checks) {
22062153
Type *Ty = SinkStart->getType();
22072154
// Compute VF * IC * AccessSize.
22082155
auto *VFTimesICTimesSize =
@@ -2211,8 +2158,8 @@ Value *llvm::addDiffRuntimeChecks(
22112158
Value *Diff =
22122159
Expander.expandCodeFor(SE.getMinusSCEV(SinkStart, SrcStart), Ty, Loc);
22132160

2214-
// Check if the same compare has already been created earlier. In that
2215-
// case, there is no need to check it again.
2161+
// Check if the same compare has already been created earlier. In that case,
2162+
// there is no need to check it again.
22162163
Value *IsConflict = SeenCompares.lookup({Diff, VFTimesICTimesSize});
22172164
if (IsConflict)
22182165
continue;

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 88 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,23 +1334,10 @@ class LoopVectorizationCostModel {
13341334
: ChosenTailFoldingStyle->second;
13351335
}
13361336

1337-
RTCheckStyle getRTCheckStyle(TailFoldingStyle TFStyle,
1338-
const TargetTransformInfo &TTI) const {
1339-
if (!TTI.useSafeEltsMask())
1340-
return RTCheckStyle::ScalarDifference;
1341-
1342-
switch (TFStyle) {
1343-
case TailFoldingStyle::Data:
1344-
case TailFoldingStyle::DataAndControlFlow:
1345-
case TailFoldingStyle::DataAndControlFlowWithoutRuntimeCheck:
1346-
return RTCheckStyle::UseSafeEltsMask;
1347-
default:
1348-
return RTCheckStyle::ScalarDifference;
1349-
}
1350-
}
1351-
13521337
RTCheckStyle getRTCheckStyle(const TargetTransformInfo &TTI) const {
1353-
return getRTCheckStyle(getTailFoldingStyle(), TTI);
1338+
if (TTI.useSafeEltsMask())
1339+
return RTCheckStyle::UseSafeEltsMask;
1340+
return RTCheckStyle::ScalarDifference;
13541341
}
13551342

13561343
/// Selects and saves TailFoldingStyle for 2 options - if IV update may
@@ -1883,10 +1870,7 @@ class GeneratedRTChecks {
18831870
"vector.memcheck");
18841871

18851872
auto DiffChecks = RtPtrChecking.getDiffChecks();
1886-
if (UseSafeEltsMask) {
1887-
MemRuntimeCheckCond = addSafeEltsRuntimeChecks(
1888-
MemCheckBlock->getTerminator(), *DiffChecks, MemCheckExp, VF);
1889-
} else if (DiffChecks) {
1873+
if (DiffChecks) {
18901874
Value *RuntimeVF = nullptr;
18911875
MemRuntimeCheckCond = addDiffRuntimeChecks(
18921876
MemCheckBlock->getTerminator(), *DiffChecks, MemCheckExp,
@@ -8585,7 +8569,7 @@ VPlanPtr LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(
85858569
std::optional<ArrayRef<PointerDiffInfo>> RTChecks =
85868570
CM.Legal->getRuntimePointerChecking()->getDiffChecks();
85878571
if (RTChecks.has_value() &&
8588-
CM.getRTCheckStyle(Style, TTI) == RTCheckStyle::UseSafeEltsMask)
8572+
CM.getRTCheckStyle(TTI) == RTCheckStyle::UseSafeEltsMask)
85898573
DiffChecks = *RTChecks;
85908574

85918575
VPlanTransforms::addActiveLaneMask(*Plan, ForControlFlow,
@@ -9008,11 +8992,91 @@ void LoopVectorizationPlanner::attachRuntimeChecks(
90088992
assert((!CM.OptForSize ||
90098993
CM.Hints->getForce() == LoopVectorizeHints::FK_Enabled) &&
90108994
"Cannot SCEV check stride or overflow when optimizing for size");
9011-
VPlanTransforms::attachCheckBlock(Plan, SCEVCheckCond, SCEVCheckBlock,
8995+
VPlanTransforms::attachCheckBlock(Plan, Plan.getOrAddLiveIn(SCEVCheckCond),
8996+
Plan.createVPIRBasicBlock(SCEVCheckBlock),
90128997
HasBranchWeights);
90138998
}
90148999
const auto &[MemCheckCond, MemCheckBlock] = RTChecks.getMemRuntimeChecks();
90159000
if (MemCheckBlock && MemCheckBlock->hasNPredecessors(0)) {
9001+
VPValue *MemCheckCondVPV = Plan.getOrAddLiveIn(MemCheckCond);
9002+
VPBasicBlock *MemCheckBlockVP = Plan.createVPIRBasicBlock(MemCheckBlock);
9003+
std::optional<ArrayRef<PointerDiffInfo>> ChecksOpt =
9004+
CM.Legal->getRuntimePointerChecking()->getDiffChecks();
9005+
9006+
// Create a mask enabling safe elements for each iteration.
9007+
if (CM.getRTCheckStyle(TTI) == RTCheckStyle::UseSafeEltsMask &&
9008+
ChecksOpt.has_value() && ChecksOpt->size() > 0) {
9009+
ArrayRef<PointerDiffInfo> Checks = *ChecksOpt;
9010+
VPRegionBlock *LoopRegion = Plan.getVectorLoopRegion();
9011+
VPBasicBlock *LoopBody = LoopRegion->getEntryBasicBlock();
9012+
VPBuilder Builder(MemCheckBlockVP);
9013+
9014+
/// Create a mask for each possibly-aliasing pointer pair, ANDing them if
9015+
/// there's more than one pair.
9016+
VPValue *AliasMask = nullptr;
9017+
for (PointerDiffInfo Check : Checks) {
9018+
VPValue *Sink =
9019+
vputils::getOrCreateVPValueForSCEVExpr(Plan, Check.SinkStart);
9020+
VPValue *Src =
9021+
vputils::getOrCreateVPValueForSCEVExpr(Plan, Check.SrcStart);
9022+
VPAliasLaneMaskRecipe *M = new VPAliasLaneMaskRecipe(
9023+
Src, Sink, Check.AccessSize, Check.WriteAfterRead);
9024+
MemCheckBlockVP->appendRecipe(M);
9025+
if (AliasMask)
9026+
AliasMask = Builder.createAnd(AliasMask, M);
9027+
else
9028+
AliasMask = M;
9029+
}
9030+
assert(AliasMask && "Expected an alias mask to have been created");
9031+
9032+
// Replace uses of the loop body's active lane mask phi with an AND of the
9033+
// phi and the alias mask.
9034+
for (VPRecipeBase &R : *LoopBody) {
9035+
auto *MaskPhi = dyn_cast<VPActiveLaneMaskPHIRecipe>(&R);
9036+
if (!MaskPhi)
9037+
continue;
9038+
VPInstruction *And = new VPInstruction(Instruction::BinaryOps::And,
9039+
{MaskPhi, AliasMask});
9040+
MaskPhi->replaceUsesWithIf(And, [And](VPUser &U, unsigned) {
9041+
auto *UR = dyn_cast<VPRecipeBase>(&U);
9042+
// If this is the first user, instert the AND.
9043+
if (UR && !And->getParent())
9044+
And->insertBefore(UR);
9045+
bool Replace = UR != And;
9046+
return Replace;
9047+
});
9048+
}
9049+
9050+
// An empty mask would cause an infinite loop since the induction variable
9051+
// is updated with the number of set elements in the mask. Make sure we
9052+
// don't execute the vector loop when the mask is empty.
9053+
VPInstruction *PopCount =
9054+
new VPInstruction(VPInstruction::PopCount, {AliasMask});
9055+
PopCount->insertAfter(AliasMask->getDefiningRecipe());
9056+
VPValue *Cmp =
9057+
Builder.createICmp(CmpInst::Predicate::ICMP_EQ, PopCount,
9058+
Plan.getOrAddLiveIn(ConstantInt::get(
9059+
IntegerType::get(Plan.getContext(), 64), 0)));
9060+
MemCheckCondVPV = Cmp;
9061+
9062+
// Update the IV by the number of active lanes in the mask.
9063+
auto *CanonicalIVPHI = LoopRegion->getCanonicalIV();
9064+
auto *CanonicalIVIncrement =
9065+
cast<VPInstruction>(CanonicalIVPHI->getBackedgeValue());
9066+
9067+
// Increment phi by correct amount.
9068+
VPValue *IncrementBy = PopCount;
9069+
Type *IVType = CanonicalIVPHI->getScalarType();
9070+
9071+
if (IVType->getScalarSizeInBits() < 64) {
9072+
Builder.setInsertPoint(CanonicalIVIncrement);
9073+
IncrementBy =
9074+
Builder.createScalarCast(Instruction::Trunc, IncrementBy, IVType,
9075+
CanonicalIVIncrement->getDebugLoc());
9076+
}
9077+
CanonicalIVIncrement->setOperand(1, IncrementBy);
9078+
}
9079+
90169080
// VPlan-native path does not do any analysis for runtime checks
90179081
// currently.
90189082
assert((!EnableVPlanNativePath || OrigLoop->isInnermost()) &&
@@ -9033,7 +9097,7 @@ void LoopVectorizationPlanner::attachRuntimeChecks(
90339097
"(e.g., adding 'restrict').";
90349098
});
90359099
}
9036-
VPlanTransforms::attachCheckBlock(Plan, MemCheckCond, MemCheckBlock,
9100+
VPlanTransforms::attachCheckBlock(Plan, MemCheckCondVPV, MemCheckBlockVP,
90379101
HasBranchWeights);
90389102
}
90399103
}
@@ -10001,9 +10065,8 @@ bool LoopVectorizePass::processLoop(Loop *L) {
1000110065
// Optimistically generate runtime checks if they are needed. Drop them if
1000210066
// they turn out to not be profitable.
1000310067
if (VF.Width.isVector() || SelectedIC > 1) {
10004-
TailFoldingStyle TFStyle = CM.getTailFoldingStyle();
1000510068
bool UseSafeEltsMask =
10006-
CM.getRTCheckStyle(TFStyle, *TTI) == RTCheckStyle::UseSafeEltsMask;
10069+
CM.getRTCheckStyle(*TTI) == RTCheckStyle::UseSafeEltsMask;
1000710070
if (UseSafeEltsMask)
1000810071
LoopsAliasMasked++;
1000910072
Checks.create(L, *LVL.getLAI(), PSE.getPredicate(), VF.Width, SelectedIC,

llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -640,11 +640,9 @@ void VPlanTransforms::createLoopRegions(VPlan &Plan) {
640640
// including memory overlap checks block and wrapping/unit-stride checks block.
641641
static constexpr uint32_t CheckBypassWeights[] = {1, 127};
642642

643-
void VPlanTransforms::attachCheckBlock(VPlan &Plan, Value *Cond,
644-
BasicBlock *CheckBlock,
643+
void VPlanTransforms::attachCheckBlock(VPlan &Plan, VPValue *CondVPV,
644+
VPBasicBlock *CheckBlockVPBB,
645645
bool AddBranchWeights) {
646-
VPValue *CondVPV = Plan.getOrAddLiveIn(Cond);
647-
VPBasicBlock *CheckBlockVPBB = Plan.createVPIRBasicBlock(CheckBlock);
648646
VPBlockBase *VectorPH = Plan.getVectorPreheader();
649647
VPBlockBase *ScalarPH = Plan.getScalarPreheader();
650648
VPBlockBase *PreVectorPH = VectorPH->getSinglePredecessor();

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2409,22 +2409,6 @@ static VPValue *addVPLaneMaskPhiAndUpdateExitBranch(
24092409
auto *VecPreheader = Plan.getVectorPreheader();
24102410
VPBuilder Builder(VecPreheader);
24112411

2412-
// Create an alias mask for each possibly-aliasing pointer pair. If there
2413-
// are multiple they are combined together with ANDs.
2414-
VPValue *AliasMask = nullptr;
2415-
2416-
for (auto C : RTChecks) {
2417-
VPValue *Sink = vputils::getOrCreateVPValueForSCEVExpr(Plan, C.SinkStart);
2418-
VPValue *Src = vputils::getOrCreateVPValueForSCEVExpr(Plan, C.SrcStart);
2419-
VPAliasLaneMaskRecipe *M =
2420-
new VPAliasLaneMaskRecipe(Src, Sink, C.AccessSize, C.WriteAfterRead);
2421-
VecPreheader->appendRecipe(M);
2422-
if (AliasMask)
2423-
AliasMask = Builder.createAnd(AliasMask, M);
2424-
else
2425-
AliasMask = M;
2426-
}
2427-
24282412
// Create the ActiveLaneMask instruction using the correct start values.
24292413
VPValue *TC = Plan.getTripCount();
24302414

@@ -2451,38 +2435,15 @@ static VPValue *addVPLaneMaskPhiAndUpdateExitBranch(
24512435
VPValue *ALMMultiplier =
24522436
Plan.getConstantInt(TopRegion->getCanonicalIVType(), 1);
24532437
auto *Mask = Builder.createNaryOp(VPInstruction::ActiveLaneMask,
2454-
{EntryIncrement, TC, ALMMultiplier}, DL,
2455-
"active.lane.mask.entry");
2438+
{EntryIncrement, TC, ALMMultiplier}, DL,
2439+
"active.lane.mask.entry");
24562440

24572441
// Now create the ActiveLaneMaskPhi recipe in the main loop using the
24582442
// preheader ActiveLaneMask instruction.
24592443
auto *LaneMaskPhi =
24602444
new VPActiveLaneMaskPHIRecipe(Mask, DebugLoc::getUnknown());
24612445
LaneMaskPhi->insertAfter(CanonicalIVPHI);
24622446
VPValue *LaneMask = LaneMaskPhi;
2463-
if (AliasMask) {
2464-
VPBuilder CountBuilder =
2465-
VPBuilder::getToInsertAfter(AliasMask->getDefiningRecipe());
2466-
VPValue *PopCount = CountBuilder.createNaryOp(VPInstruction::PopCount,
2467-
{AliasMask}, DL, "popcount");
2468-
// Increment phi by correct amount.
2469-
Builder.setInsertPoint(CanonicalIVIncrement);
2470-
2471-
VPValue *IncrementBy = PopCount;
2472-
Type *IVType = CanonicalIVPHI->getScalarType();
2473-
2474-
if (IVType->getScalarSizeInBits() < 64)
2475-
IncrementBy =
2476-
Builder.createScalarCast(Instruction::Trunc, IncrementBy, IVType,
2477-
CanonicalIVIncrement->getDebugLoc());
2478-
CanonicalIVIncrement->setOperand(1, IncrementBy);
2479-
2480-
// And the alias mask so the iteration only processes non-aliasing lanes
2481-
Builder.setInsertPoint(CanonicalIVPHI->getParent(),
2482-
CanonicalIVPHI->getParent()->getFirstNonPhi());
2483-
LaneMask = Builder.createNaryOp(Instruction::BinaryOps::And,
2484-
{LaneMaskPhi, AliasMask}, DL);
2485-
}
24862447

24872448
// Create the active lane mask for the next iteration of the loop before the
24882449
// original terminator.

llvm/lib/Transforms/Vectorize/VPlanTransforms.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ struct VPlanTransforms {
129129
/// flat CFG into a hierarchical CFG.
130130
LLVM_ABI_FOR_TEST static void createLoopRegions(VPlan &Plan);
131131

132-
/// Wrap runtime check block \p CheckBlock in a VPIRBB and \p Cond in a
133-
/// VPValue and connect the block to \p Plan, using the VPValue as branch
132+
/// Connect \p CheckBlockVPBB to \p Plan, using the \p CondVPV as branch
134133
/// condition.
135-
static void attachCheckBlock(VPlan &Plan, Value *Cond, BasicBlock *CheckBlock,
134+
static void attachCheckBlock(VPlan &Plan, VPValue *CondVPV,
135+
VPBasicBlock *CheckBlockVPBB,
136136
bool AddBranchWeights);
137137

138138
/// Replaces the VPInstructions in \p Plan with corresponding

0 commit comments

Comments
 (0)