[llvm-commits] CVS: llvm/include/llvm/Analysis/DataStructure/DataStructure.h
Chris Lattner
lattner at cs.uiuc.edu
Sun Mar 20 20:46:51 PST 2005
Changes in directory llvm/include/llvm/Analysis/DataStructure:
DataStructure.h updated: 1.86 -> 1.87
---
Log message:
rename a method add a data structure.
---
Diffs of the changes: (+21 -1)
DataStructure.h | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletion(-)
Index: llvm/include/llvm/Analysis/DataStructure/DataStructure.h
diff -u llvm/include/llvm/Analysis/DataStructure/DataStructure.h:1.86 llvm/include/llvm/Analysis/DataStructure/DataStructure.h:1.87
--- llvm/include/llvm/Analysis/DataStructure/DataStructure.h:1.86 Sat Mar 19 16:12:33 2005
+++ llvm/include/llvm/Analysis/DataStructure/DataStructure.h Sun Mar 20 22:46:35 2005
@@ -26,6 +26,7 @@
class Instruction;
class GlobalValue;
class DSGraph;
+class DSCallSite;
class DSNode;
class DSNodeHandle;
@@ -181,6 +182,25 @@
/// GlobalECs - The equivalence classes for each global value that is merged
/// with other global values in the DSGraphs.
EquivalenceClasses<GlobalValue*> GlobalECs;
+
+ /// CallerCallEdges - For a particular graph, we keep a list of these records
+ /// which indicates which graphs call this function and from where.
+ struct CallerCallEdge {
+ DSGraph *CallerGraph; // The graph of the caller function.
+ const DSCallSite *CS; // The actual call site.
+ Function *CalledFunction; // The actual function being called.
+
+ CallerCallEdge(DSGraph *G, const DSCallSite *cs, Function *CF)
+ : CallerGraph(G), CS(cs), CalledFunction(CF) {}
+
+ bool operator<(const CallerCallEdge &RHS) const {
+ return CallerGraph < RHS.CallerGraph ||
+ (CallerGraph == RHS.CallerGraph && CS < RHS.CS);
+ }
+ };
+
+ std::map<DSGraph*, std::vector<CallerCallEdge> > CallerEdges;
+
public:
~TDDataStructures() { releaseMyMemory(); }
@@ -227,7 +247,7 @@
void markReachableFunctionsExternallyAccessible(DSNode *N,
hash_set<DSNode*> &Visited);
- void inlineGraphIntoCallees(DSGraph &G);
+ void InlineCallersIntoGraph(DSGraph &G);
DSGraph &getOrCreateDSGraph(Function &F);
void ComputePostOrder(Function &F, hash_set<DSGraph*> &Visited,
std::vector<DSGraph*> &PostOrder,
More information about the llvm-commits
mailing list