This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: thanks for the memory work


On Wed, 2003-11-26 at 12:58, law@redhat.com wrote:
> In message <1069853017.23429.2811.camel@p4>, Andrew MacLeod writes:
>  >Initial plan is to have 1 varray of tree * for real operands over all
>  >stmts. The annotation will then have an index into this array for defs
>  >and one for uses. So when you want the uses(s), you have direct access
>  >to them. Initially Id put the def/use count in the annotation as well
>  >simply for speed. It'll be dead easy to change whe Im done tho. 
>  >Initially Im trying to get rid of all those varrays.
> So you have indices in the annotation itself.  That's fine and good.  What
> about the case where we have more than the standard number of operands
> (say an ASM)?
There is no limit... its uses elements INDEX+0->INDEX+(N-1) in the
primary VARRAY. N can be whatever size the stmt wants/needs.

Initially I think I'll have NUM and INDEX in the annotation for use and
def. We can muddy around with moving num into the VARRAY, or doing
something else, but for now I'll give this a try. Seems like a good
place to start.  Im trying to collect some stats on how many statements
there are, how many have 1 def, how many have no defs, how many have 2
or less uses, etc, just so I can make a first decent guess at "the right
thing"

> 
>  >Perhaps. Im not as convinced it will be that big of a win, but perhaps.
>  >I know one def is common, and we might very well be able to handle it
>  >seemlessly... But you are only saving at most 1 or 2 words per stmt, I
>  >wouldn't expect to see too much difference in the end relative to where
>  >we are spending memory elsewhere. We'll see :-)
> Well, if everything is in a single varray, then the benefits of special
> casing 0/1 def is much less important.

Yeah, I think so.

Andrew


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