Skip to content

Commit 2284ce0

Browse files
committed
[VPlan] Move using VPlanPatternMatch to top in VPlanUtils.cpp (NFC).
Only VPlan pattern matching is used in the file, move the using statement to the top level.
1 parent 0df525b commit 2284ce0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Transforms/Vectorize/VPlanUtils.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
1414

1515
using namespace llvm;
16+
using namespace llvm::VPlanPatternMatch;
1617

1718
bool vputils::onlyFirstLaneUsed(const VPValue *Def) {
1819
return all_of(Def->users(),
@@ -63,7 +64,6 @@ bool vputils::isHeaderMask(const VPValue *V, VPlan &Plan) {
6364
};
6465

6566
VPValue *A, *B;
66-
using namespace VPlanPatternMatch;
6767

6868
if (match(V, m_ActiveLaneMask(m_VPValue(A), m_VPValue(B), m_One())))
6969
return B == Plan.getTripCount() &&
@@ -90,7 +90,6 @@ const SCEV *vputils::getSCEVExprForVPValue(VPValue *V, ScalarEvolution &SE) {
9090
}
9191

9292
bool vputils::isUniformAcrossVFsAndUFs(VPValue *V) {
93-
using namespace VPlanPatternMatch;
9493
// Live-ins are uniform.
9594
if (V->isLiveIn())
9695
return true;
@@ -159,7 +158,6 @@ std::optional<VPValue *>
159158
vputils::getRecipesForUncountableExit(VPlan &Plan,
160159
SmallVectorImpl<VPRecipeBase *> &Recipes,
161160
SmallVectorImpl<VPRecipeBase *> &GEPs) {
162-
using namespace llvm::VPlanPatternMatch;
163161
// Given a VPlan like the following (just including the recipes contributing
164162
// to loop control exiting here, not the actual work), we're looking to match
165163
// the recipes contributing to the uncountable exit condition comparison

0 commit comments

Comments
 (0)