[llvm-commits] CVS: llvm/lib/Analysis/AliasAnalysis.cpp AliasAnalysisCounter.cpp AliasAnalysisEvaluator.cpp AliasDebugger.cpp AliasSetTracker.cpp BasicAliasAnalysis.cpp CFGPrinter.cpp InstCount.cpp IntervalPartition.cpp LoadValueNumbering.cpp LoopInfo.cpp LoopPass.cpp PostDominators.cpp ProfileInfo.cpp ProfileInfoLoaderPass.cpp ScalarEvolution.cpp ValueNumbering.cpp
Devang Patel
dpatel at apple.com
Wed May 2 14:41:37 PDT 2007
Changes in directory llvm/lib/Analysis:
AliasAnalysis.cpp updated: 1.32 -> 1.33
AliasAnalysisCounter.cpp updated: 1.21 -> 1.22
AliasAnalysisEvaluator.cpp updated: 1.34 -> 1.35
AliasDebugger.cpp updated: 1.4 -> 1.5
AliasSetTracker.cpp updated: 1.47 -> 1.48
BasicAliasAnalysis.cpp updated: 1.109 -> 1.110
CFGPrinter.cpp updated: 1.23 -> 1.24
InstCount.cpp updated: 1.21 -> 1.22
IntervalPartition.cpp updated: 1.33 -> 1.34
LoadValueNumbering.cpp updated: 1.40 -> 1.41
LoopInfo.cpp updated: 1.84 -> 1.85
LoopPass.cpp updated: 1.19 -> 1.20
PostDominators.cpp updated: 1.68 -> 1.69
ProfileInfo.cpp updated: 1.13 -> 1.14
ProfileInfoLoaderPass.cpp updated: 1.19 -> 1.20
ScalarEvolution.cpp updated: 1.114 -> 1.115
ValueNumbering.cpp updated: 1.26 -> 1.27
---
Log message:
Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.
---
Diffs of the changes: (+36 -36)
AliasAnalysis.cpp | 2 +-
AliasAnalysisCounter.cpp | 4 ++--
AliasAnalysisEvaluator.cpp | 4 ++--
AliasDebugger.cpp | 4 ++--
AliasSetTracker.cpp | 4 ++--
BasicAliasAnalysis.cpp | 8 ++++----
CFGPrinter.cpp | 8 ++++----
InstCount.cpp | 4 ++--
IntervalPartition.cpp | 2 +-
LoadValueNumbering.cpp | 4 ++--
LoopInfo.cpp | 2 +-
LoopPass.cpp | 2 +-
PostDominators.cpp | 6 +++---
ProfileInfo.cpp | 6 +++---
ProfileInfoLoaderPass.cpp | 4 ++--
ScalarEvolution.cpp | 2 +-
ValueNumbering.cpp | 6 +++---
17 files changed, 36 insertions(+), 36 deletions(-)
Index: llvm/lib/Analysis/AliasAnalysis.cpp
diff -u llvm/lib/Analysis/AliasAnalysis.cpp:1.32 llvm/lib/Analysis/AliasAnalysis.cpp:1.33
--- llvm/lib/Analysis/AliasAnalysis.cpp:1.32 Wed May 2 15:37:47 2007
+++ llvm/lib/Analysis/AliasAnalysis.cpp Wed May 2 16:39:18 2007
@@ -36,7 +36,7 @@
namespace {
RegisterAnalysisGroup<AliasAnalysis> Z("Alias Analysis");
}
-const int AliasAnalysis::ID = 0;
+const char AliasAnalysis::ID = 0;
//===----------------------------------------------------------------------===//
// Default chaining methods
Index: llvm/lib/Analysis/AliasAnalysisCounter.cpp
diff -u llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.21 llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.22
--- llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.21 Tue May 1 16:15:46 2007
+++ llvm/lib/Analysis/AliasAnalysisCounter.cpp Wed May 2 16:39:18 2007
@@ -34,7 +34,7 @@
const char *Name;
Module *M;
public:
- static const int ID; // Class identification, replacement for typeinfo
+ static const char ID; // Class identification, replacement for typeinfo
AliasAnalysisCounter() : ModulePass((intptr_t) &ID) {
No = May = Must = 0;
NoMR = JustRef = JustMod = MR = 0;
@@ -108,7 +108,7 @@
}
};
- const int AliasAnalysisCounter::ID = 0;
+ const char AliasAnalysisCounter::ID = 0;
RegisterPass<AliasAnalysisCounter>
X("count-aa", "Count Alias Analysis Query Responses");
RegisterAnalysisGroup<AliasAnalysis> Y(X);
Index: llvm/lib/Analysis/AliasAnalysisEvaluator.cpp
diff -u llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:1.34 llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:1.35
--- llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:1.34 Tue May 1 16:15:46 2007
+++ llvm/lib/Analysis/AliasAnalysisEvaluator.cpp Wed May 2 16:39:18 2007
@@ -50,7 +50,7 @@
unsigned NoModRef, Mod, Ref, ModRef;
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
AAEval() : FunctionPass((intptr_t)&ID) {}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
@@ -73,7 +73,7 @@
bool doFinalization(Module &M);
};
- const int AAEval::ID = 0;
+ const char AAEval::ID = 0;
RegisterPass<AAEval>
X("aa-eval", "Exhaustive Alias Analysis Precision Evaluator");
}
Index: llvm/lib/Analysis/AliasDebugger.cpp
diff -u llvm/lib/Analysis/AliasDebugger.cpp:1.4 llvm/lib/Analysis/AliasDebugger.cpp:1.5
--- llvm/lib/Analysis/AliasDebugger.cpp:1.4 Tue May 1 16:15:46 2007
+++ llvm/lib/Analysis/AliasDebugger.cpp Wed May 2 16:39:18 2007
@@ -40,7 +40,7 @@
std::set<const Value*> Vals;
public:
- static const int ID; // Class identification, replacement for typeinfo
+ static const char ID; // Class identification, replacement for typeinfo
AliasDebugger() : ModulePass((intptr_t)&ID) {}
bool runOnModule(Module &M) {
@@ -122,7 +122,7 @@
};
- const int AliasDebugger::ID = 0;
+ const char AliasDebugger::ID = 0;
RegisterPass<AliasDebugger> X("debug-aa", "AA use debugger");
RegisterAnalysisGroup<AliasAnalysis> Y(X);
}
Index: llvm/lib/Analysis/AliasSetTracker.cpp
diff -u llvm/lib/Analysis/AliasSetTracker.cpp:1.47 llvm/lib/Analysis/AliasSetTracker.cpp:1.48
--- llvm/lib/Analysis/AliasSetTracker.cpp:1.47 Tue May 1 16:15:46 2007
+++ llvm/lib/Analysis/AliasSetTracker.cpp Wed May 2 16:39:18 2007
@@ -555,7 +555,7 @@
class VISIBILITY_HIDDEN AliasSetPrinter : public FunctionPass {
AliasSetTracker *Tracker;
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
AliasSetPrinter() : FunctionPass((intptr_t)&ID) {}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
@@ -573,6 +573,6 @@
return false;
}
};
- const int AliasSetPrinter::ID = 0;
+ const char AliasSetPrinter::ID = 0;
RegisterPass<AliasSetPrinter> X("print-alias-sets", "Alias Set Printer");
}
Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp
diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.109 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.110
--- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.109 Tue May 1 16:15:46 2007
+++ llvm/lib/Analysis/BasicAliasAnalysis.cpp Wed May 2 16:39:18 2007
@@ -36,7 +36,7 @@
/// such it doesn't follow many of the rules that other alias analyses must.
///
struct VISIBILITY_HIDDEN NoAA : public ImmutablePass, public AliasAnalysis {
- static const int ID; // Class identification, replacement for typeinfo
+ static const char ID; // Class identification, replacement for typeinfo
NoAA() : ImmutablePass((intptr_t)&ID) {}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
@@ -77,7 +77,7 @@
};
// Register this pass...
- const int NoAA::ID = 0;
+ const char NoAA::ID = 0;
RegisterPass<NoAA>
U("no-aa", "No Alias Analysis (always returns 'may' alias)");
@@ -92,7 +92,7 @@
/// Because it doesn't chain to a previous alias analysis (like -no-aa), it
/// derives from the NoAA class.
struct VISIBILITY_HIDDEN BasicAliasAnalysis : public NoAA {
- static const int ID; // Class identification, replacement for typeinfo
+ static const char ID; // Class identification, replacement for typeinfo
AliasResult alias(const Value *V1, unsigned V1Size,
const Value *V2, unsigned V2Size);
@@ -124,7 +124,7 @@
};
// Register this pass...
- const int BasicAliasAnalysis::ID = 0;
+ const char BasicAliasAnalysis::ID = 0;
RegisterPass<BasicAliasAnalysis>
X("basicaa", "Basic Alias Analysis (default AA impl)");
Index: llvm/lib/Analysis/CFGPrinter.cpp
diff -u llvm/lib/Analysis/CFGPrinter.cpp:1.23 llvm/lib/Analysis/CFGPrinter.cpp:1.24
--- llvm/lib/Analysis/CFGPrinter.cpp:1.23 Tue May 1 16:15:46 2007
+++ llvm/lib/Analysis/CFGPrinter.cpp Wed May 2 16:39:18 2007
@@ -91,7 +91,7 @@
namespace {
struct VISIBILITY_HIDDEN CFGPrinter : public FunctionPass {
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
CFGPrinter() : FunctionPass((intptr_t)&ID) {}
virtual bool runOnFunction(Function &F) {
@@ -114,12 +114,12 @@
}
};
- const int CFGPrinter::ID = 0;
+ const char CFGPrinter::ID = 0;
RegisterPass<CFGPrinter> P1("print-cfg",
"Print CFG of function to 'dot' file");
struct VISIBILITY_HIDDEN CFGOnlyPrinter : public CFGPrinter {
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
virtual bool runOnFunction(Function &F) {
bool OldCFGOnly = CFGOnly;
CFGOnly = true;
@@ -134,7 +134,7 @@
}
};
- const int CFGOnlyPrinter::ID = 0;
+ const char CFGOnlyPrinter::ID = 0;
RegisterPass<CFGOnlyPrinter>
P2("print-cfg-only",
"Print CFG of function to 'dot' file (with no function bodies)");
Index: llvm/lib/Analysis/InstCount.cpp
diff -u llvm/lib/Analysis/InstCount.cpp:1.21 llvm/lib/Analysis/InstCount.cpp:1.22
--- llvm/lib/Analysis/InstCount.cpp:1.21 Tue May 1 16:15:46 2007
+++ llvm/lib/Analysis/InstCount.cpp Wed May 2 16:39:18 2007
@@ -51,7 +51,7 @@
abort();
}
public:
- static const int ID; // Pass identifcation, replacement for typeid
+ static const char ID; // Pass identifcation, replacement for typeid
InstCount() : FunctionPass((intptr_t)&ID) {}
virtual bool runOnFunction(Function &F);
@@ -63,7 +63,7 @@
};
- const int InstCount::ID = 0;
+ const char InstCount::ID = 0;
RegisterPass<InstCount> X("instcount",
"Counts the various types of Instructions");
}
Index: llvm/lib/Analysis/IntervalPartition.cpp
diff -u llvm/lib/Analysis/IntervalPartition.cpp:1.33 llvm/lib/Analysis/IntervalPartition.cpp:1.34
--- llvm/lib/Analysis/IntervalPartition.cpp:1.33 Tue May 1 16:15:46 2007
+++ llvm/lib/Analysis/IntervalPartition.cpp Wed May 2 16:39:18 2007
@@ -15,7 +15,7 @@
#include "llvm/Analysis/IntervalIterator.h"
using namespace llvm;
-const int IntervalPartition::ID = 0;
+const char IntervalPartition::ID = 0;
static RegisterPass<IntervalPartition>
X("intervals", "Interval Partition Construction", true);
Index: llvm/lib/Analysis/LoadValueNumbering.cpp
diff -u llvm/lib/Analysis/LoadValueNumbering.cpp:1.40 llvm/lib/Analysis/LoadValueNumbering.cpp:1.41
--- llvm/lib/Analysis/LoadValueNumbering.cpp:1.40 Tue May 1 16:15:46 2007
+++ llvm/lib/Analysis/LoadValueNumbering.cpp Wed May 2 16:39:18 2007
@@ -40,7 +40,7 @@
namespace {
// FIXME: This should not be a FunctionPass.
struct VISIBILITY_HIDDEN LoadVN : public FunctionPass, public ValueNumbering {
- static const int ID; // Class identification, replacement for typeinfo
+ static const char ID; // Class identification, replacement for typeinfo
LoadVN() : FunctionPass((intptr_t)&ID) {}
/// Pass Implementation stuff. This doesn't do any analysis.
@@ -83,7 +83,7 @@
std::vector<Value*> &RetVals) const;
};
- const int LoadVN::ID = 0;
+ const char LoadVN::ID = 0;
// Register this pass...
RegisterPass<LoadVN> X("load-vn", "Load Value Numbering");
Index: llvm/lib/Analysis/LoopInfo.cpp
diff -u llvm/lib/Analysis/LoopInfo.cpp:1.84 llvm/lib/Analysis/LoopInfo.cpp:1.85
--- llvm/lib/Analysis/LoopInfo.cpp:1.84 Tue May 1 16:15:46 2007
+++ llvm/lib/Analysis/LoopInfo.cpp Wed May 2 16:39:18 2007
@@ -27,7 +27,7 @@
#include <ostream>
using namespace llvm;
-const int LoopInfo::ID = 0;
+const char LoopInfo::ID = 0;
static RegisterPass<LoopInfo>
X("loops", "Natural Loop Construction", true);
Index: llvm/lib/Analysis/LoopPass.cpp
diff -u llvm/lib/Analysis/LoopPass.cpp:1.19 llvm/lib/Analysis/LoopPass.cpp:1.20
--- llvm/lib/Analysis/LoopPass.cpp:1.19 Tue May 1 16:15:46 2007
+++ llvm/lib/Analysis/LoopPass.cpp Wed May 2 16:39:18 2007
@@ -21,7 +21,7 @@
// LPPassManager
//
-const int LPPassManager::ID = 0;
+const char LPPassManager::ID = 0;
/// LPPassManager manages FPPassManagers and CalLGraphSCCPasses.
LPPassManager::LPPassManager(int Depth)
Index: llvm/lib/Analysis/PostDominators.cpp
diff -u llvm/lib/Analysis/PostDominators.cpp:1.68 llvm/lib/Analysis/PostDominators.cpp:1.69
--- llvm/lib/Analysis/PostDominators.cpp:1.68 Tue May 1 16:15:46 2007
+++ llvm/lib/Analysis/PostDominators.cpp Wed May 2 16:39:18 2007
@@ -22,9 +22,9 @@
// PostDominatorTree Implementation
//===----------------------------------------------------------------------===//
-const int PostDominatorTree::ID = 0;
-const int PostDominanceFrontier::ID = 0;
-const int PostETForest::ID = 0;
+const char PostDominatorTree::ID = 0;
+const char PostDominanceFrontier::ID = 0;
+const char PostETForest::ID = 0;
static RegisterPass<PostDominatorTree>
F("postdomtree", "Post-Dominator Tree Construction", true);
Index: llvm/lib/Analysis/ProfileInfo.cpp
diff -u llvm/lib/Analysis/ProfileInfo.cpp:1.13 llvm/lib/Analysis/ProfileInfo.cpp:1.14
--- llvm/lib/Analysis/ProfileInfo.cpp:1.13 Wed May 2 15:37:47 2007
+++ llvm/lib/Analysis/ProfileInfo.cpp Wed May 2 16:39:18 2007
@@ -24,7 +24,7 @@
namespace {
RegisterAnalysisGroup<ProfileInfo> Z("Profile Information");
}
-const int ProfileInfo::ID = 0;
+const char ProfileInfo::ID = 0;
ProfileInfo::~ProfileInfo() {}
@@ -86,11 +86,11 @@
namespace {
struct VISIBILITY_HIDDEN NoProfileInfo
: public ImmutablePass, public ProfileInfo {
- static const int ID; // Class identification, replacement for typeinfo
+ static const char ID; // Class identification, replacement for typeinfo
NoProfileInfo() : ImmutablePass((intptr_t)&ID) {}
};
- const int NoProfileInfo::ID = 0;
+ const char NoProfileInfo::ID = 0;
// Register this pass...
RegisterPass<NoProfileInfo>
X("no-profile", "No Profile Information");
Index: llvm/lib/Analysis/ProfileInfoLoaderPass.cpp
diff -u llvm/lib/Analysis/ProfileInfoLoaderPass.cpp:1.19 llvm/lib/Analysis/ProfileInfoLoaderPass.cpp:1.20
--- llvm/lib/Analysis/ProfileInfoLoaderPass.cpp:1.19 Tue May 1 16:15:46 2007
+++ llvm/lib/Analysis/ProfileInfoLoaderPass.cpp Wed May 2 16:39:18 2007
@@ -32,7 +32,7 @@
class VISIBILITY_HIDDEN LoaderPass : public ModulePass, public ProfileInfo {
std::string Filename;
public:
- static const int ID; // Class identification, replacement for typeinfo
+ static const char ID; // Class identification, replacement for typeinfo
LoaderPass(const std::string &filename = "")
: ModulePass((intptr_t)&ID), Filename(filename) {
if (filename.empty()) Filename = ProfileInfoFilename;
@@ -50,7 +50,7 @@
virtual bool runOnModule(Module &M);
};
- const int LoaderPass::ID = 0;
+ const char LoaderPass::ID = 0;
RegisterPass<LoaderPass>
X("profile-loader", "Load profile information from llvmprof.out");
Index: llvm/lib/Analysis/ScalarEvolution.cpp
diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.114 llvm/lib/Analysis/ScalarEvolution.cpp:1.115
--- llvm/lib/Analysis/ScalarEvolution.cpp:1.114 Wed May 2 15:37:47 2007
+++ llvm/lib/Analysis/ScalarEvolution.cpp Wed May 2 16:39:18 2007
@@ -105,7 +105,7 @@
RegisterPass<ScalarEvolution>
R("scalar-evolution", "Scalar Evolution Analysis");
}
-const int ScalarEvolution::ID = 0;
+const char ScalarEvolution::ID = 0;
//===----------------------------------------------------------------------===//
// SCEV class definitions
Index: llvm/lib/Analysis/ValueNumbering.cpp
diff -u llvm/lib/Analysis/ValueNumbering.cpp:1.26 llvm/lib/Analysis/ValueNumbering.cpp:1.27
--- llvm/lib/Analysis/ValueNumbering.cpp:1.26 Tue May 1 16:15:46 2007
+++ llvm/lib/Analysis/ValueNumbering.cpp Wed May 2 16:39:18 2007
@@ -22,7 +22,7 @@
#include "llvm/Support/Compiler.h"
using namespace llvm;
-const int ValueNumbering::ID = 0;
+const char ValueNumbering::ID = 0;
// Register the ValueNumbering interface, providing a nice name to refer to.
static RegisterAnalysisGroup<ValueNumbering> X("Value Numbering");
@@ -52,7 +52,7 @@
///
struct VISIBILITY_HIDDEN BasicVN
: public ImmutablePass, public ValueNumbering {
- static const int ID; // Class identification, replacement for typeinfo
+ static const char ID; // Class identification, replacement for typeinfo
BasicVN() : ImmutablePass((intptr_t)&ID) {}
/// getEqualNumberNodes - Return nodes with the same value number as the
@@ -65,7 +65,7 @@
std::vector<Value*> &RetVals) const;
};
- const int BasicVN::ID = 0;
+ const char BasicVN::ID = 0;
// Register this pass...
RegisterPass<BasicVN>
X("basicvn", "Basic Value Numbering (default GVN impl)");
More information about the llvm-commits
mailing list