Question on function-at-a-time and GC
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Mon Apr 12 21:00:00 GMT 2004
Wouldn't you want to do unit-at-a-time anyway, for optimisation?
Perhaps, but I'd want the choice of not doing so, if easy.
If all you're doing is converting Ada trees to middle-end trees, then
I wouldn't expect that process would generate much garbage.
Well, folding isn't cheap.
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.
The problem is that I don't know (or, more precisely don't want to have to
check) for every call to convert a tree whether or not there's a nested
subprogram someplace in there. So these calls would basically have to be for
every tree node, which is very expensive.
More information about the Gcc
mailing list