mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
use range-based for-loops; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237917 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -320,9 +320,7 @@ MinInstrCountEnsemble::pickTracePred(const MachineBasicBlock *MBB) {
|
|||||||
unsigned CurCount = MTM.getResources(MBB)->InstrCount;
|
unsigned CurCount = MTM.getResources(MBB)->InstrCount;
|
||||||
const MachineBasicBlock *Best = nullptr;
|
const MachineBasicBlock *Best = nullptr;
|
||||||
unsigned BestDepth = 0;
|
unsigned BestDepth = 0;
|
||||||
for (MachineBasicBlock::const_pred_iterator
|
for (const MachineBasicBlock *Pred : MBB->predecessors()) {
|
||||||
I = MBB->pred_begin(), E = MBB->pred_end(); I != E; ++I) {
|
|
||||||
const MachineBasicBlock *Pred = *I;
|
|
||||||
const MachineTraceMetrics::TraceBlockInfo *PredTBI =
|
const MachineTraceMetrics::TraceBlockInfo *PredTBI =
|
||||||
getDepthResources(Pred);
|
getDepthResources(Pred);
|
||||||
// Ignore cycles that aren't natural loops.
|
// Ignore cycles that aren't natural loops.
|
||||||
@@ -344,9 +342,7 @@ MinInstrCountEnsemble::pickTraceSucc(const MachineBasicBlock *MBB) {
|
|||||||
const MachineLoop *CurLoop = getLoopFor(MBB);
|
const MachineLoop *CurLoop = getLoopFor(MBB);
|
||||||
const MachineBasicBlock *Best = nullptr;
|
const MachineBasicBlock *Best = nullptr;
|
||||||
unsigned BestHeight = 0;
|
unsigned BestHeight = 0;
|
||||||
for (MachineBasicBlock::const_succ_iterator
|
for (const MachineBasicBlock *Succ : MBB->successors()) {
|
||||||
I = MBB->succ_begin(), E = MBB->succ_end(); I != E; ++I) {
|
|
||||||
const MachineBasicBlock *Succ = *I;
|
|
||||||
// Don't consider back-edges.
|
// Don't consider back-edges.
|
||||||
if (CurLoop && Succ == CurLoop->getHeader())
|
if (CurLoop && Succ == CurLoop->getHeader())
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user