Skip to content

Commit e60b36c

Browse files
committed
[VPlan] Rename VPlanHCFGTransforms to VPlanTransforms (NFC).
The file is intended to gather various VPlan transformations, not only CFG related transforms. Actually, the only transformation there is not CFG related. Reviewers: Ayal, gilr, hsaito, rengolin Reviewed By: gilr Differential Revision: https://reviews.llvm.org/D70732
1 parent 8843515 commit e60b36c

File tree

8 files changed

+17
-20
lines changed

8 files changed

+17
-20
lines changed

llvm/lib/Transforms/Vectorize/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ add_llvm_component_library(LLVMVectorize
66
Vectorize.cpp
77
VPlan.cpp
88
VPlanHCFGBuilder.cpp
9-
VPlanHCFGTransforms.cpp
109
VPlanPredicator.cpp
1110
VPlanSLP.cpp
11+
VPlanTransforms.cpp
1212
VPlanVerifier.cpp
1313

1414
ADDITIONAL_HEADER_DIRS

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858
#include "VPRecipeBuilder.h"
5959
#include "VPlan.h"
6060
#include "VPlanHCFGBuilder.h"
61-
#include "VPlanHCFGTransforms.h"
6261
#include "VPlanPredicator.h"
62+
#include "VPlanTransforms.h"
6363
#include "llvm/ADT/APInt.h"
6464
#include "llvm/ADT/ArrayRef.h"
6565
#include "llvm/ADT/DenseMap.h"
@@ -7262,9 +7262,8 @@ VPlanPtr LoopVectorizationPlanner::buildVPlan(VFRange &Range) {
72627262
}
72637263

72647264
SmallPtrSet<Instruction *, 1> DeadInstructions;
7265-
VPlanHCFGTransforms::VPInstructionsToVPRecipes(
7265+
VPlanTransforms::VPInstructionsToVPRecipes(
72667266
OrigLoop, Plan, Legal->getInductionVars(), DeadInstructions);
7267-
72687267
return Plan;
72697268
}
72707269

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,6 @@ class VPRecipeBase : public ilist_node_with_parent<VPRecipeBase, VPBasicBlock> {
641641
/// executed, these instructions would always form a single-def expression as
642642
/// the VPInstruction is also a single def-use vertex.
643643
class VPInstruction : public VPUser, public VPRecipeBase {
644-
friend class VPlanHCFGTransforms;
645644
friend class VPlanSlp;
646645

647646
public:

llvm/lib/Transforms/Vectorize/VPlanHCFGTransforms.cpp renamed to llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- VPlanHCFGTransforms.cpp - Utility VPlan to VPlan transforms -------===//
1+
//===-- VPlanTransforms.cpp - Utility VPlan to VPlan transforms -----------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -11,12 +11,12 @@
1111
///
1212
//===----------------------------------------------------------------------===//
1313

14-
#include "VPlanHCFGTransforms.h"
14+
#include "VPlanTransforms.h"
1515
#include "llvm/ADT/PostOrderIterator.h"
1616

1717
using namespace llvm;
1818

19-
void VPlanHCFGTransforms::VPInstructionsToVPRecipes(
19+
void VPlanTransforms::VPInstructionsToVPRecipes(
2020
Loop *OrigLoop, VPlanPtr &Plan,
2121
LoopVectorizationLegality::InductionList *Inductions,
2222
SmallPtrSetImpl<Instruction *> &DeadInstructions) {

llvm/lib/Transforms/Vectorize/VPlanHCFGTransforms.h renamed to llvm/lib/Transforms/Vectorize/VPlanTransforms.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===- VPlanHCFGTransforms.h - Utility VPlan to VPlan transforms ----------===//
1+
//===- VPlanTransforms.h - Utility VPlan to VPlan transforms --------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -10,16 +10,16 @@
1010
/// This file provides utility VPlan to VPlan transformations.
1111
//===----------------------------------------------------------------------===//
1212

13-
#ifndef LLVM_TRANSFORMS_VECTORIZE_VPLANHCFGTRANSFORMS_H
14-
#define LLVM_TRANSFORMS_VECTORIZE_VPLANHCFGTRANSFORMS_H
13+
#ifndef LLVM_TRANSFORMS_VECTORIZE_VPLANTRANSFORMS_H
14+
#define LLVM_TRANSFORMS_VECTORIZE_VPLANTRANSFORMS_H
1515

1616
#include "VPlan.h"
1717
#include "llvm/IR/Instruction.h"
1818
#include "llvm/Transforms/Vectorize/LoopVectorizationLegality.h"
1919

2020
namespace llvm {
2121

22-
class VPlanHCFGTransforms {
22+
class VPlanTransforms {
2323

2424
public:
2525
/// Replaces the VPInstructions in \p Plan with corresponding
@@ -32,4 +32,4 @@ class VPlanHCFGTransforms {
3232

3333
} // namespace llvm
3434

35-
#endif // LLVM_TRANSFORMS_VECTORIZE_VPLANHCFGTRANSFORMS_H
35+
#endif // LLVM_TRANSFORMS_VECTORIZE_VPLANTRANSFORMS_H

llvm/lib/Transforms/Vectorize/VPlanValue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class VPUser;
3737
// and live-outs which the VPlan will need to fix accordingly.
3838
class VPValue {
3939
friend class VPBuilder;
40-
friend class VPlanHCFGTransforms;
40+
friend class VPlanTransforms;
4141
friend class VPBasicBlock;
4242
friend class VPInterleavedAccessInfo;
4343

llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "../lib/Transforms/Vectorize/VPlan.h"
10-
#include "../lib/Transforms/Vectorize/VPlanHCFGTransforms.h"
10+
#include "../lib/Transforms/Vectorize/VPlanTransforms.h"
1111
#include "VPlanTestBase.h"
1212
#include "gtest/gtest.h"
1313

@@ -89,8 +89,8 @@ TEST_F(VPlanHCFGTest, testBuildHCFGInnerLoop) {
8989

9090
LoopVectorizationLegality::InductionList Inductions;
9191
SmallPtrSet<Instruction *, 1> DeadInstructions;
92-
VPlanHCFGTransforms::VPInstructionsToVPRecipes(
93-
LI->getLoopFor(LoopHeader), Plan, &Inductions, DeadInstructions);
92+
VPlanTransforms::VPInstructionsToVPRecipes(LI->getLoopFor(LoopHeader), Plan,
93+
&Inductions, DeadInstructions);
9494
}
9595

9696
TEST_F(VPlanHCFGTest, testVPInstructionToVPRecipesInner) {
@@ -119,8 +119,8 @@ TEST_F(VPlanHCFGTest, testVPInstructionToVPRecipesInner) {
119119

120120
LoopVectorizationLegality::InductionList Inductions;
121121
SmallPtrSet<Instruction *, 1> DeadInstructions;
122-
VPlanHCFGTransforms::VPInstructionsToVPRecipes(
123-
LI->getLoopFor(LoopHeader), Plan, &Inductions, DeadInstructions);
122+
VPlanTransforms::VPInstructionsToVPRecipes(LI->getLoopFor(LoopHeader), Plan,
123+
&Inductions, DeadInstructions);
124124

125125
VPBlockBase *Entry = Plan->getEntry()->getEntryBasicBlock();
126126
EXPECT_NE(nullptr, Entry->getSingleSuccessor());

llvm/unittests/Transforms/Vectorize/VPlanSlpTest.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#include "../lib/Transforms/Vectorize/VPlan.h"
1010
#include "../lib/Transforms/Vectorize/VPlanHCFGBuilder.h"
11-
#include "../lib/Transforms/Vectorize/VPlanHCFGTransforms.h"
1211
#include "VPlanTestBase.h"
1312
#include "llvm/Analysis/VectorUtils.h"
1413
#include "gtest/gtest.h"

0 commit comments

Comments
 (0)