This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Cleanup some rtl cruft
On Thursday 11 November 2004 00:29, David Edelsohn wrote:
> > ... it removes the second operand, CONTAINING_INSN, from the LABEL_REF
> > rtx.
>
> Please make sure that this does not break the LABEL_REF part of
> the hash function in config/rs6000.c:rs6000_hash_constant().
That function says,
static unsigned
rs6000_hash_constant (rtx k)
{
/* ... */
switch (code)
{
case LABEL_REF:
return result * 1231 + (unsigned) INSN_UID (XEXP (k, 0));
So, it only hashes the INSN_UID of the INSN with the CODE_LABEL that
the LABEL_REF refers to. Perfectly safe.
Gr.
Steven