Skip to content

Commit 47737cd

Browse files
committed
[LV] Move introduceCheckBlockInVPlan to EpilogueVectorizerMainLoop (NFC)
Move it to the sub-class that is actually using it.
1 parent 26a9339 commit 47737cd

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -552,11 +552,6 @@ class InnerLoopVectorizer {
552552
virtual void printDebugTracesAtStart() {}
553553
virtual void printDebugTracesAtEnd() {}
554554

555-
/// Introduces a new VPIRBasicBlock for \p CheckIRBB to Plan between the
556-
/// vector preheader and its predecessor, also connecting the new block to the
557-
/// scalar preheader.
558-
void introduceCheckBlockInVPlan(BasicBlock *CheckIRBB);
559-
560555
/// The original loop.
561556
Loop *OrigLoop;
562557

@@ -696,6 +691,11 @@ class EpilogueVectorizerMainLoop : public InnerLoopAndEpilogueVectorizer {
696691
BasicBlock *createVectorizedLoopSkeleton() final;
697692

698693
protected:
694+
/// Introduces a new VPIRBasicBlock for \p CheckIRBB to Plan between the
695+
/// vector preheader and its predecessor, also connecting the new block to the
696+
/// scalar preheader.
697+
void introduceCheckBlockInVPlan(BasicBlock *CheckIRBB);
698+
699699
// Create a check to see if the main vector loop should be executed
700700
Value *createIterationCountCheck(ElementCount VF, unsigned UF) const;
701701

@@ -2251,7 +2251,8 @@ static bool useMaskedInterleavedAccesses(const TargetTransformInfo &TTI) {
22512251
return TTI.enableMaskedInterleavedAccessVectorization();
22522252
}
22532253

2254-
void InnerLoopVectorizer::introduceCheckBlockInVPlan(BasicBlock *CheckIRBB) {
2254+
void EpilogueVectorizerMainLoop::introduceCheckBlockInVPlan(
2255+
BasicBlock *CheckIRBB) {
22552256
// Note: The block with the minimum trip-count check is already connected
22562257
// during earlier VPlan construction.
22572258
VPBlockBase *ScalarPH = Plan.getScalarPreheader();

0 commit comments

Comments
 (0)