On 02/06/2013 11:11 AM, Eric Botcazou wrote:
I think there is no point in creating a REG_EQUAL note when you're trying to
propagate a pseudo (or a subreg of a pseudo here). As a matter of fact,
that's what CSE explicitly does not:
Agreed. I have a hard time seeing where having a REG_EQUAL note that is
just a REG or SUBREG (REG) is actually useful -- const/copy propagation
ought to be able to find those equivalences without the aid of the note.
And as we've repeatedly seen, they cause problems.
Beyond 4.8, I'd really like to see this formalized a bit with a checker
to ensure such notes aren't created and docs for REG_EQUAL notes
indicating such notes are invalid.
2013-02-06 Eric Botcazou <ebotca...@adacore.com>
PR rtl-optimization/56178
* cse.c (cse_insn): Do not create a REG_EQUAL note if the source is a
SUBREG of a register. Tidy up related block of code.
* fwprop.c (orward_propagate_and_simplify): Do not create a REG_EQUAL
note if the source is a register or a SUBREG of a register.
Cleanups to cse look fine, as do the real changes of avoiding creating
notes for the SUBREG (REG) case for both cse and fwprop. Please install.
jeff