[PATCH] Avoid emitting useless notes in GCSE

Joern RENNECKE joern.rennecke@st.com
Wed Mar 30 20:16:00 GMT 2005


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



More information about the Gcc-patches mailing list