This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 5/6] Generate more shrink-wrapping opportunities
On 03/23/2011 04:03 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.
> FWIW, downward motion of the moves out of arg registers (or loads from
> arg slots) is definitely a good thing. This was a regular source of
> unnecessary register pressure leading to spills in codes I've looked at.
>
> I hope your sinking code works better than the quick and dirty one I
> wrote but never contributed.
Sadly I'm doing it after register allocation, so it wouldn't help with
your problem.
Bernd