Skip to content

Commit 03df03a

Browse files
committed
[NFC][LLVM] Namespace cleanup in Scalarizer.cpp
1 parent 1adbae9 commit 03df03a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

llvm/lib/Transforms/Scalar/Scalarizer.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ using namespace llvm;
5050

5151
#define DEBUG_TYPE "scalarizer"
5252

53-
namespace {
54-
55-
BasicBlock::iterator skipPastPhiNodesAndDbg(BasicBlock::iterator Itr) {
53+
static BasicBlock::iterator skipPastPhiNodesAndDbg(BasicBlock::iterator Itr) {
5654
BasicBlock *BB = Itr->getParent();
5755
if (isa<PHINode>(Itr))
5856
Itr = BB->getFirstInsertionPt();
@@ -76,6 +74,8 @@ using ScatterMap = std::map<std::pair<Value *, Type *>, ValueVector>;
7674
// along with a pointer to their scattered forms.
7775
using GatherList = SmallVector<std::pair<Instruction *, ValueVector *>, 16>;
7876

77+
namespace {
78+
7979
struct VectorSplit {
8080
// The type of the vector.
8181
FixedVectorType *VecTy = nullptr;
@@ -196,6 +196,7 @@ struct VectorLayout {
196196
// The size of each (non-remainder) fragment in bytes.
197197
uint64_t SplitSize = 0;
198198
};
199+
} // namespace
199200

200201
static bool isStructOfMatchingFixedVectors(Type *Ty) {
201202
if (!isa<StructType>(Ty))
@@ -268,6 +269,7 @@ static Value *concatenate(IRBuilder<> &Builder, ArrayRef<Value *> Fragments,
268269
return Res;
269270
}
270271

272+
namespace {
271273
class ScalarizerVisitor : public InstVisitor<ScalarizerVisitor, bool> {
272274
public:
273275
ScalarizerVisitor(DominatorTree *DT, const TargetTransformInfo *TTI,

0 commit comments

Comments
 (0)