summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2015-07-14 22:10:54 +0000
committerPete Cooper <peter_cooper@apple.com>2015-07-14 22:10:54 +0000
commit65c69407c8cfeb4f33a8957c7762cbb2f9518c15 (patch)
treeb049c3a963789e27d548a5d5627bec0b71ae1a61 /llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
parent8c20b4ebe4c9a311825490220b7fd8f844bfffd7 (diff)
downloadbcm5719-llvm-65c69407c8cfeb4f33a8957c7762cbb2f9518c15.tar.gz
bcm5719-llvm-65c69407c8cfeb4f33a8957c7762cbb2f9518c15.zip
Add allnodes() iterator range to SelectionDAG. NFC.
SelectionDAG already had begin/end methods for iterating over all the nodes, but didn't define an iterator_range for us in foreach loops. This adds such a method and uses it in some of the eligible places throughout the backends. llvm-svn: 242212
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
index 00cbae3986c..34e1a700108 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
@@ -725,9 +725,8 @@ void ScheduleDAGLinearize::Schedule() {
SmallVector<SDNode*, 8> Glues;
unsigned DAGSize = 0;
- for (SelectionDAG::allnodes_iterator I = DAG->allnodes_begin(),
- E = DAG->allnodes_end(); I != E; ++I) {
- SDNode *N = I;
+ for (SDNode &Node : DAG->allnodes()) {
+ SDNode *N = &Node;
// Use node id to record degree.
unsigned Degree = N->use_size();
OpenPOWER on IntegriCloud