[llvm] 4b87d58 - [NFC][LLVM] Namespace cleanup in Scalarizer.cpp (#163766)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 16 10:15:59 PDT 2025
Author: Rahul Joshi
Date: 2025-10-16T10:15:55-07:00
New Revision: 4b87d5861d7b290606531fda465b1fe8f6aa6e17
URL: https://github.com/llvm/llvm-project/commit/4b87d5861d7b290606531fda465b1fe8f6aa6e17
DIFF: https://github.com/llvm/llvm-project/commit/4b87d5861d7b290606531fda465b1fe8f6aa6e17.diff
LOG: [NFC][LLVM] Namespace cleanup in Scalarizer.cpp (#163766)
Added:
Modified:
llvm/lib/Transforms/Scalar/Scalarizer.cpp
Removed:
################################################################################
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<PHINode>(Itr))
Itr = BB->getFirstInsertionPt();
@@ -76,6 +74,8 @@ using ScatterMap = std::map<std::pair<Value *, Type *>, ValueVector>;
// along with a pointer to their scattered forms.
using GatherList = SmallVector<std::pair<Instruction *, ValueVector *>, 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<StructType>(Ty))
@@ -268,6 +269,7 @@ static Value *concatenate(IRBuilder<> &Builder, ArrayRef<Value *> Fragments,
return Res;
}
+namespace {
class ScalarizerVisitor : public InstVisitor<ScalarizerVisitor, bool> {
public:
ScalarizerVisitor(DominatorTree *DT, const TargetTransformInfo *TTI,
More information about the llvm-commits
mailing list