summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-11-16 09:01:28 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-11-16 09:01:28 +0000
commit83709b1c1e149cd322eb45ac5efc5c40324dd2d2 (patch)
tree8540112c4650369e794f111f89b80e07a6619518
parent7467461ccc092a786cc2c85a8ea36af6e8b1e2a7 (diff)
downloadbcm5719-llvm-83709b1c1e149cd322eb45ac5efc5c40324dd2d2.tar.gz
bcm5719-llvm-83709b1c1e149cd322eb45ac5efc5c40324dd2d2.zip
Move helper classes into anonymous namespaces. NFC.
llvm-svn: 253189
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp4
-rw-r--r--llvm/lib/Transforms/IPO/MergeFunctions.cpp2
2 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index c2db02fe85a..5f927121fc2 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -3626,6 +3626,7 @@ ScalarEvolution::ForgetSymbolicName(Instruction *PN, const SCEV *SymName) {
}
}
+namespace {
class SCEVInitRewriter : public SCEVRewriteVisitor<SCEVInitRewriter> {
public:
static const SCEV *rewrite(const SCEV *Scev, const Loop *L,
@@ -3690,6 +3691,7 @@ private:
const Loop *L;
bool Valid;
};
+} // end anonymous namespace
const SCEV *ScalarEvolution::createAddRecFromPHI(PHINode *PN) {
const Loop *L = LI.getLoopFor(PN->getParent());
@@ -9614,6 +9616,7 @@ ScalarEvolution::getEqualPredicate(const SCEVUnknown *LHS,
return Eq;
}
+namespace {
class SCEVPredicateRewriter : public SCEVRewriteVisitor<SCEVPredicateRewriter> {
public:
static const SCEV *rewrite(const SCEV *Scev, ScalarEvolution &SE,
@@ -9638,6 +9641,7 @@ public:
private:
SCEVUnionPredicate &P;
};
+} // end anonymous namespace
const SCEV *ScalarEvolution::rewriteUsingPredicate(const SCEV *Scev,
SCEVUnionPredicate &Preds) {
diff --git a/llvm/lib/Transforms/IPO/MergeFunctions.cpp b/llvm/lib/Transforms/IPO/MergeFunctions.cpp
index bb75ab6ece1..fb37bcd42ed 100644
--- a/llvm/lib/Transforms/IPO/MergeFunctions.cpp
+++ b/llvm/lib/Transforms/IPO/MergeFunctions.cpp
@@ -1249,6 +1249,7 @@ int FunctionComparator::compare() {
return 0;
}
+namespace {
// Accumulate the hash of a sequence of 64-bit integers. This is similar to a
// hash of a sequence of 64bit ints, but the entire input does not need to be
// available at once. This interface is necessary for functionHash because it
@@ -1267,6 +1268,7 @@ public:
// No finishing is required, because the entire hash value is used.
uint64_t getHash() { return Hash; }
};
+} // end anonymous namespace
// A function hash is calculated by considering only the number of arguments and
// whether a function is varargs, the order of basic blocks (given by the
OpenPOWER on IntegriCloud