This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/6] Allow jumps in epilogues


On 04/11/2011 07:10 PM, Richard Henderson wrote:
> Ok.

Thanks, committed. And here's an update of the other patch set,
renumbered to start at 5, with a changelog to cover all three patches
together (which is how they'll need to be committed eventually).

005-scanfirst: Mostly identical to the previous version of the scanfirst
patch. Now deletes the CFI notes to avoid compare-debug
failures.

006-cfilabel: A new patch, which reduces the amount of different code
paths we can take in add_fde_cfi, as this was becoming unmanageable. The
concept is to first emit just the CFI notes, in all cases. Later, after
we're done producing the CFI insns we need, another pass over the rtl
adds the necessary labels and set_loc/advance_loc CFIs. One consequence
of this is that def_cfa_1 can no longer use lookup_cfa, so it just
compares to an old_cfa variable instead. This also requires
target-specific changes as some ports use dwarf2out_cfi_label. An
(untested) example of the necessary changes is in config/arm.

One thing that has disappeared is
-  /* ??? Of course, this heuristic fails when we're annotating epilogues,
-     because of course we'll always want to redefine the CFA back to the
-     stack pointer on the way out.  Where should we move this check?  */
because I didn't know what it was for, and "if (0)"ed anyway.

007-dw2cfg: A much extended version of the previous patch. Now does much
better placement of remember/restore; in almost all cases the code is
identical to what we currently generate, modulo minor differences around
the PROLOGUE_END label. I've made it emit queued register saves before
PROLOGUE_END so that we can use the state there for forced labels.

This bootstraps and tests ok on i686-linux. However, there is work left
to be done. Can I take you up on your offer to work with me on this?
This still requires the i386 output_set_got which I think I can cope
with, but the ia64 backend does a number of things with unwinding that I
don't understand. Also, I'll be away the next two weeks - if you arrive
at a complete version during that time it would be great if you could
commit it.

One thing to note is that it seems surprisingly hard to make
-freorder-blocks-and-partition do anything interesting. There's one C++
testcase (partition2.C I think) which I used to debug this code, but
other than that I haven't really found anything that actually generates
two nonempty partitions.


Bernd

Attachment: dw2-cl
Description: Text document

Attachment: 005-scanfirst.diff
Description: Text document

Attachment: 006-cfilabel.diff
Description: Text document

Attachment: 007-dw2cfg.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]