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: Patch to decl2.c



On Friday, September 5, 2003, at 09:34 AM, Mark Mitchell wrote:


Geoff, Richard --

Shouldn't this patch be reverted?

2003-09-02 Geoffrey Keating <geoffk@apple.com>

	PR 12161
	* decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
	* tree.c (cp_cannot_inline_tree_fn): Likewise.

I objected to the idea of this patch, and Richard's patch to optimize.c
was supposed to handle this problem, if I understand correctly.

Richard's patch didn't work; see <http://gcc.gnu.org/ml/gcc-regression/2003-09/msg00032.html> for the message the regression tester sent saying so. I think Richard's patch is now redundant, but haven't gotten around to removing it and testing the result.


Reverting my patch will cause to GCC to again fail to bootstrap on powerpc-darwin, unless something else is done.

This patch seems wrong both in concept and in implementation. If this
needs to happen at all, it should happen inside instantiate_decl at the
point where it actually starts instantiating the function, not wrapping
the calls. Especially in the mark_used case, this change is potentially
expensive.


What's going on here?

When I was writing this patch, I asked myself the question "Of the functions in the backtrace, which would I not expect to be calling ggc_collect?" It seemed reasonable to me that instantiate_decl should call ggc_collect. It seemed unreasonable that mark_used and cp_cannot_inline_tree_fn should call ggc_collect. This, however, is just my instinctive judgement and I'm certainly willing to go along with any reasonable design for this; I was mostly concerned with fixing the Darwin bootstrap.


--
Geoff Keating <geoffk@apple.com>


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