This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] move many gc hashtab to hash_table
- From: Trevor Saunders <tsaunders at mozilla dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 10 Oct 2014 16:44:33 -0400
- Subject: Re: [PATCH] move many gc hashtab to hash_table
- Authentication-results: sourceware.org; auth=none
- References: <1412652246-20284-1-git-send-email-tsaunders at mozilla dot com> <543840D8 dot 5030409 at redhat dot com>
On Fri, Oct 10, 2014 at 02:26:00PM -0600, Jeff Law wrote:
> On 10/06/14 21:24, tsaunders@mozilla.com wrote:
> >From: Trevor Saunders <tsaunders@mozilla.com>
> >
> >Hi,
> >
> >This changes almost all of the ggc htab that don't use the if_marked option to
> >be hash_tables. I added a for_user gty attribute so that types could be used
> >from user marking routines without either using the mangled names or being
> >referenced in a template argument which was previously the only way to get
> >gengtype to emit user callable marking routines.
> >
> >bootstrapped + regtested on x86_64-unknown-linux-gnu, ran make all-gcc for
> >ppc64-linux, ppc64-apple-darwin, mips-elf, m32c-elf, mep-elf, and
> >x86_64-apple-darwin. I haven't heard back yet on my request for a cfarm
> >account so I haven't tried bootstrapping on other archs, but more testing is
> >most welcome. Ok?
> >
> >Trev
> >
> >
> >gcc/
> >
> >* asan.c, cfgloop.c, cfgloop.h, cgraph.c, cgraph.h,
> > config/darwin.c, config/m32c/m32c.c, config/mep/mep.c,
> > config/mips/mips.c, config/rs6000/rs6000.c, dwarf2out.c,
> > function.c, function.h, gimple-ssa.h, libfuncs.h, optabs.c,
> > output.h, rtl.h, sese.c, symtab.c, tree-cfg.c, tree-dfa.c,
> > tree-ssa.c, varasm.c: Use hash-table instead of hashtab.
> > * doc/gty.texi (for_user): Document new option.
> > * gengtype.c (create_user_defined_type): Don't try to get a struct for
> > char.
> > (walk_type): Don't error out on for_user option.
> > (write_func_for_structure): Emit user marking routines if requested by
> > for_user option.
> > (write_local_func_for_structure): Likewise.
> > (main): Mark types with for_user option as used.
> > * ggc.h (gt_pch_nx): Add overload for unsigned int.
> > * hash-map.h (hash_map::hash_entry::pch_nx_helper): AddOverloads.
> > * hash-table.h (ggc_hasher): New struct.
> > (hash_table::create_ggc): New function.
> > (gt_pch_nx): New overload for hash_table.
> >
> >java/
> >
> > * class.c, decl.c, except.c, expr.c, java-tree.h, lang.c: Use
> > hash_table instead of hashtab.
> >
> >objc/
> >
> > * objc-act.c: use hash_table instead of hashtab.
> >
> >cp/
> >
> > * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
> > pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
> > hashtab.
> >
> >fortran/
> >
> > * trans-decl.c, trans.c, trans.h: Use hash_table instead of hashtab.
> >
> >c-family/
> >
> > * c-common.c: Use hash_table instead of hashtab.
> Whee, meaning we no longer have to pass through void * pointers and the
> visually ugly casting that requires in the callbacks?!? Yea!
yeah, you can even use an iterator now if you like
> >- ++*((unsigned HOST_WIDE_INT *) data);
> >+ ++* data;
> I think coding standards require no space here. Obviously a nit.
oops, definitely should be fixed :)
> This is obviously a fairly mechanical change. I did some spot checking and
> it looks good. I don't expect any fallout.
Well, its large enough I expect *something* but I doubt it'll be a big
deal.
> Good for the trunk.
thanks for the review, I know it was rather big.
Trev
>
> Thanks,
> Jeff
>