aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r--include/llvm/Analysis/AliasAnalysis.h1
-rw-r--r--include/llvm/Analysis/CallGraph.h1
-rw-r--r--include/llvm/Analysis/Dominators.h27
-rw-r--r--include/llvm/Analysis/FindUsedTypes.h3
-rw-r--r--include/llvm/Analysis/IntervalPartition.h4
-rw-r--r--include/llvm/Analysis/LoopInfo.h3
-rw-r--r--include/llvm/Analysis/LoopPass.h3
-rw-r--r--include/llvm/Analysis/PostDominators.h12
-rw-r--r--include/llvm/Analysis/ProfileInfo.h1
-rw-r--r--include/llvm/Analysis/ScalarEvolution.h3
-rw-r--r--include/llvm/Analysis/ValueNumbering.h1
11 files changed, 45 insertions, 14 deletions
diff --git a/include/llvm/Analysis/AliasAnalysis.h b/include/llvm/Analysis/AliasAnalysis.h
index f91403a..d61c886 100644
--- a/include/llvm/Analysis/AliasAnalysis.h
+++ b/include/llvm/Analysis/AliasAnalysis.h
@@ -61,6 +61,7 @@ protected:
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
public:
+ static const int ID; // Class identification, replacement for typeinfo
AliasAnalysis() : TD(0), AA(0) {}
virtual ~AliasAnalysis(); // We want to be subclassed
diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h
index 24effd8..cd27e31 100644
--- a/include/llvm/Analysis/CallGraph.h
+++ b/include/llvm/Analysis/CallGraph.h
@@ -73,6 +73,7 @@ protected:
FunctionMapTy FunctionMap; // Map from a function to its node
public:
+ static const int ID; // Class identification, replacement for typeinfo
//===---------------------------------------------------------------------
// Accessors...
//
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h
index 45eed7f..b172b79 100644
--- a/include/llvm/Analysis/Dominators.h
+++ b/include/llvm/Analysis/Dominators.h
@@ -42,9 +42,10 @@ class DominatorBase : public FunctionPass {
protected:
std::vector<BasicBlock*> Roots;
const bool IsPostDominators;
-
- inline DominatorBase(bool isPostDom) : Roots(), IsPostDominators(isPostDom) {}
+ inline DominatorBase(intptr_t ID, bool isPostDom) :
+ FunctionPass(ID), Roots(), IsPostDominators(isPostDom) {}
public:
+
/// getRoots - Return the root blocks of the current CFG. This may include
/// multiple blocks if we are computing post dominators. For forward
/// dominators, this will always be a single block (the entry node).
@@ -135,7 +136,8 @@ public:
};
public:
- DominatorTreeBase(bool isPostDom) : DominatorBase(isPostDom) {}
+ DominatorTreeBase(intptr_t ID, bool isPostDom)
+ : DominatorBase(ID, isPostDom) {}
~DominatorTreeBase() { reset(); }
virtual void releaseMemory() { reset(); }
@@ -206,7 +208,8 @@ public:
///
class DominatorTree : public DominatorTreeBase {
public:
- DominatorTree() : DominatorTreeBase(false) {}
+ static const int ID; // Pass ID, replacement for typeid
+ DominatorTree() : DominatorTreeBase((intptr_t)&ID, false) {}
BasicBlock *getRoot() const {
assert(Roots.size() == 1 && "Should always have entry node!");
@@ -264,8 +267,9 @@ template <> struct GraphTraits<DominatorTree*>
///
class ETForestBase : public DominatorBase {
public:
- ETForestBase(bool isPostDom) : DominatorBase(isPostDom), Nodes(),
- DFSInfoValid(false), SlowQueries(0) {}
+ ETForestBase(intptr_t ID, bool isPostDom)
+ : DominatorBase(ID, isPostDom), Nodes(),
+ DFSInfoValid(false), SlowQueries(0) {}
virtual void releaseMemory() { reset(); }
@@ -395,7 +399,9 @@ protected:
class ETForest : public ETForestBase {
public:
- ETForest() : ETForestBase(false) {}
+ static const int ID; // Pass identifcation, replacement for typeid
+
+ ETForest() : ETForestBase((intptr_t)&ID, false) {}
BasicBlock *getRoot() const {
assert(Roots.size() == 1 && "Should always have entry node!");
@@ -425,7 +431,8 @@ public:
protected:
DomSetMapType Frontiers;
public:
- DominanceFrontierBase(bool isPostDom) : DominatorBase(isPostDom) {}
+ DominanceFrontierBase(intptr_t ID, bool isPostDom)
+ : DominatorBase(ID, isPostDom) {}
virtual void releaseMemory() { Frontiers.clear(); }
@@ -470,7 +477,9 @@ public:
///
class DominanceFrontier : public DominanceFrontierBase {
public:
- DominanceFrontier() : DominanceFrontierBase(false) {}
+ static const int ID; // Pass ID, replacement for typeid
+ DominanceFrontier() :
+ DominanceFrontierBase((intptr_t)& ID, false) {}
BasicBlock *getRoot() const {
assert(Roots.size() == 1 && "Should always have entry node!");
diff --git a/include/llvm/Analysis/FindUsedTypes.h b/include/llvm/Analysis/FindUsedTypes.h
index 008e30c..de892f1 100644
--- a/include/llvm/Analysis/FindUsedTypes.h
+++ b/include/llvm/Analysis/FindUsedTypes.h
@@ -24,6 +24,9 @@ class Type;
class FindUsedTypes : public ModulePass {
std::set<const Type *> UsedTypes;
public:
+ static const int ID; // Pass identifcation, replacement for typeid
+ FindUsedTypes() : ModulePass((intptr_t)&ID) {}
+
/// getTypes - After the pass has been run, return the set containing all of
/// the types used in the module.
///
diff --git a/include/llvm/Analysis/IntervalPartition.h b/include/llvm/Analysis/IntervalPartition.h
index bd998e8..07f054b 100644
--- a/include/llvm/Analysis/IntervalPartition.h
+++ b/include/llvm/Analysis/IntervalPartition.h
@@ -45,7 +45,9 @@ class IntervalPartition : public FunctionPass {
std::vector<Interval*> Intervals;
public:
- IntervalPartition() : RootInterval(0) {}
+ static const int ID; // Pass identifcation, replacement for typeid
+
+ IntervalPartition() : FunctionPass((intptr_t)&ID), RootInterval(0) {}
// run - Calculate the interval partition for this function
virtual bool runOnFunction(Function &F);
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h
index 62f19e3..8e38c07 100644
--- a/include/llvm/Analysis/LoopInfo.h
+++ b/include/llvm/Analysis/LoopInfo.h
@@ -241,6 +241,9 @@ class LoopInfo : public FunctionPass {
std::vector<Loop*> TopLevelLoops;
friend class Loop;
public:
+ static const int ID; // Pass identifcation, replacement for typeid
+
+ LoopInfo() : FunctionPass((intptr_t)&ID) {}
~LoopInfo() { releaseMemory(); }
/// iterator/begin/end - The interface to the top-level loops in the current
diff --git a/include/llvm/Analysis/LoopPass.h b/include/llvm/Analysis/LoopPass.h
index 4163a09..24e6143 100644
--- a/include/llvm/Analysis/LoopPass.h
+++ b/include/llvm/Analysis/LoopPass.h
@@ -29,6 +29,8 @@ class Function;
class LoopPass : public Pass {
public:
+ LoopPass(intptr_t pid) : Pass(pid) {}
+
// runOnLoop - THis method should be implemented by the subclass to perform
// whatever action is necessary for the specfied Loop.
virtual bool runOnLoop (Loop *L, LPPassManager &LPM) = 0;
@@ -66,6 +68,7 @@ class LoopPass : public Pass {
class LPPassManager : public FunctionPass, public PMDataManager {
public:
+ static const int ID;
LPPassManager(int Depth);
/// run - Execute all of the passes scheduled for execution. Keep track of
diff --git a/include/llvm/Analysis/PostDominators.h b/include/llvm/Analysis/PostDominators.h
index 359f19d..793c7f4 100644
--- a/include/llvm/Analysis/PostDominators.h
+++ b/include/llvm/Analysis/PostDominators.h
@@ -22,7 +22,10 @@ namespace llvm {
/// compute the a post-dominator tree.
///
struct PostDominatorTree : public DominatorTreeBase {
- PostDominatorTree() : DominatorTreeBase(true) {}
+ static const int ID; // Pass identifcation, replacement for typeid
+
+ PostDominatorTree() :
+ DominatorTreeBase((intptr_t)&ID, true) {}
virtual bool runOnFunction(Function &F) {
reset(); // Reset from the last time we were run...
@@ -51,7 +54,8 @@ private:
/// PostETForest Class - Concrete subclass of ETForestBase that is used to
/// compute a forwards post-dominator ET-Forest.
struct PostETForest : public ETForestBase {
- PostETForest() : ETForestBase(true) {}
+ static const int ID;
+ PostETForest() : ETForestBase((intptr_t)&ID, true) {}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
@@ -75,7 +79,9 @@ struct PostETForest : public ETForestBase {
/// used to compute the a post-dominance frontier.
///
struct PostDominanceFrontier : public DominanceFrontierBase {
- PostDominanceFrontier() : DominanceFrontierBase(true) {}
+ static const int ID;
+ PostDominanceFrontier()
+ : DominanceFrontierBase((intptr_t) &ID, true) {}
virtual bool runOnFunction(Function &) {
Frontiers.clear();
diff --git a/include/llvm/Analysis/ProfileInfo.h b/include/llvm/Analysis/ProfileInfo.h
index 88b2ea1..dc17ac1 100644
--- a/include/llvm/Analysis/ProfileInfo.h
+++ b/include/llvm/Analysis/ProfileInfo.h
@@ -38,6 +38,7 @@ namespace llvm {
// entered.
std::map<std::pair<BasicBlock*, BasicBlock*>, unsigned> EdgeCounts;
public:
+ static const int ID; // Class identification, replacement for typeinfo
virtual ~ProfileInfo(); // We want to be subclassed
//===------------------------------------------------------------------===//
diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h
index 27d7e04..6b05714 100644
--- a/include/llvm/Analysis/ScalarEvolution.h
+++ b/include/llvm/Analysis/ScalarEvolution.h
@@ -197,7 +197,8 @@ namespace llvm {
class ScalarEvolution : public FunctionPass {
void *Impl; // ScalarEvolution uses the pimpl pattern
public:
- ScalarEvolution() : Impl(0) {}
+ static const int ID; // Pass identifcation, replacement for typeid
+ ScalarEvolution() : FunctionPass((intptr_t)&ID), Impl(0) {}
/// getSCEV - Return a SCEV expression handle for the full generality of the
/// specified expression.
diff --git a/include/llvm/Analysis/ValueNumbering.h b/include/llvm/Analysis/ValueNumbering.h
index f708f48..9d1aeb5 100644
--- a/include/llvm/Analysis/ValueNumbering.h
+++ b/include/llvm/Analysis/ValueNumbering.h
@@ -29,6 +29,7 @@ class Value;
class Instruction;
struct ValueNumbering {
+ static const int ID; // Class identification, replacement for typeinfo
virtual ~ValueNumbering(); // We want to be subclassed
/// getEqualNumberNodes - Return nodes with the same value number as the