diff options
author | Chris Lattner <sabre@nondot.org> | 2003-07-02 04:37:48 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-07-02 04:37:48 +0000 |
commit | 5a3d63d5aada72f3ca8818445c5f5a625fe85ce6 (patch) | |
tree | 5373b5358136130b44f616456873bc9519c07dc3 /llvm/lib/Analysis/DataStructure | |
parent | 3ff99e3731fcfff59fa90cec3cf76f7acfeff644 (diff) | |
download | llvm-5a3d63d5aada72f3ca8818445c5f5a625fe85ce6.zip llvm-5a3d63d5aada72f3ca8818445c5f5a625fe85ce6.tar.gz llvm-5a3d63d5aada72f3ca8818445c5f5a625fe85ce6.tar.bz2 |
Make the BU closure keep track of which actual calls happen
Minor cleanups
llvm-svn: 7059
Diffstat (limited to 'llvm/lib/Analysis/DataStructure')
-rw-r--r-- | llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp b/llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp index e2c44c8..c449997 100644 --- a/llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp +++ b/llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp @@ -173,6 +173,9 @@ unsigned BUDataStructures::calculateGraphs(Function *F, } } + // Clean up the graph before we start inlining a bunch again... + SCCGraph->removeTriviallyDeadNodes(); + // Now that we have one big happy family, resolve all of the call sites in // the graph... calculateGraph(*SCCGraph); @@ -232,8 +235,7 @@ void BUDataStructures::calculateGraph(DSGraph &Graph) { // Resolve the current call... Function *Callee = *I; - const DSCallSite &CS = I.getCallSite(); - ActualCallees.insert(std::make_pair(&CS.getCallInst(), Callee)); + DSCallSite CS = I.getCallSite(); if (Callee->isExternal()) { // Ignore this case, simple varargs functions we cannot stub out! @@ -246,6 +248,8 @@ void BUDataStructures::calculateGraph(DSGraph &Graph) { Graph.mergeInGraph(CS, *Callee, Graph, 0); } else { + ActualCallees.insert(std::make_pair(&CS.getCallInst(), Callee)); + // Get the data structure graph for the called function. // DSGraph &GI = getDSGraph(*Callee); // Graph to inline |