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]

Re: PATCH for purge_addressof sluggishness


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~


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