summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2006-06-19 18:23:36 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2006-06-19 18:23:36 +0000
commitab390d045a5cd232ff6c89ad1c35eff7297cc419 (patch)
treeb5c9dee7c96291d2bcead333787ef6541c88bd32 /include/llvm/Analysis
parent067ef412bbc915d0756f28b09a449e7ccc2d369d (diff)
downloadllvm-ab390d045a5cd232ff6c89ad1c35eff7297cc419.tar.gz
llvm-ab390d045a5cd232ff6c89ad1c35eff7297cc419.tar.bz2
llvm-ab390d045a5cd232ff6c89ad1c35eff7297cc419.tar.xz
Do partial inlining in BU. This resolves more call sites. Also add options to merge in globals during recursion and to back annotate DSNodes when function pointers are resolved. This makes PA work for a whole lot more things (unresolved call sites being what has been killing various DSA based passes)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28859 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r--include/llvm/Analysis/DataStructure/DataStructure.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/llvm/Analysis/DataStructure/DataStructure.h b/include/llvm/Analysis/DataStructure/DataStructure.h
index 15caec5c3a..1a9a855735 100644
--- a/include/llvm/Analysis/DataStructure/DataStructure.h
+++ b/include/llvm/Analysis/DataStructure/DataStructure.h
@@ -116,6 +116,9 @@ protected:
/// GlobalECs - The equivalence classes for each global value that is merged
/// with other global values in the DSGraphs.
EquivalenceClasses<GlobalValue*> GlobalECs;
+
+ std::map<CallSite, std::vector<Function*> > AlreadyInlined;
+
public:
~BUDataStructures() { releaseMyMemory(); }
@@ -135,6 +138,12 @@ public:
return const_cast<BUDataStructures*>(this)->
CreateGraphForExternalFunction(F);
}
+
+ /// DSGraphExists - Is the DSGraph computed for this function?
+ ///
+ bool doneDSGraph(const Function *F) const {
+ return (DSInfo.find(const_cast<Function*>(F)) != DSInfo.end());
+ }
DSGraph &getGlobalsGraph() const { return *GlobalsGraph; }
@@ -176,7 +185,7 @@ public:
}
private:
- void calculateGraph(DSGraph &G);
+ bool calculateGraph(DSGraph &G);
DSGraph &getOrCreateGraph(Function *F);