PATCH for purge_addressof sluggishness

Richard Henderson rth@cygnus.com
Mon Mar 22 19:41:00 GMT 1999


On Mon, Mar 22, 1999 at 02:26:27PM -0800, Mark Mitchell wrote:
> This patch precomputes which registers are used in which insns, which
> allows purge_addressof to scan only those instructions that may need
> to change.  

Generally I think this is pretty reasonable.  I do have a couple
of comments though.

First, why the hash table?  You're collecting lists for each and
every pseudo in the function.  Seems much more sensible to use an
array indexed by regno (a varray if you wish for safety).

Second, there's a bit in fixup_var_refs that does

!   /* If there's a hash table, it must record all uses of VAR.  */
!   if (ht)
!     return;

followed later by

        fixup_var_refs_insns (var, promoted_mode, unsignedp,
!                           stack->first, stack->next != 0, ht);

We know from the previous test that ht == 0, and it was somewhat
confusing to me looking at the patch.  It seems marginally cleaner
to me to go ahead and write `NULL'.


r~


More information about the Gcc-patches mailing list