On 11/14/14 03:34, Richard Biener wrote:
Well - we do have that scary TODO_do_not_ggc_collect. It would be
nice to be able to call protect_gc () from ira.c and unprotect_gc ()
from the reload/lra pass and get rid of that TODO.
Yea, can't argue with that.
And yes, a ggc_collect () should be a no-op inside such region (maybe
set a flag, do_ggc_collect_at_unprotect_gc and do what it suggests?)
Basically it's saying "please collect when you can" or a hint of that
nature. Given our structure today and the likely location of the
unprotect calls, I doubt it's worth the effort right now. But I can see
it being a lot more useful in the future if we can ensure GC safety of
some passes.
So yes, the patchis fine as-is but I'd like to see the above done - removal
of the TODO and making the thing really protect stuff. Incrementally
I'd like to identify passes that are safe GC-wise, make the collector
thread-safe and push collection to a thread.
Yea, all makes sense to me. Probably good for David's JIT work as well
to move in this direction.
jeff