1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

use range-based for-loops; NFCI

llvm-svn: 237918
This commit is contained in:
Sanjay Patel 2015-05-21 17:43:26 +00:00
parent 0009a99bbf
commit ecca1967d0

View File

@ -131,8 +131,7 @@ MachineCombiner::getDepth(SmallVectorImpl<MachineInstr *> &InsInstrs,
for (auto *InstrPtr : InsInstrs) { // for each Use
unsigned IDepth = 0;
DEBUG(dbgs() << "NEW INSTR "; InstrPtr->dump(); dbgs() << "\n";);
for (unsigned i = 0, e = InstrPtr->getNumOperands(); i != e; ++i) {
const MachineOperand &MO = InstrPtr->getOperand(i);
for (const MachineOperand &MO : InstrPtr->operands()) {
// Check for virtual register operand.
if (!(MO.isReg() && TargetRegisterInfo::isVirtualRegister(MO.getReg())))
continue;
@ -186,8 +185,7 @@ unsigned MachineCombiner::getLatency(MachineInstr *Root, MachineInstr *NewRoot,
// Check each definition in NewRoot and compute the latency
unsigned NewRootLatency = 0;
for (unsigned i = 0, e = NewRoot->getNumOperands(); i != e; ++i) {
const MachineOperand &MO = NewRoot->getOperand(i);
for (const MachineOperand &MO : NewRoot->operands()) {
// Check for virtual register operand.
if (!(MO.isReg() && TargetRegisterInfo::isVirtualRegister(MO.getReg())))
continue;