We need to know the call sites each function hosts
authorChris Lattner <sabre@nondot.org>
Tue, 22 Oct 2002 15:58:23 +0000 (15:58 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 22 Oct 2002 15:58:23 +0000 (15:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4258 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/DataStructure.h
include/llvm/Analysis/DataStructure/DataStructure.h

index d44732a486349f5c202e27ffa98ead54ba0c1e91..ab140bac874e4ba670a7dae782bac3fbf232cffb 100644 (file)
@@ -65,7 +65,6 @@ public:
 // only performs a "Bottom Up" propogation (hence the name).
 //
 class BUDataStructures : public Pass {
-private:
   // DSInfo, one graph for each function
   std::map<const Function*, DSGraph*> DSInfo;
   std::map<const Function*, std::vector<DSCallSite> > CallSites;
@@ -118,6 +117,15 @@ class TDDataStructures : public Pass {
   //
   typedef std::map<const DSNode*, DSNodeHandle> BUNodeMapTy;
   std::map<const Function*, BUNodeMapTy> BUMaps;
+
+  // CallSitesForFunction - This is a temporary map that is only kept around
+  // when building the top-down closures for a program.  It traverses all of the
+  // call sites in the BU graph and holds all of the call sites that each
+  // function is the "resolving caller" for.
+  //
+  std::map<const Function*,
+           std::vector<const DSCallSite*> > CallSitesForFunction;
+
 public:
   ~TDDataStructures() { releaseMemory(); }
 
index d44732a486349f5c202e27ffa98ead54ba0c1e91..ab140bac874e4ba670a7dae782bac3fbf232cffb 100644 (file)
@@ -65,7 +65,6 @@ public:
 // only performs a "Bottom Up" propogation (hence the name).
 //
 class BUDataStructures : public Pass {
-private:
   // DSInfo, one graph for each function
   std::map<const Function*, DSGraph*> DSInfo;
   std::map<const Function*, std::vector<DSCallSite> > CallSites;
@@ -118,6 +117,15 @@ class TDDataStructures : public Pass {
   //
   typedef std::map<const DSNode*, DSNodeHandle> BUNodeMapTy;
   std::map<const Function*, BUNodeMapTy> BUMaps;
+
+  // CallSitesForFunction - This is a temporary map that is only kept around
+  // when building the top-down closures for a program.  It traverses all of the
+  // call sites in the BU graph and holds all of the call sites that each
+  // function is the "resolving caller" for.
+  //
+  std::map<const Function*,
+           std::vector<const DSCallSite*> > CallSitesForFunction;
+
 public:
   ~TDDataStructures() { releaseMemory(); }