mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-28 05:19:42 +00:00
We need to know the call sites each function hosts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4258 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -65,7 +65,6 @@ public:
|
|||||||
// only performs a "Bottom Up" propogation (hence the name).
|
// only performs a "Bottom Up" propogation (hence the name).
|
||||||
//
|
//
|
||||||
class BUDataStructures : public Pass {
|
class BUDataStructures : public Pass {
|
||||||
private:
|
|
||||||
// DSInfo, one graph for each function
|
// DSInfo, one graph for each function
|
||||||
std::map<const Function*, DSGraph*> DSInfo;
|
std::map<const Function*, DSGraph*> DSInfo;
|
||||||
std::map<const Function*, std::vector<DSCallSite> > CallSites;
|
std::map<const Function*, std::vector<DSCallSite> > CallSites;
|
||||||
@@ -118,6 +117,15 @@ class TDDataStructures : public Pass {
|
|||||||
//
|
//
|
||||||
typedef std::map<const DSNode*, DSNodeHandle> BUNodeMapTy;
|
typedef std::map<const DSNode*, DSNodeHandle> BUNodeMapTy;
|
||||||
std::map<const Function*, BUNodeMapTy> BUMaps;
|
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:
|
public:
|
||||||
~TDDataStructures() { releaseMemory(); }
|
~TDDataStructures() { releaseMemory(); }
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ public:
|
|||||||
// only performs a "Bottom Up" propogation (hence the name).
|
// only performs a "Bottom Up" propogation (hence the name).
|
||||||
//
|
//
|
||||||
class BUDataStructures : public Pass {
|
class BUDataStructures : public Pass {
|
||||||
private:
|
|
||||||
// DSInfo, one graph for each function
|
// DSInfo, one graph for each function
|
||||||
std::map<const Function*, DSGraph*> DSInfo;
|
std::map<const Function*, DSGraph*> DSInfo;
|
||||||
std::map<const Function*, std::vector<DSCallSite> > CallSites;
|
std::map<const Function*, std::vector<DSCallSite> > CallSites;
|
||||||
@@ -118,6 +117,15 @@ class TDDataStructures : public Pass {
|
|||||||
//
|
//
|
||||||
typedef std::map<const DSNode*, DSNodeHandle> BUNodeMapTy;
|
typedef std::map<const DSNode*, DSNodeHandle> BUNodeMapTy;
|
||||||
std::map<const Function*, BUNodeMapTy> BUMaps;
|
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:
|
public:
|
||||||
~TDDataStructures() { releaseMemory(); }
|
~TDDataStructures() { releaseMemory(); }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user