PATCH for purge_addressof sluggishness

Mark Mitchell mark@codesourcery.com
Mon Mar 22 20:01:00 GMT 1999


>>>>> "Richard" == Richard Henderson <rth@cygnus.com> writes:

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

Hmm.  This patch is a what's left of a more complicated endeavor.

But, my thinking was that we might be able to index only those REGs
that are actually used in ADDRESSOF.  Since there are (in my example)
hundreds of thousands of REGs, the hash table might be valuable in
terms of space.  Also, hash_tables come with their own obstack, which
is nice in that it makes it easy to deallocate the lists when they're
no longer needed.  Of course, we could to this with a varray, too.

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

Agreed.  Let's assume I'll correct this nit, and convert the
hash-table to an varray.  OK to put that in?

-- 
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


More information about the Gcc-patches mailing list