[PATCH] D14021: Added cfi instructions for correct CFA calculation in case when movpc instruction expands to call and pop

David Kreitzer via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 23 13:20:50 PDT 2015


DavidKreitzer added a subscriber: DavidKreitzer.

================
Comment at: lib/Target/X86/X86MCInstLower.cpp:1150
@@ +1149,3 @@
+
+    if (NeedsDwarfCFI && !hasFP) {
+      MCCFIInstruction::createAdjustCfaOffset(nullptr, -stackGrowth);
----------------
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.


Repository:
  rL LLVM

http://reviews.llvm.org/D14021





More information about the llvm-commits mailing list