[llvm] r206007 - [ARM64, C++11]: Range'ify use-list iterators in DAGToDAG.
Jim Grosbach
grosbach at apple.com
Thu Apr 10 17:27:22 PDT 2014
Author: grosbach
Date: Thu Apr 10 19:27:22 2014
New Revision: 206007
URL: http://llvm.org/viewvc/llvm-project?rev=206007&view=rev
Log:
[ARM64,C++11]: Range'ify use-list iterators in DAGToDAG.
Modified:
llvm/trunk/lib/Target/ARM64/ARM64ISelDAGToDAG.cpp
Modified: llvm/trunk/lib/Target/ARM64/ARM64ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM64/ARM64ISelDAGToDAG.cpp?rev=206007&r1=206006&r2=206007&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM64/ARM64ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/ARM64/ARM64ISelDAGToDAG.cpp Thu Apr 10 19:27:22 2014
@@ -720,8 +720,7 @@ bool ARM64DAGToDAGISel::SelectAddrModeRO
// 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, AP
}
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
More information about the llvm-commits
mailing list