[llvm-commits] CVS: llvm/include/llvm/Analysis/DataStructure/DataStructure.h

Chris Lattner lattner at cs.uiuc.edu
Sun Sep 19 21:43:08 PDT 2004



Changes in directory llvm/include/llvm/Analysis/DataStructure:

DataStructure.h updated: 1.79 -> 1.80
---
Log message:

'Pass' should now not be derived from by clients.  Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement 
ModulePass::runOnModule.



---
Diffs of the changes:  (+7 -7)

Index: llvm/include/llvm/Analysis/DataStructure/DataStructure.h
diff -u llvm/include/llvm/Analysis/DataStructure/DataStructure.h:1.79 llvm/include/llvm/Analysis/DataStructure/DataStructure.h:1.80
--- llvm/include/llvm/Analysis/DataStructure/DataStructure.h:1.79	Wed Sep  1 17:55:34 2004
+++ llvm/include/llvm/Analysis/DataStructure/DataStructure.h	Sun Sep 19 23:42:27 2004
@@ -40,14 +40,14 @@
 // FIXME: This should be a Function pass that can be USED by a Pass, and would
 // be automatically preserved.  Until we can do that, this is a Pass.
 //
-class LocalDataStructures : public Pass {
+class LocalDataStructures : public ModulePass {
   // DSInfo, one graph for each function
   hash_map<Function*, DSGraph*> DSInfo;
   DSGraph *GlobalsGraph;
 public:
   ~LocalDataStructures() { releaseMemory(); }
 
-  virtual bool run(Module &M);
+  virtual bool runOnModule(Module &M);
 
   bool hasGraph(const Function &F) const {
     return DSInfo.find(const_cast<Function*>(&F)) != DSInfo.end();
@@ -86,7 +86,7 @@
 /// data structure graphs for all of the functions in the program.  This pass
 /// only performs a "Bottom Up" propagation (hence the name).
 ///
-class BUDataStructures : public Pass {
+class BUDataStructures : public ModulePass {
 protected:
   // DSInfo, one graph for each function
   hash_map<Function*, DSGraph*> DSInfo;
@@ -95,7 +95,7 @@
 public:
   ~BUDataStructures() { releaseMemory(); }
 
-  virtual bool run(Module &M);
+  virtual bool runOnModule(Module &M);
 
   bool hasGraph(const Function &F) const {
     return DSInfo.find(const_cast<Function*>(&F)) != DSInfo.end();
@@ -149,7 +149,7 @@
 /// for each function using the closed graphs for the callers computed
 /// by the bottom-up pass.
 ///
-class TDDataStructures : public Pass {
+class TDDataStructures : public ModulePass {
   // DSInfo, one graph for each function
   hash_map<Function*, DSGraph*> DSInfo;
   hash_set<Function*> ArgsRemainIncomplete;
@@ -157,7 +157,7 @@
 public:
   ~TDDataStructures() { releaseMyMemory(); }
 
-  virtual bool run(Module &M);
+  virtual bool runOnModule(Module &M);
 
   bool hasGraph(const Function &F) const {
     return DSInfo.find(const_cast<Function*>(&F)) != DSInfo.end();
@@ -207,7 +207,7 @@
 /// allocation.
 ///
 struct CompleteBUDataStructures : public BUDataStructures {
-  virtual bool run(Module &M);
+  virtual bool runOnModule(Module &M);
 
   bool hasGraph(const Function &F) const {
     return DSInfo.find(const_cast<Function*>(&F)) != DSInfo.end();






More information about the llvm-commits mailing list