This is the mail archive of the gcc-patches@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] Put CFG into GGC memory


On Tue, 2003-12-02 at 12:22, Jan Hubicka wrote:
> > On Tue, 2003-12-02 at 10:11, Steven Bosscher wrote:
>
> > 
> > - I am changing the use/def/vuse/vdef operands in stmts to not be
> > varray's any more. They'll either use their own little manager, or maybe
> > ggc if they can get their own page and/or a ggc_free maintained list.
> 
> I think you will need to have these in GGC in case you don't want
> vuses/vdefs to be garbage collected out.  There are no other places that
> reference them.
> Of course you can refernece them by varray at a side or manage them to
> be in GGCable linked list, but that is not very cool either...
> 

Im simply allocating a largish segment and allocating/freeing  small
operand vectors out of those segments. if more memory is needed, a new
segment is added.  If a few of the vectors within those segments get
lost, its not a big deal since all the segments gets freed when we're
done with SSA anyway, so no memory gets lost in the end, and there is
very little overhead.


> OK, my summary:
> I was working on tast to make ggc_collect working during SSA
> optimization process.  This is done (I've enabled it today) and my main
> motivation has been to get the datastructures checked by GGC walk and
> also because it seemed generally right way to go.
> 

> To accomplish that I had to create varray of PHI nodes as CFG nodes are
> not garbage collectable.  We've concluded that in longer run it would be
> better to make CFG visible to garbage collector so things can be
> referenced directly.
> 
> It removes the need for array in PHI nodes, of BB roots and also makes
> cfglayout in RTL mode GGC friendly.

Yeah, I do not like the idea of a varray of PHI nodes at all...

Andrew


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