diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2014-03-06 11:00:15 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2014-03-06 11:00:15 +0000 |
commit | 28c111ec8a8eb00716144933c4c6b2df96a10603 (patch) | |
tree | c865c7dfde52f3d910de48fa77145bf23574e12a /llvm/lib/Target/SystemZ/SystemZISelLowering.cpp | |
parent | c231269ff9a17d7ba9fbd50ca0bee5703d6c0f35 (diff) | |
download | bcm5719-llvm-28c111ec8a8eb00716144933c4c6b2df96a10603.tar.gz bcm5719-llvm-28c111ec8a8eb00716144933c4c6b2df96a10603.zip |
[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.
llvm-svn: 203105
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/SystemZ/SystemZISelLowering.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp index fc015c72435..9cce34fa386 100644 --- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp +++ b/llvm/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) { |