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


On Thu, 2003-12-11 at 15:19, Geoff Keating wrote:

> > So I need the tree ** vector to be treated as if is an array of
> > interegers or something, no marking of anything in it.
> 
> Right.  gengtype is specifically designed to prevent you from doing
> this, because it's usually a mistake.  For instance:
> 
> - If you're wrong about the lifetime of the objects, you'll end up
>   with dangling pointers, which GC is supposed to prevent.  For
>   instance, if someone rearranges the stmt (maybe by doing some
>   constant folding) and then calls ggc_collect without updating the
>   defs structure.

Its part of the stmt, once the stmt is modified, the modified bit is set
in the annotation, and all the pointers are implicitly invalidated.
Before the operands can be accessed, these caches are rebuilt with new
ones.

> - You cannot save objects like this with PCH.

Its only live for the duration of SSA. It allvanishes when SSA is
destroyed.

> - A future compacting collector will not work if you do this.

Why not? Its still just an arbitrary vector of size N...

> 
> If you still think this is a good idea, why not just try:
> 
> intptr_t * defs_p;
> 
> ?
> 
> > Im about to punt on it anyway and manage those vectors myself since GC
> > doesnt seem to want to deal with them nicely.

I've bypassed it for now. There is no need for it to be handled by GC,
so I'll let it be for now. I might want to revisit it when we get a
working zone collector, but for now what I have will do.

Andrew


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