mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-23 22:23:00 +00:00
Convert more loops to range-based equivalents
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207714 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -533,11 +533,13 @@ void PHIElimination::LowerPHINode(MachineBasicBlock &MBB,
|
||||
///
|
||||
void PHIElimination::analyzePHINodes(const MachineFunction& MF) {
|
||||
for (const auto &MBB : MF)
|
||||
for (MachineBasicBlock::const_iterator BBI = MBB.begin(), BBE = MBB.end();
|
||||
BBI != BBE && BBI->isPHI(); ++BBI)
|
||||
for (unsigned i = 1, e = BBI->getNumOperands(); i != e; i += 2)
|
||||
++VRegPHIUseCount[BBVRegPair(BBI->getOperand(i+1).getMBB()->getNumber(),
|
||||
BBI->getOperand(i).getReg())];
|
||||
for (const auto &BBI : MBB) {
|
||||
if (!BBI.isPHI())
|
||||
break;
|
||||
for (unsigned i = 1, e = BBI.getNumOperands(); i != e; i += 2)
|
||||
++VRegPHIUseCount[BBVRegPair(BBI.getOperand(i+1).getMBB()->getNumber(),
|
||||
BBI.getOperand(i).getReg())];
|
||||
}
|
||||
}
|
||||
|
||||
bool PHIElimination::SplitPHIEdges(MachineFunction &MF,
|
||||
|
||||
Reference in New Issue
Block a user