[PATCH] D18046: [X86] Providing correct unwind info in function epilogue

Keno Fischer via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 22 11:21:48 PDT 2016


loladiro added a comment.

Rather than using a heuristic to decide what is an epilogue, why not check the FrameDestroy flag on the instructions?

Wrt to the the Darwin problem, the current solution that's implemented in X86AsmBackend doesn't seem great to me (since it generically doesn't handle cfi instructions in epilogues). Perhaps the correct solution is to have a heuristic that detects which cfi instructions are part of the prologue? This wouldn't be a problem of course if compact unwind info were generated earlier (as it used to be before http://reviews.llvm.org/rL190290), but the concern about not getting compact unwind info from the .s if we could have gotten it from the .ll is quite valid. How does GCC handle this situation?

Also, minor review comment inline.


================
Comment at: lib/Target/X86/X86CFIInstrInserter.cpp:112
@@ +111,3 @@
+  TRI = ST->getRegisterInfo();
+  StackPtr = RI->getStackRegister();
+  FramePtr = RI->getPtrSizedFrameRegister(MF);
----------------
Have you checked that this works with x32, I saw problems there in my implementation.


Repository:
  rL LLVM

http://reviews.llvm.org/D18046





More information about the llvm-commits mailing list