This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Memory usage in compute_immediate_uses
- From: law at redhat dot com
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 16 Sep 2003 17:08:34 -0600
- Subject: Re: [tree-ssa] Memory usage in compute_immediate_uses
- Reply-to: law at redhat dot com
In message <20030916183326.GA8717@nevyn.them.org>, Daniel Jacobowitz writes:
>This grew out of a conversation with Daniel Berlin about SSA-PRE's memory
>usage. It turns out PRE doesn't need compute_immediate_uses after all and
>he's removed the call in a later snapshot than I had on disk. But other
>passes (CCP at least, right now) use this, so I'm writing it out anyway.
It's probably worth noting that I don't think we've done any serious
investigation on what "reasonable" starting sizes to use for our hash tables,
virtual arrays, etc -- with the possible exception of how many definitions
a statement has -- the vast majority of statements have one definition :-).
So this isn't a huge surprise.
For immediate uses, I'd really expect the distribution to be heavily
weighted at 1 use, particularly after gimplification. It would probably
be useful to see a histogram across a large body of code.
>And just a question. Sometimes all the immediate_uses varrays are already
>allocated. Nothing ever removes from the immediate_uses list. So...
>doesn't any call to compute_immediate_uses after they've already been
>computed put duplicates on the list? It's not a problem now that CCP is the
>only thing using it, but while SSA-PRE was using it that must have hurt
>performance elsewhere.
Yea, seems rather lame to me as well.
Jeff