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]

[reload-v2a] More subreg decomposition


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


lower-subreg does a reasonable job at eliminating double-word pseudos;
however, it has certain restrictions and thus double-word pseudos can
remain in the insn stream.  One of the restrictions is lower-subreg will
not decompose a double-word pseudo if it is used anywhere in the
function in its double-word mode, except for copies.


Bernd has done work in IRA to allow tracking of each half of a
double-word pseudo separately for computing conflicts which in turns
allows for better allocation of double-word pseudos.

However, even with lower-subreg and the improvements to IRA we can still
easily end up with unallocated double-word pseudos.

I've been working on a replacement for reload, the first step of which
is range splitting unallocated pseudos.

An over-simplified way to look at the range splitting code is it creates
a memory home for unallocated pseudos which cross block boundaries.  It
then inserts a load from the memory location into a new pseudo before
the first use in a block and a store to the memory location from the new
pseudo after the last assignment in the block.

This process naturally creates new opportunities to decompose
double-word pseudos.    We could re-run lower-subreg after range
splitting, but before reallocation.  That would be ugly for various
reasons.  It's relatively easy to decompose the pseudos as part of the
range splitting code itself.

Basically we create a parallel set of arrays/bitmaps to track the high
word of a double-word pseudo and switch between the normal array/bitmap
and the alternate based on which word of the double-word pseudo is being
referenced by a subreg at a given time.  We create a new pseudo for each
of the subreg components which can be allocated independently.

Additionally, this patch removes naked CLOBBERs which are no longer
needed due to decomposition and ignores implicit reads which no longer
occur after decomposition.

The net result is noticably better code, particularly for i686.
Bootstrapped and regression tested x86-64-unknown-linux-gnu.






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

iQEcBAEBAgAGBQJNJfMfAAoJEBRtltQi2kC7wfwH/R4ioWD2zEQjkXhLxBdvp8A+
xkjnV13AVzuxSKBkPb3PlBSy6jeZHSmPx/b5IWpmdS/vfpYCyGY8Ph1xUUN97TvD
a+DSN+PbPRklHnN2Z/WuF2PDqy/9mA4zotUPODlIvlfnzu4HLhkVVGFXOdXewQyr
XqVzqb81jBwQUO+nwy0H0C7gHes5JuL1CVYwbLb2KL8g8pqi1IeaxW05WwM7sye2
xuCUhpVIOtmE7pFwLGeVu4z/LVpkQ9jHOxz7wnIATXQh7pt/JgW+jNmbG2y6kHE/
mW8yzk3RMRVjZxm9mSWzLbNtlF7mLmb3LBeb/kFYiqKpR5xLLL/uwdDLB+AA2ZY=
=slId
-----END PGP SIGNATURE-----

Attachment: patch
Description: Text document


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