[PATCH] D18046: [X86] Providing correct unwind info in function epilogue
Violeta Vukobrat via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 5 05:19:15 PDT 2017
violetav added a comment.
Hi Francis,
I am not sure if I am missing something, but yes, it looks like you could do something similar for cfi_offset and cfi_restore; keep track of registers that should be saved/restored at the beginning and end of a basic block and then insert save/restore CFI instructions for appropriate registers if the basic blocks get reordered in a way that this information is no longer correct.
For the second question, I have started with something similar (inserted CFI instructions in epilogue and added additional CFI instrs that correct the CFA calculation rule both in the late pass), however, that was not preferable, because I was analyzing each BB, checking it for CFI instructions, and analyzing if additional instructions should be inserted, basically, I should have known this information already, and not need to do this analysis in the pass.
Repository:
rL LLVM
https://reviews.llvm.org/D18046
More information about the llvm-commits
mailing list