[PATCH] D18046: [X86] Providing correct unwind info in function epilogue
Keno Fischer via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 28 16:18:11 PDT 2016
loladiro added a comment.
Could we have an intermediate state where between frame lowering and the final cleanup pass, we essentially assume that at entry to every basic block we're in the CFI state we would have been after the prologue and then use the late pass to insert save/restore instruction when it detects that is not the case? Eventually the late pass could also do cfi optimization.
As for the Darwin problem, I think I've come around to the idea that the only possible way to do this properly is to generate the unwind info while we still know what the prologue is, record it in the assembly (I think cfi_fde_data lets you do that) and only do the heuristic inference thing if no such annotation is found.
================
Comment at: lib/Target/X86/X86CFIInstrInserter.cpp:112
@@ +111,3 @@
+ TRI = ST->getRegisterInfo();
+ StackPtr = RI->getStackRegister();
+ FramePtr = RI->getPtrSizedFrameRegister(MF);
----------------
violetav wrote:
> loladiro wrote:
> > Have you checked that this works with x32, I saw problems there in my implementation.
> I didn't notice any problems with x32 so far. What problems have you come across?
Passing StackPtr to getDwarfRegNum didn't work. Note that x32 is 32bit pointers on 64bit not x86.
Repository:
rL LLVM
http://reviews.llvm.org/D18046
More information about the llvm-commits
mailing list