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 5/6] Generate more shrink-wrapping opportunities


On 03/31/2011 03:23 PM, Jeff Law wrote:
> On 03/23/11 08:55, Bernd Schmidt wrote:
>> The first basic block contains insns to move incoming argument registers
>> to pseudos. When these pseudos live across calls, they get allocated to
>> call-saved registers. This in turns disables shrink-wrapping, since the
>> move instruction requires the prologue (saving the call-saved reg) to
>> occur before it.
> 
>> This patch addresses the problem by moving such moves downwards through
>> the CFG until we find a place where the destination is used or the
>> incoming argument is clobbered.
> OK.

Thanks for the reviews. This patch is still blocked by the issues raised
by rth in 3/6 (and of course the full shrink-wrapping patch 4/6); I hope
to have at least draft patches for the dwarf2out problems by the end of
the week.

We've also discovered a problem with this particular patch, it requires
the additional fix posted below which I'll include in an eventual commit.

> At some point I'll probably want to move this code to run
> immediately after IRA completes and extend it in a few ways, but for now
> it's OK as it stands.

Note that the prepare_shrink_wrap code can be further enhanced by
running a regcprop pass before thread_prologue_and_epilogue_insns, since
that tends to eliminate uses of the call-used destination reg. I'm going
to submit a patch for this once all the other shrink-wrapping bits are in.


Bernd

Attachment: active.diff
Description: Text document


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