summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
diff options
context:
space:
mode:
authorTim Shen <timshen91@gmail.com>2016-08-01 22:32:20 +0000
committerTim Shen <timshen91@gmail.com>2016-08-01 22:32:20 +0000
commitb44909eccbe79902e9f3002d72b4b6d596f0a94b (patch)
treefdfa13e9fa3cac6d05bafdd03db449210927da83 /llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
parentc64d7655b231c88d1c9fa3f482725cd70f7b2e92 (diff)
downloadbcm5719-llvm-b44909eccbe79902e9f3002d72b4b6d596f0a94b.tar.gz
bcm5719-llvm-b44909eccbe79902e9f3002d72b4b6d596f0a94b.zip
[ADT] NFC: Generalize GraphTraits requirement of "NodeType *" in interfaces to "NodeRef", and migrate SCCIterator.h to use NodeRef
Summary: By generalize the interface, users are able to inject more flexible Node token into the algorithm, for example, a pair of vector<Node>* and index integer. Currently I only migrated SCCIterator to use NodeRef, but more is coming. It's a NFC. Reviewers: dblaikie, chandlerc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D22937 llvm-svn: 277399
Diffstat (limited to 'llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp')
-rw-r--r--llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp b/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
index 90bc249bcb3..c2039e1dec2 100644
--- a/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
+++ b/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
@@ -623,6 +623,7 @@ template <> struct GraphTraits<IrreducibleGraph> {
typedef bfi_detail::IrreducibleGraph GraphT;
typedef const GraphT::IrrNode NodeType;
+ typedef const GraphT::IrrNode *NodeRef;
typedef GraphT::IrrNode::iterator ChildIteratorType;
static const NodeType *getEntryNode(const GraphT &G) {
OpenPOWER on IntegriCloud