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: Question on function-at-a-time and GC


kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:

>     Probably; I don't have numbers.  However, it probably requires *less*
>     memory than is wasted by ggc_push_context.
> 
> Sure, but that's not the two things I'd compare.  The other approach is making
> sure that all temporaries are global and doing one function at a time.

Wouldn't you want to do unit-at-a-time anyway, for optimisation?

If all you're doing is converting Ada trees to middle-end trees, then
I wouldn't expect that process would generate much garbage.


If you use ggc_push_context, then you still get full collection
between toplevel functions.  I don't know Ada well enough to know if
it's common to have a single toplevel function with many nested
subfunctions; if it's rare, you might find that you don't care about
the inefficiencies of ggc_push_context.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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