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: [PATCH] Fix sched-ebb.c bug (was Re: [3.3 branch] IA64bootstrap failure)


On Tue, 2003-07-15 at 14:12, Jakub Jelinek wrote:
> Now, are those memory consumptions unacceptable (for 3.3, or for mainline)?

That looks like a noticeable amount of memory in the worst case, but not
a problem in the normal case, so I think we can live with that for now
to fix a bootstrap problem.

> If yes, is it ok if we get rid of them just on 64-bit hosts (sched-ebb.c
> is by default used AFAIK on IA-64 target, so that would save memory during
> IA-64 native compilations)?

I don't like that choice.  We should fix the problem everywhere if we
fix it at all.

> Also, do we want to refcount the cselib_subst_to_values'ed cselib_val's
> (which would mean tracking where we release last references to them),
> or just flag them as never useless when cselib_subst_to_values is called
> and only free them at cselib_finish time?

recounting seems like a bit of trouble, but would be good if it isn't
too hard to get working.

Freeing them at cselib_finish_time seems reasonable.  The current code
incidentally doesn't try to free the values.  Apparently it relies on GC
to free them but there is no ggc_collect call during sched, so we should
try to free them ourselves.

> 	* cselib.c (cselib_subst_to_values_1): Renamed from
> 	cselib_subst_to_values.

The patch seems reasonable to me if it works.  It is lacking comments
explaining why we are doing this though.  There should be a comment for
cselib_subst_to_values saying that it should only be called from outside
cselib, and there should be a comment pointing out that we can't free
apparently unused values during cselib if cselib_subst_to_values was
called, because then we end up with dangling pointers outside cselib.
-- 
Jim Wilson, GNU Tools Support, http://www.specifix.com


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