[llvm] r315538 - [codeview] Disable FPO in functions using EH funclets
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 11 17:06:58 PDT 2017
Author: rnk
Date: Wed Oct 11 17:06:57 2017
New Revision: 315538
URL: http://llvm.org/viewvc/llvm-project?rev=315538&view=rev
Log:
[codeview] Disable FPO in functions using EH funclets
Funclets are emitted by WinException which doesn't have access to
X86TargetStreamer so it's hard to make a quick fix for this.
Modified:
llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp
llvm/trunk/lib/Target/X86/X86FrameLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp?rev=315538&r1=315537&r2=315538&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp Wed Oct 11 17:06:57 2017
@@ -62,6 +62,10 @@ bool X86AsmPrinter::runOnMachineFunction
EmitFPOData =
Subtarget->isTargetWin32() && MF.getMMI().getModule()->getCodeViewFlag();
+ // FIXME: EH
+ if (MF->hasEHFunclets())
+ EmitFPOData = false;
+
SetupMachineFunction(MF);
if (Subtarget->isTargetCOFF()) {
Modified: llvm/trunk/lib/Target/X86/X86FrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FrameLowering.cpp?rev=315538&r1=315537&r2=315538&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FrameLowering.cpp Wed Oct 11 17:06:57 2017
@@ -952,6 +952,7 @@ void X86FrameLowering::emitPrologue(Mach
bool IsWin64Prologue = MF.getTarget().getMCAsmInfo()->usesWindowsCFI();
bool NeedsWin64CFI = IsWin64Prologue && Fn->needsUnwindTableEntry();
bool NeedsWinFPO = STI.isTargetWin32() && MMI.getModule()->getCodeViewFlag();
+ NeedsWinFPO &= !MF->hasEHFunclets(); // FIXME
bool NeedsWinCFI = NeedsWin64CFI || NeedsWinFPO;
bool NeedsDwarfCFI =
!IsWin64Prologue && (MMI.hasDebugInfo() || Fn->needsUnwindTableEntry());
More information about the llvm-commits
mailing list