[tree-ssa][ GC, Virtual operands, and GCing between passes

law@redhat.com law@redhat.com
Thu Dec 11 19:30:00 GMT 2003


In message <1070998524.17667.2860.camel@p4>, Andrew MacLeod writes:
 >
 >
 >Are we sure we want to GC between passes? :-|
Yes :-)


 >since VDEFs and VUSEs are tree nodes, I can't allocate the structure
 >which holds them anywhere except GC'd memory can I?
Huh?  Presumably turning them into tree nodes (they aren't currently
tree nodes) buys you something?

Certainly if they are tree nodes, then they need to be allocated by the
GC system and be reachable from GC roots.


 >struct v_operands_d *vops;
 >
 >struct v_operands_d {
 >  unsigned int num
 >  tree *vec;
 >}
 >
 >so I dont want the memory associated with either  'vops' or 'vec'
 >garbage collected, but I do want to keep around anything that
 >vec[0]..vec[num-1] points to.
 >
 >Thats not really going to work too well is it? At least I haven't been
 >able to do it.  So I'll have to keep ggcing the memory for the vops
 >structure?.
I don't think it's going to work.  I'd probably suggest you GC the whole
thing and if necessary, keep a free list of objects you can recycle.

In that kind of scheme, you'd expose the freelist of the GC system as well.

I guess what I really don't understand is why you're trying to not expose
stuff to the GC system.  Is it because we don't have a ggc_free?  Or is
it something else?

Jeff




More information about the Gcc mailing list