This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: unwind info for epilogues
Jakub Jelinek wrote:
Couldn't we avoid the .cfi_restore directives altogether on x86_64
in this case?
Yes, we could.
... then can't the .cfi_restore directives be just moved down to the
movl %ebp, %esp instruction (the stack slots still contain the saved
register content until movl %ebp, %esp is executed)? This would save at
least a couple of DW_CFA_advance_loc* opcodes.
Yes, this is also possible. Indeed, the two optimizations are related.
I thought about the later of these two briefly, but then put it off for
future work.
I havn't thought about all the possible ways this can be optimized, or
what all the constraints are. I've an idea that we might could attack
this with an unwind generation and optimization pass, as mentioned by
Ian Taylor elsewhere in this thread.
r~