This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Avoid emitting useless notes in GCSE


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]