summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2014-04-11 00:27:22 +0000
committerJim Grosbach <grosbach@apple.com>2014-04-11 00:27:22 +0000
commit62fc093cf283e6be570a4d553d38c9128363960f (patch)
tree755db2fc3ac3170f45e5d82363165865c49b48bb
parent098f42dbc76f2f0ff8d4a10f9f77c886d9737013 (diff)
downloadllvm-62fc093cf283e6be570a4d553d38c9128363960f.tar.gz
llvm-62fc093cf283e6be570a4d553d38c9128363960f.tar.bz2
llvm-62fc093cf283e6be570a4d553d38c9128363960f.tar.xz
[ARM64,C++11]: Range'ify use-list iterators in DAGToDAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206007 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM64/ARM64ISelDAGToDAG.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Target/ARM64/ARM64ISelDAGToDAG.cpp b/lib/Target/ARM64/ARM64ISelDAGToDAG.cpp
index 0286b31d99..43098d5d7a 100644
--- a/lib/Target/ARM64/ARM64ISelDAGToDAG.cpp
+++ b/lib/Target/ARM64/ARM64ISelDAGToDAG.cpp
@@ -720,8 +720,7 @@ bool ARM64DAGToDAGISel::SelectAddrModeRO(SDValue N, unsigned Size,
// operation. If yes, do not try to fold this node into the address
// computation, since the computation will be kept.
const SDNode *Node = N.getNode();
- for (SDNode::use_iterator UI = Node->use_begin(), UE = Node->use_end();
- UI != UE; ++UI) {
+ for (SDNode *UI : Node->uses()) {
if (!isa<MemSDNode>(*UI))
return false;
}
@@ -1573,12 +1572,10 @@ static void getUsefulBits(SDValue Op, APInt &UsefulBits, unsigned Depth) {
}
APInt UsersUsefulBits(UsefulBits.getBitWidth(), 0);
- for (SDNode::use_iterator UseIt = Op.getNode()->use_begin(),
- UseEnd = Op.getNode()->use_end();
- UseIt != UseEnd; ++UseIt) {
+ for (SDNode *Node : Op.getNode()->uses()) {
// A use cannot produce useful bits
APInt UsefulBitsForUse = APInt(UsefulBits);
- getUsefulBitsForUse(*UseIt, UsefulBitsForUse, Op, Depth);
+ getUsefulBitsForUse(Node, UsefulBitsForUse, Op, Depth);
UsersUsefulBits |= UsefulBitsForUse;
}
// UsefulBits contains the produced bits that are meaningful for the