mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-27 22:55:15 +00:00
Range-ify some for loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203306 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a8c247ca54
commit
7cf32a7893
@ -256,8 +256,7 @@ Thumb2SizeReduce::canAddPseudoFlagDep(MachineInstr *Use, bool FirstInSelfLoop) {
|
||||
return HighLatencyCPSR || FirstInSelfLoop;
|
||||
|
||||
SmallSet<unsigned, 2> Defs;
|
||||
for (unsigned i = 0, e = CPSRDef->getNumOperands(); i != e; ++i) {
|
||||
const MachineOperand &MO = CPSRDef->getOperand(i);
|
||||
for (const MachineOperand &MO : CPSRDef->operands()) {
|
||||
if (!MO.isReg() || MO.isUndef() || MO.isUse())
|
||||
continue;
|
||||
unsigned Reg = MO.getReg();
|
||||
@ -266,8 +265,7 @@ Thumb2SizeReduce::canAddPseudoFlagDep(MachineInstr *Use, bool FirstInSelfLoop) {
|
||||
Defs.insert(Reg);
|
||||
}
|
||||
|
||||
for (unsigned i = 0, e = Use->getNumOperands(); i != e; ++i) {
|
||||
const MachineOperand &MO = Use->getOperand(i);
|
||||
for (const MachineOperand &MO : Use->operands()) {
|
||||
if (!MO.isReg() || MO.isUndef() || MO.isDef())
|
||||
continue;
|
||||
unsigned Reg = MO.getReg();
|
||||
@ -858,8 +856,7 @@ Thumb2SizeReduce::ReduceToNarrow(MachineBasicBlock &MBB, MachineInstr *MI,
|
||||
|
||||
static bool UpdateCPSRDef(MachineInstr &MI, bool LiveCPSR, bool &DefCPSR) {
|
||||
bool HasDef = false;
|
||||
for (unsigned i = 0, e = MI.getNumOperands(); i != e; ++i) {
|
||||
const MachineOperand &MO = MI.getOperand(i);
|
||||
for (const MachineOperand &MO : MI.operands()) {
|
||||
if (!MO.isReg() || MO.isUndef() || MO.isUse())
|
||||
continue;
|
||||
if (MO.getReg() != ARM::CPSR)
|
||||
@ -874,8 +871,7 @@ static bool UpdateCPSRDef(MachineInstr &MI, bool LiveCPSR, bool &DefCPSR) {
|
||||
}
|
||||
|
||||
static bool UpdateCPSRUse(MachineInstr &MI, bool LiveCPSR) {
|
||||
for (unsigned i = 0, e = MI.getNumOperands(); i != e; ++i) {
|
||||
const MachineOperand &MO = MI.getOperand(i);
|
||||
for (const MachineOperand &MO : MI.operands()) {
|
||||
if (!MO.isReg() || MO.isUndef() || MO.isDef())
|
||||
continue;
|
||||
if (MO.getReg() != ARM::CPSR)
|
||||
|
Loading…
Reference in New Issue
Block a user