summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-04-23 04:00:17 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-04-23 04:00:17 +0000
commitb3112f6acc4fda6471c2043b2f1aa8c36754cc3b (patch)
treea7cea2de5c2426acb9e16f08df32a6dc6d339597 /include
parentaaff72bcd89a36fd70ef9abaa7a628b7b56cf3b9 (diff)
downloadllvm-b3112f6acc4fda6471c2043b2f1aa8c36754cc3b.tar.gz
llvm-b3112f6acc4fda6471c2043b2f1aa8c36754cc3b.tar.bz2
llvm-b3112f6acc4fda6471c2043b2f1aa8c36754cc3b.tar.xz
[LCG] Switch the Callee sets to be DenseMaps pointing to the index into
the Callee list. This is going to be quite important to prevent removal from going quadratic. No functionality changed at this point, this is one of the refactoring patches I've broken out of my initial work toward mutation updates of the call graph. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206938 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/LazyCallGraph.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/llvm/Analysis/LazyCallGraph.h b/include/llvm/Analysis/LazyCallGraph.h
index 66d3d50585..60f4955ae9 100644
--- a/include/llvm/Analysis/LazyCallGraph.h
+++ b/include/llvm/Analysis/LazyCallGraph.h
@@ -187,10 +187,10 @@ public:
int LowLink;
mutable NodeVectorT Callees;
- SmallPtrSet<Function *, 4> CalleeSet;
+ DenseMap<Function *, size_t> CalleeIndexMap;
/// \brief Basic constructor implements the scanning of F into Callees and
- /// CalleeSet.
+ /// CalleeIndexMap.
Node(LazyCallGraph &G, Function &F);
public:
@@ -333,8 +333,9 @@ private:
/// escape at the module scope.
NodeVectorT EntryNodes;
- /// \brief Set of the entry nodes to the graph.
- SmallPtrSet<Function *, 4> EntryNodeSet;
+ /// \brief Map of the entry nodes in the graph to their indices in
+ /// \c EntryNodes.
+ DenseMap<Function *, size_t> EntryIndexMap;
/// \brief Allocator that holds all the call graph SCCs.
SpecificBumpPtrAllocator<SCC> SCCBPA;