[llvm-commits] CVS: llvm/lib/Analysis/AliasAnalysis.cpp AliasAnalysisCounter.cpp AliasAnalysisEvaluator.cpp AliasSetTracker.cpp BasicAliasAnalysis.cpp CFGPrinter.cpp Expressions.cpp InductionVariable.cpp InstCount.cpp Interval.cpp IntervalPartition.cpp LoadValueNumbering.cpp LoopInfo.cpp PostDominators.cpp PrintSCC.cpp ValueNumbering.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Tue Nov 11 16:45:27 PST 2003
Changes in directory llvm/lib/Analysis:
AliasAnalysis.cpp updated: 1.14 -> 1.15
AliasAnalysisCounter.cpp updated: 1.5 -> 1.6
AliasAnalysisEvaluator.cpp updated: 1.8 -> 1.9
AliasSetTracker.cpp updated: 1.7 -> 1.8
BasicAliasAnalysis.cpp updated: 1.15 -> 1.16
CFGPrinter.cpp updated: 1.3 -> 1.4
Expressions.cpp updated: 1.37 -> 1.38
InductionVariable.cpp updated: 1.31 -> 1.32
InstCount.cpp updated: 1.6 -> 1.7
Interval.cpp updated: 1.14 -> 1.15
IntervalPartition.cpp updated: 1.23 -> 1.24
LoadValueNumbering.cpp updated: 1.9 -> 1.10
LoopInfo.cpp updated: 1.44 -> 1.45
PostDominators.cpp updated: 1.44 -> 1.45
PrintSCC.cpp updated: 1.8 -> 1.9
ValueNumbering.cpp updated: 1.6 -> 1.7
---
Log message:
Put all LLVM code into the llvm namespace, as per bug 109.
---
Diffs of the changes: (+62 -11)
Index: llvm/lib/Analysis/AliasAnalysis.cpp
diff -u llvm/lib/Analysis/AliasAnalysis.cpp:1.14 llvm/lib/Analysis/AliasAnalysis.cpp:1.15
--- llvm/lib/Analysis/AliasAnalysis.cpp:1.14 Mon Oct 20 14:43:04 2003
+++ llvm/lib/Analysis/AliasAnalysis.cpp Tue Nov 11 16:41:31 2003
@@ -29,6 +29,8 @@
#include "llvm/iMemory.h"
#include "llvm/Target/TargetData.h"
+namespace llvm {
+
// Register the AliasAnalysis interface, providing a nice name to refer to.
namespace {
RegisterAnalysisGroup<AliasAnalysis> Z("Alias Analysis");
@@ -123,3 +125,5 @@
// Declare that we implement the AliasAnalysis interface
RegisterAnalysisGroup<AliasAnalysis, NoAA> Y;
} // End of anonymous namespace
+
+} // End llvm namespace
Index: llvm/lib/Analysis/AliasAnalysisCounter.cpp
diff -u llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.5 llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.6
--- llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.5 Mon Oct 20 14:43:04 2003
+++ llvm/lib/Analysis/AliasAnalysisCounter.cpp Tue Nov 11 16:41:31 2003
@@ -16,6 +16,8 @@
#include "llvm/Pass.h"
#include <iostream>
+namespace llvm {
+
namespace {
class AliasAnalysisCounter : public Pass, public AliasAnalysis {
unsigned No, May, Must;
@@ -108,3 +110,5 @@
X("count-aa", "Count Alias Analysis Query Responses");
RegisterAnalysisGroup<AliasAnalysis, AliasAnalysisCounter> Y;
}
+
+} // End llvm namespace
Index: llvm/lib/Analysis/AliasAnalysisEvaluator.cpp
diff -u llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:1.8 llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:1.9
--- llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:1.8 Mon Oct 20 14:43:04 2003
+++ llvm/lib/Analysis/AliasAnalysisEvaluator.cpp Tue Nov 11 16:41:31 2003
@@ -26,6 +26,8 @@
#include "Support/CommandLine.h"
#include <set>
+namespace llvm {
+
namespace {
cl::opt<bool> PrintNo ("print-no-aliases", cl::ReallyHidden);
cl::opt<bool> PrintMay ("print-may-aliases", cl::ReallyHidden);
@@ -114,3 +116,5 @@
<< May*100/Sum << "%/" << Must*100/Sum<<"%\n";
return false;
}
+
+} // End llvm namespace
Index: llvm/lib/Analysis/AliasSetTracker.cpp
diff -u llvm/lib/Analysis/AliasSetTracker.cpp:1.7 llvm/lib/Analysis/AliasSetTracker.cpp:1.8
--- llvm/lib/Analysis/AliasSetTracker.cpp:1.7 Mon Oct 20 14:43:04 2003
+++ llvm/lib/Analysis/AliasSetTracker.cpp Tue Nov 11 16:41:31 2003
@@ -21,6 +21,8 @@
#include "llvm/Assembly/Writer.h"
#include "llvm/Support/InstIterator.h"
+namespace llvm {
+
/// mergeSetIn - Merge the specified alias set into this alias set...
///
void AliasSet::mergeSetIn(AliasSet &AS) {
@@ -294,7 +296,6 @@
void AliasSet::dump() const { print (std::cerr); }
void AliasSetTracker::dump() const { print(std::cerr); }
-
//===----------------------------------------------------------------------===//
// AliasSetPrinter Pass
//===----------------------------------------------------------------------===//
@@ -328,3 +329,5 @@
RegisterPass<AliasSetPrinter> X("print-alias-sets", "Alias Set Printer",
PassInfo::Analysis | PassInfo::Optimization);
}
+
+} // End llvm namespace
Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp
diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.15 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.16
--- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.15 Mon Oct 20 14:43:04 2003
+++ llvm/lib/Analysis/BasicAliasAnalysis.cpp Tue Nov 11 16:41:31 2003
@@ -23,10 +23,11 @@
#include "llvm/DerivedTypes.h"
#include "llvm/Target/TargetData.h"
+namespace llvm {
+
// Make sure that anything that uses AliasAnalysis pulls in this file...
void BasicAAStub() {}
-
namespace {
struct BasicAliasAnalysis : public ImmutablePass, public AliasAnalysis {
@@ -60,8 +61,6 @@
InitializeAliasAnalysis(this);
}
-
-
// hasUniqueAddress - Return true if the specified value points to something
// with a unique, discernable, address.
static inline bool hasUniqueAddress(const Value *V) {
@@ -364,3 +363,4 @@
return MayAlias;
}
+} // End llvm namespace
Index: llvm/lib/Analysis/CFGPrinter.cpp
diff -u llvm/lib/Analysis/CFGPrinter.cpp:1.3 llvm/lib/Analysis/CFGPrinter.cpp:1.4
--- llvm/lib/Analysis/CFGPrinter.cpp:1.3 Wed Oct 22 11:30:58 2003
+++ llvm/lib/Analysis/CFGPrinter.cpp Tue Nov 11 16:41:31 2003
@@ -26,6 +26,8 @@
#include <sstream>
#include <fstream>
+namespace llvm {
+
/// CFGOnly flag - This is used to control whether or not the CFG graph printer
/// prints out the contents of basic blocks or not. This is acceptable because
/// this code is only really used for debugging purposes.
@@ -112,9 +114,6 @@
"Print CFG of function to 'dot' file");
};
-
-
-
/// viewCFG - This function is meant for use from the debugger. You can just
/// say 'call F->viewCFG()' and a ghostview window should pop up from the
/// program, displaying the CFG of the current function. This depends on there
@@ -154,3 +153,5 @@
viewCFG();
CFGOnly = false;
}
+
+} // End llvm namespace
Index: llvm/lib/Analysis/Expressions.cpp
diff -u llvm/lib/Analysis/Expressions.cpp:1.37 llvm/lib/Analysis/Expressions.cpp:1.38
--- llvm/lib/Analysis/Expressions.cpp:1.37 Mon Oct 20 14:43:04 2003
+++ llvm/lib/Analysis/Expressions.cpp Tue Nov 11 16:41:31 2003
@@ -18,6 +18,8 @@
#include "llvm/ConstantHandling.h"
#include "llvm/Function.h"
+namespace llvm {
+
ExprType::ExprType(Value *Val) {
if (Val)
if (ConstantInt *CPI = dyn_cast<ConstantInt>(Val)) {
@@ -352,3 +354,5 @@
// Otherwise, I don't know anything about this value!
return I;
}
+
+} // End llvm namespace
Index: llvm/lib/Analysis/InductionVariable.cpp
diff -u llvm/lib/Analysis/InductionVariable.cpp:1.31 llvm/lib/Analysis/InductionVariable.cpp:1.32
--- llvm/lib/Analysis/InductionVariable.cpp:1.31 Mon Oct 20 14:43:04 2003
+++ llvm/lib/Analysis/InductionVariable.cpp Tue Nov 11 16:41:31 2003
@@ -36,6 +36,8 @@
#include "llvm/Assembly/Writer.h"
#include "Support/Debug.h"
+namespace llvm {
+
static bool isLoopInvariant(const Value *V, const Loop *L) {
if (const Instruction *I = dyn_cast<Instruction>(V))
return !L->contains(I->getParent());
@@ -299,3 +301,5 @@
}
o << "\n";
}
+
+} // End llvm namespace
Index: llvm/lib/Analysis/InstCount.cpp
diff -u llvm/lib/Analysis/InstCount.cpp:1.6 llvm/lib/Analysis/InstCount.cpp:1.7
--- llvm/lib/Analysis/InstCount.cpp:1.6 Mon Oct 20 14:43:04 2003
+++ llvm/lib/Analysis/InstCount.cpp Tue Nov 11 16:41:31 2003
@@ -16,6 +16,8 @@
#include "llvm/Support/InstVisitor.h"
#include "Support/Statistic.h"
+namespace llvm {
+
namespace {
Statistic<> TotalInsts ("instcount", "Number of instructions (of all types)");
Statistic<> TotalBlocks("instcount", "Number of basic blocks");
@@ -62,3 +64,5 @@
visit(F);
return false;
}
+
+} // End llvm namespace
Index: llvm/lib/Analysis/Interval.cpp
diff -u llvm/lib/Analysis/Interval.cpp:1.14 llvm/lib/Analysis/Interval.cpp:1.15
--- llvm/lib/Analysis/Interval.cpp:1.14 Mon Oct 20 14:43:04 2003
+++ llvm/lib/Analysis/Interval.cpp Tue Nov 11 16:41:31 2003
@@ -17,6 +17,8 @@
#include "llvm/Support/CFG.h"
#include <algorithm>
+using namespace llvm;
+
//===----------------------------------------------------------------------===//
// Interval Implementation
//===----------------------------------------------------------------------===//
Index: llvm/lib/Analysis/IntervalPartition.cpp
diff -u llvm/lib/Analysis/IntervalPartition.cpp:1.23 llvm/lib/Analysis/IntervalPartition.cpp:1.24
--- llvm/lib/Analysis/IntervalPartition.cpp:1.23 Mon Oct 20 14:43:04 2003
+++ llvm/lib/Analysis/IntervalPartition.cpp Tue Nov 11 16:41:31 2003
@@ -15,6 +15,8 @@
#include "llvm/Analysis/IntervalIterator.h"
#include "Support/STLExtras.h"
+namespace llvm {
+
static RegisterAnalysis<IntervalPartition>
X("intervals", "Interval Partition Construction", true);
@@ -108,3 +110,5 @@
for_each(Intervals.begin(), Intervals.end(),
bind_obj(this, &IntervalPartition::updatePredecessors));
}
+
+} // End llvm namespace
Index: llvm/lib/Analysis/LoadValueNumbering.cpp
diff -u llvm/lib/Analysis/LoadValueNumbering.cpp:1.9 llvm/lib/Analysis/LoadValueNumbering.cpp:1.10
--- llvm/lib/Analysis/LoadValueNumbering.cpp:1.9 Mon Oct 20 14:43:04 2003
+++ llvm/lib/Analysis/LoadValueNumbering.cpp Tue Nov 11 16:41:31 2003
@@ -31,6 +31,8 @@
#include <algorithm>
#include <set>
+namespace llvm {
+
namespace {
// FIXME: This should not be a FunctionPass.
struct LoadVN : public FunctionPass, public ValueNumbering {
@@ -70,8 +72,6 @@
RegisterAnalysisGroup<ValueNumbering, LoadVN> Y;
}
-
-
Pass *createLoadValueNumberingPass() { return new LoadVN(); }
@@ -340,3 +340,5 @@
return true;
}
}
+
+} // End llvm namespace
Index: llvm/lib/Analysis/LoopInfo.cpp
diff -u llvm/lib/Analysis/LoopInfo.cpp:1.44 llvm/lib/Analysis/LoopInfo.cpp:1.45
--- llvm/lib/Analysis/LoopInfo.cpp:1.44 Wed Oct 22 11:41:21 2003
+++ llvm/lib/Analysis/LoopInfo.cpp Tue Nov 11 16:41:31 2003
@@ -21,6 +21,8 @@
#include "Support/DepthFirstIterator.h"
#include <algorithm>
+namespace llvm {
+
static RegisterAnalysis<LoopInfo>
X("loops", "Natural Loop Construction", true);
@@ -367,3 +369,5 @@
I = std::find(I+1, ExitBlocks.end(), Old);
}
}
+
+} // End llvm namespace
Index: llvm/lib/Analysis/PostDominators.cpp
diff -u llvm/lib/Analysis/PostDominators.cpp:1.44 llvm/lib/Analysis/PostDominators.cpp:1.45
--- llvm/lib/Analysis/PostDominators.cpp:1.44 Mon Oct 20 14:43:04 2003
+++ llvm/lib/Analysis/PostDominators.cpp Tue Nov 11 16:41:31 2003
@@ -17,6 +17,8 @@
#include "Support/DepthFirstIterator.h"
#include "Support/SetOperations.h"
+namespace llvm {
+
//===----------------------------------------------------------------------===//
// PostDominatorSet Implementation
//===----------------------------------------------------------------------===//
@@ -214,3 +216,5 @@
// stub - a dummy function to make linking work ok.
void PostDominanceFrontier::stub() {
}
+
+} // End llvm namespace
Index: llvm/lib/Analysis/PrintSCC.cpp
diff -u llvm/lib/Analysis/PrintSCC.cpp:1.8 llvm/lib/Analysis/PrintSCC.cpp:1.9
--- llvm/lib/Analysis/PrintSCC.cpp:1.8 Mon Oct 20 14:43:04 2003
+++ llvm/lib/Analysis/PrintSCC.cpp Tue Nov 11 16:41:31 2003
@@ -31,6 +31,8 @@
#include "llvm/Support/CFG.h"
#include "Support/SCCIterator.h"
+namespace llvm {
+
namespace {
struct CFGSCC : public FunctionPass {
bool runOnFunction(Function& func);
@@ -101,3 +103,5 @@
return true;
}
+
+} // End llvm namespace
Index: llvm/lib/Analysis/ValueNumbering.cpp
diff -u llvm/lib/Analysis/ValueNumbering.cpp:1.6 llvm/lib/Analysis/ValueNumbering.cpp:1.7
--- llvm/lib/Analysis/ValueNumbering.cpp:1.6 Mon Oct 20 14:43:04 2003
+++ llvm/lib/Analysis/ValueNumbering.cpp Tue Nov 11 16:41:31 2003
@@ -19,6 +19,8 @@
#include "llvm/Type.h"
#include "llvm/iMemory.h"
+namespace llvm {
+
// Register the ValueNumbering interface, providing a nice name to refer to.
static RegisterAnalysisGroup<ValueNumbering> X("Value Numbering");
@@ -39,6 +41,7 @@
// into the tool that uses it. As such, we register and implement the class
// here.
//
+
namespace {
/// BasicVN - This class is the default implementation of the ValueNumbering
/// interface. It walks the SSA def-use chains to trivially identify
@@ -62,9 +65,7 @@
// Declare that we implement the ValueNumbering interface
RegisterAnalysisGroup<ValueNumbering, BasicVN, true> Y;
-} // End of anonymous namespace
-namespace {
/// BVNImpl - Implement BasicVN in terms of a visitor class that
/// handles the different types of instructions as appropriate.
///
@@ -190,3 +191,5 @@
RetVals.push_back(Other);
}
}
+
+} // End llvm namespace
More information about the llvm-commits
mailing list