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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/23/11 09:04, Bernd Schmidt wrote:
> 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.
That'll still help :-)  I can run your sinking code, then use the
existing IRA callbacks to attempt to allocate any pseudos which didn't
previously get hard regs.  It's actually quite easy.

jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNig9CAAoJEBRtltQi2kC7I3kIAJ6manYH+/ZFcdQwfxroN0im
U0Oc18wbEz5VZg3SXnw7wEm6uRPKxYLS9/t2bMo0xLY2cHCWZx2QLH9g9O09lnUv
EU5lG46H7oIJuwhuC8osvsJUbLfQL5PkGQJdF4mfab1uk/Et5RSo8wfna7HDhTXU
b8WJltvS2ZJQIggSFxXtM101eq2/oiiU286WC8wdqlbq0lgWotBcxhHNuZeO/LEj
NeGX91kcFDl8RcwQNeT2a2G+JC0i5tc1S4C3d9pGgUiqDWpmjx74WrlRpzpkF8EF
7kfYm48xY5hPcmUcZ7vJU5Aq3Ik7U2rM6aO9H3dYoFTAOmcgs22Rbj6FoDMrUXE=
=N5L7
-----END PGP SIGNATURE-----


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