[llvm] r265105 - Use range-based for loops. NFC.
Michael Kuperstein via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 31 20:45:08 PDT 2016
Author: mkuper
Date: Thu Mar 31 22:45:08 2016
New Revision: 265105
URL: http://llvm.org/viewvc/llvm-project?rev=265105&view=rev
Log:
Use range-based for loops. NFC.
Modified:
llvm/trunk/lib/Target/X86/X86FrameLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86FrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FrameLowering.cpp?rev=265105&r1=265104&r2=265105&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FrameLowering.cpp Thu Mar 31 22:45:08 2016
@@ -2308,15 +2308,13 @@ void X86FrameLowering::adjustForHiPEProl
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::adjustForHiPEProl
MoreStackForCalls = std::max(MoreStackForCalls,
(HipeLeafWords - 1 - CalleeStkArity) * SlotSize);
}
+ }
MaxStack += MoreStackForCalls;
}
More information about the llvm-commits
mailing list