diff options
author | Michael Kuperstein <michael.kuperstein@gmail.com> | 2016-04-01 03:45:08 +0000 |
---|---|---|
committer | Michael Kuperstein <michael.kuperstein@gmail.com> | 2016-04-01 03:45:08 +0000 |
commit | 7bab7131881a1afe6222285f96dba5a64928dc1d (patch) | |
tree | a0dbdd139a348abea27980ce91fa1a71bf613696 /llvm/lib/Target/X86/X86FrameLowering.cpp | |
parent | 63e428f5de63aa297e1467068a99be3db6b999b0 (diff) | |
download | bcm5719-llvm-7bab7131881a1afe6222285f96dba5a64928dc1d.tar.gz bcm5719-llvm-7bab7131881a1afe6222285f96dba5a64928dc1d.zip |
Use range-based for loops. NFC.
llvm-svn: 265105
Diffstat (limited to 'llvm/lib/Target/X86/X86FrameLowering.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86FrameLowering.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Target/X86/X86FrameLowering.cpp b/llvm/lib/Target/X86/X86FrameLowering.cpp index 6123fd50052..89fa44142a4 100644 --- a/llvm/lib/Target/X86/X86FrameLowering.cpp +++ b/llvm/lib/Target/X86/X86FrameLowering.cpp @@ -2308,15 +2308,13 @@ void X86FrameLowering::adjustForHiPEPrologue( if (MFI->hasCalls()) { unsigned MoreStackForCalls = 0; - for (MachineFunction::iterator MBBI = MF.begin(), MBBE = MF.end(); - MBBI != MBBE; ++MBBI) - for (MachineBasicBlock::iterator MI = MBBI->begin(), ME = MBBI->end(); - MI != ME; ++MI) { - if (!MI->isCall()) + for (auto &MBB : MF) { + for (auto &MI : MBB) { + if (!MI.isCall()) continue; // Get callee operand. - const MachineOperand &MO = MI->getOperand(0); + const MachineOperand &MO = MI.getOperand(0); // Only take account of global function calls (no closures etc.). if (!MO.isGlobal()) @@ -2342,6 +2340,7 @@ void X86FrameLowering::adjustForHiPEPrologue( MoreStackForCalls = std::max(MoreStackForCalls, (HipeLeafWords - 1 - CalleeStkArity) * SlotSize); } + } MaxStack += MoreStackForCalls; } |