------- 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