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: [tree-ssa][ GC, Virtual operands, and GCing between passes


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



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