[llvm-commits] [poolalloc] r74891 - /poolalloc/trunk/include/dsa/DataStructure.h

Haohui Mai mai4 at uiuc.edu
Mon Jul 6 20:42:28 PDT 2009


Author: mai4
Date: Mon Jul  6 22:42:27 2009
New Revision: 74891

URL: http://llvm.org/viewvc/llvm-project?rev=74891&view=rev
Log:
Add the declaration of Steensgaard DSA pass.


Modified:
    poolalloc/trunk/include/dsa/DataStructure.h

Modified: poolalloc/trunk/include/dsa/DataStructure.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DataStructure.h?rev=74891&r1=74890&r2=74891&view=diff

==============================================================================
--- poolalloc/trunk/include/dsa/DataStructure.h (original)
+++ poolalloc/trunk/include/dsa/DataStructure.h Mon Jul  6 22:42:27 2009
@@ -410,6 +410,46 @@
   {}
 };
 
+/// SteensgaardsDataStructures - Analysis that computes a context-insensitive
+/// data structure graphs for the whole program.
+///
+class SteensgaardDataStructures : public DataStructures {
+  DSGraph * ResultGraph;
+  DataStructures * DS;
+  void ResolveFunctionCall(const Function *F, const DSCallSite &Call,
+                             DSNodeHandle &RetVal);
+  bool runOnModuleInternal(Module &M);
+
+public:
+  static char ID;
+  SteensgaardDataStructures() : 
+    DataStructures((intptr_t)&ID, "steensgaard."),
+    ResultGraph(NULL) {}
+  ~SteensgaardDataStructures();
+  virtual bool runOnModule(Module &M);
+  virtual void releaseMyMemory();
+
+  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+    AU.addRequired<StdLibDataStructures>();
+    AU.setPreservesAll();
+  }
+  
+  /// getDSGraph - Return the data structure graph for the specified function.
+  ///
+  DSGraph *getDSGraph(const Function &F) const {
+    return ResultGraph;
+  }
+
+  /// getDSGraph - Return the data structure graph for the whole program.
+  ///
+  DSGraph *getResultGraph() const {
+    return ResultGraph;
+  }
+
+  void print(OStream O, const Module *M) const;
+  void print(std::ostream &O, const Module *M) const;
+
+};
 
 
 } // End llvm namespace





More information about the llvm-commits mailing list