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: [gc-improv] Move tree-ssa-strucalias.c:heapvar_for_stmt to obstack


On Sun, Nov 1, 2009 at 8:33 PM, Laurynas Biveinis
<laurynas.biveinis@gmail.com> wrote:
> Thanks for pointing this out.
>
> Gengtype did not output typed allocators for struct heapvar_map, which
> usually is a sign that GGC knows nothing about the type and collects
> all its objects upon next ggc_collect. After your email, I confirmed
> with a debugger that struct heapvar_map objects are indeed live
> throughout compilation.
>
> Then I found the root cause:
> static GTY ((if_marked ("tree_map_marked_p"), param_is (struct tree_map)))
> htab_t heapvar_for_stmt;
>
> is lying to gengtype about its parameter type (heapvar_map not
> tree_map). After changing this, gengtype produced the needed typed
> allocator and that's the patch I am testing now.

Ah well, because heapvar_map is a tree_map plus an integer, so it
shouldn't matter for GGC purposes.

> Does anybody know reason why the GTY annotation for heapvar_for_stmt
> had tree_map as a param_is argument in the first place?

Because it was a plain tree_map at some point and I didn't update it
appearantly.

Richard.


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