This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/39837] [4.3/4.4/4.5 regression] extra spills due to RTL LICM
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jul 2010 22:55:05 -0000
- Subject: [Bug rtl-optimization/39837] [4.3/4.4/4.5 regression] extra spills due to RTL LICM
- References: <bug-39837-17592@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #16 from steven at gcc dot gnu dot org 2010-07-11 22:55 -------
Brief explanation about what the patch does:
* have a pointer to the location of the invariant within an rtx. The existing
code assumes a complete RHS is invariant, but with the patch GCC can move
invariants out of the RHS of a SET even if the whole RHS itself is not
invariant.
* Do not bail out in find_invariant_insn if the complete RHS is not invariant.
Instead see if there is an address (i.e. XEXP (MEM, 0)) that is invariant.
* Update invariant motion code to handle partially invariant RHSs
One TODO for the patch (IIRC) is to only move an invariant address if it would
otherwise be moved anyway. That is, only move the invariant address if there is
a dependent invariant that would cause the address to be hoisted anyway. This
is to avoid excessive LICM.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39837