[PATCH] D14021: Added cfi instructions for correct CFA calculation in case when movpc instruction expands to call and pop
Michael Kuperstein via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 24 07:38:02 PDT 2015
mkuper added a subscriber: mkuper.
================
Comment at: lib/Target/X86/X86MCInstLower.cpp:1150
@@ +1149,3 @@
+
+ if (NeedsDwarfCFI && !hasFP) {
+ MCCFIInstruction::createAdjustCfaOffset(nullptr, -stackGrowth);
----------------
DavidKreitzer wrote:
> You really only need these CFA adjust directives when precise instruction-level stack unwinding support is needed. That's certainly the case when the CFI is being used to generate debug info. But it isn't the case when the CFI is being used to generate the unwind tables for synchronous EH. For synchronous EH, these extra CFA adjust directives just waste space in the .eh_frame section.
>
> For D13767, Michael is planning to add a usePreciseUnwindInfo function. It would be nice sync with him and add "&& usePreciseUnwindInfo" to this condition. Also at line 1162.
This is already checking only hasDebugInfo() and won't emit the adjustment if CFI is only used for EH. If I land after this, I'll change the condition to usePreciseUnwindInfo().
Repository:
rL LLVM
http://reviews.llvm.org/D14021
More information about the llvm-commits
mailing list