This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: INSN_CODE_NUMBER of INT_MAX
> > Interesting. How does the register allocation use it?
>
> If the value is a constant, or the sum of the stack/frame pointer and a
> constant, that value can be used instead of the register.
>
> And if a register is only set once, the value can also in some places
> be replaced into the users.
>
> Also some register tying makes use of REG_EQUAL notes.
>
> just search in local-alloc.c for REG_EQUAL.
>
> Moreover, regmove makes use of REG_EQUAL notes.
Actually thinking about it more, I don't believe you are right.
We are speaking about removing noop moves with REG_EQUAL notes.
My original tought was that we should have proper REG_EQUAL
note on the real insn computing the value, not the noop move, than
came to conclusion that it helps in case that instruction is outside
BB.
As delete_trivially_dead_insns removed noop moves REG_EQUAL or not, only
remaining noop moves are ones created by combine. I tend to believe that such
noop moves have REG_EQUAL notes more or less missleading (as the compiler
originally believed these do to some computation).
Such noop moves definitly confuse register allocator in other way - such
as increase priorities for the pseudo for no purpose and in a way combine
updates life information these also can extend register lifetime.
So still I would suggest to blast such noop moves REG_EQUAL note or not.
Honza