mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Convert several loops over MachineFunction basic blocks to range-based loops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207683 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -59,12 +59,11 @@ void LexicalScopes::extractLexicalScopes(
|
||||
DenseMap<const MachineInstr *, LexicalScope *> &MI2ScopeMap) {
|
||||
|
||||
// Scan each instruction and create scopes. First build working set of scopes.
|
||||
for (MachineFunction::const_iterator I = MF->begin(), E = MF->end(); I != E;
|
||||
++I) {
|
||||
for (const auto &MBB : *MF) {
|
||||
const MachineInstr *RangeBeginMI = nullptr;
|
||||
const MachineInstr *PrevMI = nullptr;
|
||||
DebugLoc PrevDL;
|
||||
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
|
||||
for (MachineBasicBlock::const_iterator II = MBB.begin(), IE = MBB.end();
|
||||
II != IE; ++II) {
|
||||
const MachineInstr *MInsn = II;
|
||||
|
||||
@@ -274,9 +273,8 @@ void LexicalScopes::getMachineBasicBlocks(
|
||||
return;
|
||||
|
||||
if (Scope == CurrentFnLexicalScope) {
|
||||
for (MachineFunction::const_iterator I = MF->begin(), E = MF->end(); I != E;
|
||||
++I)
|
||||
MBBs.insert(I);
|
||||
for (const auto &MBB : *MF)
|
||||
MBBs.insert(&MBB);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user