diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2014-04-23 23:12:06 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2014-04-23 23:12:06 +0000 |
commit | 31d2477c683f3c411195a896b852af286d49cfcb (patch) | |
tree | 4e15b9351fcaff55a38ff5c90c5906d4fb950d3d /include | |
parent | e69ea7d8ae951f115511580a913c5802a9843659 (diff) | |
download | llvm-31d2477c683f3c411195a896b852af286d49cfcb.tar.gz llvm-31d2477c683f3c411195a896b852af286d49cfcb.tar.bz2 llvm-31d2477c683f3c411195a896b852af286d49cfcb.tar.xz |
[LCG] Switch the SCC lookup to be in terms of call graph nodes rather
than functions. So far, this access pattern is *much* more common. It
seems likely that any user of this interface is going to have nodes at
the point that they are querying the SCCs.
No functionality changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207045 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Analysis/LazyCallGraph.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Analysis/LazyCallGraph.h b/include/llvm/Analysis/LazyCallGraph.h index ada278b114..0bbf591a6c 100644 --- a/include/llvm/Analysis/LazyCallGraph.h +++ b/include/llvm/Analysis/LazyCallGraph.h @@ -328,7 +328,7 @@ public: /// /// \returns null if the function hasn't been assigned an SCC via the SCC /// iterator walk. - SCC *lookupSCC(const Function &F) const { return SCCMap.lookup(&F); } + SCC *lookupSCC(Node &N) const { return SCCMap.lookup(&N); } /// \brief Get a graph node for a given function, scanning it to populate the /// graph data as necessary. @@ -369,7 +369,7 @@ private: SpecificBumpPtrAllocator<SCC> SCCBPA; /// \brief Maps Function -> SCC for fast lookup. - DenseMap<const Function *, SCC *> SCCMap; + DenseMap<Node *, SCC *> SCCMap; /// \brief The leaf SCCs of the graph. /// |