diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-07-12 03:18:50 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-07-12 03:18:50 +0000 |
commit | 7b4c18e8f38a0139e1f2ece643df9f7c21246b39 (patch) | |
tree | 219505b2f5c6f43af05c1c1f45aeeffa54774d4b /llvm/lib/Target/X86/X86FrameLowering.cpp | |
parent | 99933f1b51d314d4eb7813f59911e14ecc07d4ff (diff) | |
download | bcm5719-llvm-7b4c18e8f38a0139e1f2ece643df9f7c21246b39.tar.gz bcm5719-llvm-7b4c18e8f38a0139e1f2ece643df9f7c21246b39.zip |
X86: Avoid implicit iterator conversions, NFC
Avoid implicit conversions from MachineInstrBundleIterator to
MachineInstr*, mainly by preferring MachineInstr& over MachineInstr* and
using range-based for loops.
llvm-svn: 275149
Diffstat (limited to 'llvm/lib/Target/X86/X86FrameLowering.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86FrameLowering.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Target/X86/X86FrameLowering.cpp b/llvm/lib/Target/X86/X86FrameLowering.cpp index 26ae703d665..d1a31b7d8db 100644 --- a/llvm/lib/Target/X86/X86FrameLowering.cpp +++ b/llvm/lib/Target/X86/X86FrameLowering.cpp @@ -699,7 +699,7 @@ MachineInstr *X86FrameLowering::emitStackProbeInline( // Possible TODO: physreg liveness for InProlog case. - return ContinueMBBI; + return &*ContinueMBBI; } MachineInstr *X86FrameLowering::emitStackProbeCall( @@ -763,7 +763,7 @@ MachineInstr *X86FrameLowering::emitStackProbeCall( ExpansionMBBI->setFlag(MachineInstr::FrameSetup); } - return MBBI; + return &*MBBI; } MachineInstr *X86FrameLowering::emitStackProbeInlineStub( @@ -775,7 +775,7 @@ MachineInstr *X86FrameLowering::emitStackProbeInlineStub( BuildMI(MBB, MBBI, DL, TII.get(X86::CALLpcrel32)) .addExternalSymbol("__chkstk_stub"); - return MBBI; + return &*MBBI; } static unsigned calculateSetFPREG(uint64_t SPAdjust) { @@ -1406,8 +1406,8 @@ bool X86FrameLowering::canUseLEAForSPInEpilogue( return !MF.getTarget().getMCAsmInfo()->usesWindowsCFI() || hasFP(MF); } -static bool isFuncletReturnInstr(MachineInstr *MI) { - switch (MI->getOpcode()) { +static bool isFuncletReturnInstr(MachineInstr &MI) { + switch (MI.getOpcode()) { case X86::CATCHRET: case X86::CLEANUPRET: return true; @@ -1492,7 +1492,7 @@ void X86FrameLowering::emitEpilogue(MachineFunction &MF, bool IsWin64Prologue = MF.getTarget().getMCAsmInfo()->usesWindowsCFI(); bool NeedsWinCFI = IsWin64Prologue && MF.getFunction()->needsUnwindTableEntry(); - bool IsFunclet = isFuncletReturnInstr(MBBI); + bool IsFunclet = isFuncletReturnInstr(*MBBI); MachineBasicBlock *TargetMBB = nullptr; // Get the number of bytes to allocate from the FrameInfo. @@ -1956,7 +1956,7 @@ bool X86FrameLowering::restoreCalleeSavedRegisters(MachineBasicBlock &MBB, if (CSI.empty()) return false; - if (isFuncletReturnInstr(MI) && STI.isOSWindows()) { + if (isFuncletReturnInstr(*MI) && STI.isOSWindows()) { // Don't restore CSRs in 32-bit EH funclets. Matches // spillCalleeSavedRegisters. if (STI.is32Bit()) |