summaryrefslogtreecommitdiff
path: root/lib/Target/SystemZ/SystemZISelLowering.cpp
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2014-03-06 11:00:15 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2014-03-06 11:00:15 +0000
commitb653ed85457de149bb42c22a8098e6b2f2685dd4 (patch)
tree208144e92af1f27346a85e623bba88c4e9ae45d7 /lib/Target/SystemZ/SystemZISelLowering.cpp
parent9a1cd05a3d7456f9cdd9f5f30f037fbeb3c0fb20 (diff)
downloadllvm-b653ed85457de149bb42c22a8098e6b2f2685dd4.tar.gz
llvm-b653ed85457de149bb42c22a8098e6b2f2685dd4.tar.bz2
llvm-b653ed85457de149bb42c22a8098e6b2f2685dd4.tar.xz
[SystemZ] Use "for (auto" a bit
Just the simple cases for now. There were a few knock-on changes of MachineBasicBlock *s to MachineBasicBlock &s. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203105 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ/SystemZISelLowering.cpp')
-rw-r--r--lib/Target/SystemZ/SystemZISelLowering.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Target/SystemZ/SystemZISelLowering.cpp b/lib/Target/SystemZ/SystemZISelLowering.cpp
index fc015c7243..9cce34fa38 100644
--- a/lib/Target/SystemZ/SystemZISelLowering.cpp
+++ b/lib/Target/SystemZ/SystemZISelLowering.cpp
@@ -1284,8 +1284,7 @@ static unsigned reverseCCMask(unsigned CCMask) {
static void adjustForSubtraction(SelectionDAG &DAG, Comparison &C) {
if (C.CCMask == SystemZ::CCMASK_CMP_EQ ||
C.CCMask == SystemZ::CCMASK_CMP_NE) {
- for (SDNode::use_iterator I = C.Op0->use_begin(), E = C.Op0->use_end();
- I != E; ++I) {
+ for (auto I = C.Op0->use_begin(), E = C.Op0->use_end(); I != E; ++I) {
SDNode *N = *I;
if (N->getOpcode() == ISD::SUB &&
((N->getOperand(0) == C.Op0 && N->getOperand(1) == C.Op1) ||
@@ -1305,8 +1304,7 @@ static void adjustForSubtraction(SelectionDAG &DAG, Comparison &C) {
static void adjustForFNeg(Comparison &C) {
ConstantFPSDNode *C1 = dyn_cast<ConstantFPSDNode>(C.Op1);
if (C1 && C1->isZero()) {
- for (SDNode::use_iterator I = C.Op0->use_begin(), E = C.Op0->use_end();
- I != E; ++I) {
+ for (auto I = C.Op0->use_begin(), E = C.Op0->use_end(); I != E; ++I) {
SDNode *N = *I;
if (N->getOpcode() == ISD::FNEG) {
C.Op0 = SDValue(N, 0);
@@ -1333,8 +1331,7 @@ static void adjustForLTGFR(Comparison &C) {
if (C1 && C1->getZExtValue() == 32) {
SDValue ShlOp0 = C.Op0.getOperand(0);
// See whether X has any SIGN_EXTEND_INREG uses.
- for (SDNode::use_iterator I = ShlOp0->use_begin(), E = ShlOp0->use_end();
- I != E; ++I) {
+ for (auto I = ShlOp0->use_begin(), E = ShlOp0->use_end(); I != E; ++I) {
SDNode *N = *I;
if (N->getOpcode() == ISD::SIGN_EXTEND_INREG &&
cast<VTSDNode>(N->getOperand(1))->getVT() == MVT::i32) {