[llvm-commits] CVS: llvm/lib/Analysis/AliasAnalysisCounter.cpp AliasAnalysisEvaluator.cpp AliasDebugger.cpp AliasSetTracker.cpp BasicAliasAnalysis.cpp CFGPrinter.cpp InstCount.cpp LoadValueNumbering.cpp ProfileInfo.cpp ProfileInfoLoaderPass.cpp ValueNumbering.cpp
Reid Spencer
reid at x10sys.com
Mon Feb 5 15:42:44 PST 2007
Changes in directory llvm/lib/Analysis:
AliasAnalysisCounter.cpp updated: 1.19 -> 1.20
AliasAnalysisEvaluator.cpp updated: 1.32 -> 1.33
AliasDebugger.cpp updated: 1.2 -> 1.3
AliasSetTracker.cpp updated: 1.45 -> 1.46
BasicAliasAnalysis.cpp updated: 1.102 -> 1.103
CFGPrinter.cpp updated: 1.21 -> 1.22
InstCount.cpp updated: 1.19 -> 1.20
LoadValueNumbering.cpp updated: 1.36 -> 1.37
ProfileInfo.cpp updated: 1.9 -> 1.10
ProfileInfoLoaderPass.cpp updated: 1.17 -> 1.18
ValueNumbering.cpp updated: 1.24 -> 1.25
---
Log message:
Make classes in anonymous namespaces use VISIBILITY_HIDDEN to help reduce
LLVM's footprint and speed up linking.
---
Diffs of the changes: (+28 -13)
AliasAnalysisCounter.cpp | 4 +++-
AliasAnalysisEvaluator.cpp | 3 ++-
AliasDebugger.cpp | 4 +++-
AliasSetTracker.cpp | 3 ++-
BasicAliasAnalysis.cpp | 2 +-
CFGPrinter.cpp | 5 +++--
InstCount.cpp | 4 +++-
LoadValueNumbering.cpp | 3 ++-
ProfileInfo.cpp | 4 +++-
ProfileInfoLoaderPass.cpp | 3 ++-
ValueNumbering.cpp | 6 ++++--
11 files changed, 28 insertions(+), 13 deletions(-)
Index: llvm/lib/Analysis/AliasAnalysisCounter.cpp
diff -u llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.19 llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.20
--- llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.19 Thu Dec 7 14:28:15 2006
+++ llvm/lib/Analysis/AliasAnalysisCounter.cpp Mon Feb 5 17:42:17 2007
@@ -17,6 +17,7 @@
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Assembly/Writer.h"
#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Compiler.h"
#include "llvm/Support/Streams.h"
using namespace llvm;
@@ -26,7 +27,8 @@
cl::opt<bool>
PrintAllFailures("count-aa-print-all-failed-queries", cl::ReallyHidden);
- class AliasAnalysisCounter : public ModulePass, public AliasAnalysis {
+ class VISIBILITY_HIDDEN AliasAnalysisCounter
+ : public ModulePass, public AliasAnalysis {
unsigned No, May, Must;
unsigned NoMR, JustRef, JustMod, MR;
const char *Name;
Index: llvm/lib/Analysis/AliasAnalysisEvaluator.cpp
diff -u llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:1.32 llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:1.33
--- llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:1.32 Thu Dec 7 14:28:15 2006
+++ llvm/lib/Analysis/AliasAnalysisEvaluator.cpp Mon Feb 5 17:42:17 2007
@@ -28,6 +28,7 @@
#include "llvm/Target/TargetData.h"
#include "llvm/Support/InstIterator.h"
#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Compiler.h"
#include "llvm/Support/Streams.h"
#include <set>
using namespace llvm;
@@ -44,7 +45,7 @@
cl::opt<bool> PrintRef("print-ref", cl::ReallyHidden);
cl::opt<bool> PrintModRef("print-modref", cl::ReallyHidden);
- class AAEval : public FunctionPass {
+ class VISIBILITY_HIDDEN AAEval : public FunctionPass {
unsigned NoAlias, MayAlias, MustAlias;
unsigned NoModRef, Mod, Ref, ModRef;
Index: llvm/lib/Analysis/AliasDebugger.cpp
diff -u llvm/lib/Analysis/AliasDebugger.cpp:1.2 llvm/lib/Analysis/AliasDebugger.cpp:1.3
--- llvm/lib/Analysis/AliasDebugger.cpp:1.2 Tue Jan 30 14:08:36 2007
+++ llvm/lib/Analysis/AliasDebugger.cpp Mon Feb 5 17:42:17 2007
@@ -23,12 +23,14 @@
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Analysis/AliasAnalysis.h"
+#include "llvm/Support/Compiler.h"
#include <set>
using namespace llvm;
namespace {
- class AliasDebugger : public ModulePass, public AliasAnalysis {
+ class VISIBILITY_HIDDEN AliasDebugger
+ : public ModulePass, public AliasAnalysis {
//What we do is simple. Keep track of every value the AA could
//know about, and verify that queries are one of those.
Index: llvm/lib/Analysis/AliasSetTracker.cpp
diff -u llvm/lib/Analysis/AliasSetTracker.cpp:1.45 llvm/lib/Analysis/AliasSetTracker.cpp:1.46
--- llvm/lib/Analysis/AliasSetTracker.cpp:1.45 Wed Dec 6 19:30:31 2006
+++ llvm/lib/Analysis/AliasSetTracker.cpp Mon Feb 5 17:42:17 2007
@@ -18,6 +18,7 @@
#include "llvm/Type.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Assembly/Writer.h"
+#include "llvm/Support/Compiler.h"
#include "llvm/Support/InstIterator.h"
#include "llvm/Support/Streams.h"
using namespace llvm;
@@ -551,7 +552,7 @@
//===----------------------------------------------------------------------===//
namespace {
- class AliasSetPrinter : public FunctionPass {
+ class VISIBILITY_HIDDEN AliasSetPrinter : public FunctionPass {
AliasSetTracker *Tracker;
public:
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp
diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.102 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.103
--- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.102 Tue Jan 30 14:08:36 2007
+++ llvm/lib/Analysis/BasicAliasAnalysis.cpp Mon Feb 5 17:42:17 2007
@@ -745,7 +745,7 @@
}
namespace {
- struct StringCompare {
+ struct VISIBILITY_HIDDEN StringCompare {
bool operator()(const char *LHS, const char *RHS) {
return strcmp(LHS, RHS) < 0;
}
Index: llvm/lib/Analysis/CFGPrinter.cpp
diff -u llvm/lib/Analysis/CFGPrinter.cpp:1.21 llvm/lib/Analysis/CFGPrinter.cpp:1.22
--- llvm/lib/Analysis/CFGPrinter.cpp:1.21 Wed Dec 6 19:30:31 2006
+++ llvm/lib/Analysis/CFGPrinter.cpp Mon Feb 5 17:42:17 2007
@@ -23,6 +23,7 @@
#include "llvm/Analysis/CFGPrinter.h"
#include "llvm/Assembly/Writer.h"
#include "llvm/Support/CFG.h"
+#include "llvm/Support/Compiler.h"
#include "llvm/Support/GraphWriter.h"
#include "llvm/Config/config.h"
#include <iosfwd>
@@ -89,7 +90,7 @@
}
namespace {
- struct CFGPrinter : public FunctionPass {
+ struct VISIBILITY_HIDDEN CFGPrinter : public FunctionPass {
virtual bool runOnFunction(Function &F) {
std::string Filename = "cfg." + F.getName() + ".dot";
cerr << "Writing '" << Filename << "'...";
@@ -113,7 +114,7 @@
RegisterPass<CFGPrinter> P1("print-cfg",
"Print CFG of function to 'dot' file");
- struct CFGOnlyPrinter : public CFGPrinter {
+ struct VISIBILITY_HIDDEN CFGOnlyPrinter : public CFGPrinter {
virtual bool runOnFunction(Function &F) {
bool OldCFGOnly = CFGOnly;
CFGOnly = true;
Index: llvm/lib/Analysis/InstCount.cpp
diff -u llvm/lib/Analysis/InstCount.cpp:1.19 llvm/lib/Analysis/InstCount.cpp:1.20
--- llvm/lib/Analysis/InstCount.cpp:1.19 Tue Dec 19 16:30:33 2006
+++ llvm/lib/Analysis/InstCount.cpp Mon Feb 5 17:42:17 2007
@@ -15,6 +15,7 @@
#include "llvm/Analysis/Passes.h"
#include "llvm/Pass.h"
#include "llvm/Function.h"
+#include "llvm/Support/Compiler.h"
#include "llvm/Support/InstVisitor.h"
#include "llvm/Support/Streams.h"
#include "llvm/ADT/Statistic.h"
@@ -33,7 +34,8 @@
namespace {
- class InstCount : public FunctionPass, public InstVisitor<InstCount> {
+ class VISIBILITY_HIDDEN InstCount
+ : public FunctionPass, public InstVisitor<InstCount> {
friend class InstVisitor<InstCount>;
void visitFunction (Function &F) { ++TotalFuncs; }
Index: llvm/lib/Analysis/LoadValueNumbering.cpp
diff -u llvm/lib/Analysis/LoadValueNumbering.cpp:1.36 llvm/lib/Analysis/LoadValueNumbering.cpp:1.37
--- llvm/lib/Analysis/LoadValueNumbering.cpp:1.36 Sun Aug 27 19:42:29 2006
+++ llvm/lib/Analysis/LoadValueNumbering.cpp Mon Feb 5 17:42:17 2007
@@ -31,6 +31,7 @@
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/Dominators.h"
#include "llvm/Support/CFG.h"
+#include "llvm/Support/Compiler.h"
#include "llvm/Target/TargetData.h"
#include <set>
#include <algorithm>
@@ -38,7 +39,7 @@
namespace {
// FIXME: This should not be a FunctionPass.
- struct LoadVN : public FunctionPass, public ValueNumbering {
+ struct VISIBILITY_HIDDEN LoadVN : public FunctionPass, public ValueNumbering {
/// Pass Implementation stuff. This doesn't do any analysis.
///
Index: llvm/lib/Analysis/ProfileInfo.cpp
diff -u llvm/lib/Analysis/ProfileInfo.cpp:1.9 llvm/lib/Analysis/ProfileInfo.cpp:1.10
--- llvm/lib/Analysis/ProfileInfo.cpp:1.9 Sun Aug 27 19:42:29 2006
+++ llvm/lib/Analysis/ProfileInfo.cpp Mon Feb 5 17:42:17 2007
@@ -16,6 +16,7 @@
#include "llvm/Analysis/ProfileInfo.h"
#include "llvm/Pass.h"
#include "llvm/Support/CFG.h"
+#include "llvm/Support/Compiler.h"
#include <set>
using namespace llvm;
@@ -82,7 +83,8 @@
//
namespace {
- struct NoProfileInfo : public ImmutablePass, public ProfileInfo {};
+ struct VISIBILITY_HIDDEN NoProfileInfo
+ : public ImmutablePass, public ProfileInfo {};
// Register this pass...
RegisterPass<NoProfileInfo>
Index: llvm/lib/Analysis/ProfileInfoLoaderPass.cpp
diff -u llvm/lib/Analysis/ProfileInfoLoaderPass.cpp:1.17 llvm/lib/Analysis/ProfileInfoLoaderPass.cpp:1.18
--- llvm/lib/Analysis/ProfileInfoLoaderPass.cpp:1.17 Wed Dec 6 19:30:31 2006
+++ llvm/lib/Analysis/ProfileInfoLoaderPass.cpp Mon Feb 5 17:42:17 2007
@@ -19,6 +19,7 @@
#include "llvm/Analysis/ProfileInfo.h"
#include "llvm/Analysis/ProfileInfoLoader.h"
#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Compiler.h"
#include "llvm/Support/Streams.h"
using namespace llvm;
@@ -28,7 +29,7 @@
cl::value_desc("filename"),
cl::desc("Profile file loaded by -profile-loader"));
- class LoaderPass : public ModulePass, public ProfileInfo {
+ class VISIBILITY_HIDDEN LoaderPass : public ModulePass, public ProfileInfo {
std::string Filename;
public:
LoaderPass(const std::string &filename = "")
Index: llvm/lib/Analysis/ValueNumbering.cpp
diff -u llvm/lib/Analysis/ValueNumbering.cpp:1.24 llvm/lib/Analysis/ValueNumbering.cpp:1.25
--- llvm/lib/Analysis/ValueNumbering.cpp:1.24 Sat Dec 23 00:05:40 2006
+++ llvm/lib/Analysis/ValueNumbering.cpp Mon Feb 5 17:42:17 2007
@@ -19,6 +19,7 @@
#include "llvm/Instructions.h"
#include "llvm/Pass.h"
#include "llvm/Type.h"
+#include "llvm/Support/Compiler.h"
using namespace llvm;
// Register the ValueNumbering interface, providing a nice name to refer to.
@@ -48,7 +49,8 @@
/// lexically identical expressions. This does not require any ahead of time
/// analysis, so it is a very fast default implementation.
///
- struct BasicVN : public ImmutablePass, public ValueNumbering {
+ struct VISIBILITY_HIDDEN BasicVN
+ : public ImmutablePass, public ValueNumbering {
/// getEqualNumberNodes - Return nodes with the same value number as the
/// specified Value. This fills in the argument vector with any equal
/// values.
@@ -69,7 +71,7 @@
/// BVNImpl - Implement BasicVN in terms of a visitor class that
/// handles the different types of instructions as appropriate.
///
- struct BVNImpl : public InstVisitor<BVNImpl> {
+ struct VISIBILITY_HIDDEN BVNImpl : public InstVisitor<BVNImpl> {
std::vector<Value*> &RetVals;
BVNImpl(std::vector<Value*> &RV) : RetVals(RV) {}
More information about the llvm-commits
mailing list