This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Avoid emitting useless notes in GCSE
- From: Joern RENNECKE <joern dot rennecke at st dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 30 Mar 2005 21:14:25 +0100
- Subject: Re: [PATCH] Avoid emitting useless notes in GCSE
- References: <424AEE2A.40905@st.com> <200503302039.37035.ebotcazou@adacore.com>
Eric Botcazou wrote:
If a later pass, like RTL LICM, hoists out a constant, the REG_EQUAL note
becomes relevant. reload needs such notes to put the constant back if the
pseudo created by LICM failed to get a hard register.
Do you mean the pass that modifies the insn is not responsible for emitting
the note?
IIRC that responsibility used to be considered to lie with the code that
emitted the instruction
in the first place. However, that was never perfectly implemented,
particularily since there
are unclear areas which code is responsible when tree->rtl generation
calls nested expanders,
and after more than five years with this code in gcse, this note-adding
functionality in passes
before gcse is likely to be atrophied. It appears saner to make the
later passes add the notes
when they change the source, but if some fail to do that, there is a
benefit to having the notes
placed there by gcse. And you asked if there is a benefit to this, not
if there was a better way
to get that benefit...