This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] ree.c: don't abuse GTY
On Fri, Dec 7, 2012 at 10:57 AM, Jakub Jelinek wrote:
> I'd say removing the GTY(()) on a struct that is never GC allocated
> nor interesting to PCH is obvious, the removal of TODO_ggc_collect is not
> so. Right now it is set by passes that expect to potentially
> create enough GC garbage that a collection might be desirable.
> You haven't explained why you think it is the case of ree.c.
You're right, I should have explained it.
Perhaps somewhere during the development of ree.c struct ext_cand was
GGC-allocated, in which case TODO_ggc_collect would make sense, to
collect the ext_cands (there can be many of them). But since ext_cands
are not GGC-allocated, the only garbage "produced" by ree.c is when it
removes redundant extensions (via delete_insn). This is typically only
a very small percentage of the instructions, so there isn't a lot of
garbage produced.
I'll leave the TODO in place, and only remove the GTY marker from
struct ext_cand.
Ciao!
Steven