From 03df03a70777ba60cec9d6f0ab3a45106f9b949b Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Thu, 16 Oct 2025 05:52:07 -0700 Subject: [PATCH] [NFC][LLVM] Namespace cleanup in Scalarizer.cpp --- llvm/lib/Transforms/Scalar/Scalarizer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/Scalarizer.cpp b/llvm/lib/Transforms/Scalar/Scalarizer.cpp index aae5d6074ae8e..25a531ca33214 100644 --- a/llvm/lib/Transforms/Scalar/Scalarizer.cpp +++ b/llvm/lib/Transforms/Scalar/Scalarizer.cpp @@ -50,9 +50,7 @@ using namespace llvm; #define DEBUG_TYPE "scalarizer" -namespace { - -BasicBlock::iterator skipPastPhiNodesAndDbg(BasicBlock::iterator Itr) { +static BasicBlock::iterator skipPastPhiNodesAndDbg(BasicBlock::iterator Itr) { BasicBlock *BB = Itr->getParent(); if (isa(Itr)) Itr = BB->getFirstInsertionPt(); @@ -76,6 +74,8 @@ using ScatterMap = std::map, ValueVector>; // along with a pointer to their scattered forms. using GatherList = SmallVector, 16>; +namespace { + struct VectorSplit { // The type of the vector. FixedVectorType *VecTy = nullptr; @@ -196,6 +196,7 @@ struct VectorLayout { // The size of each (non-remainder) fragment in bytes. uint64_t SplitSize = 0; }; +} // namespace static bool isStructOfMatchingFixedVectors(Type *Ty) { if (!isa(Ty)) @@ -268,6 +269,7 @@ static Value *concatenate(IRBuilder<> &Builder, ArrayRef Fragments, return Res; } +namespace { class ScalarizerVisitor : public InstVisitor { public: ScalarizerVisitor(DominatorTree *DT, const TargetTransformInfo *TTI,