This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] move many gc hashtab to hash_table
- From: Jeff Law <law at redhat dot com>
- To: tsaunders at mozilla dot com, gcc-patches at gcc dot gnu dot org
- Date: Fri, 10 Oct 2014 14:26:00 -0600
- 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>
On 10/06/14 21:24, firstname.lastname@example.org wrote:
Whee, meaning we no longer have to pass through void * pointers and the
visually ugly casting that requires in the callbacks?!? Yea!
From: Trevor Saunders <email@example.com>
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?
* 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
(walk_type): Don't error out on for_user option.
(write_func_for_structure): Emit user marking routines if requested by
(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.
* class.c, decl.c, except.c, expr.c, java-tree.h, lang.c: Use
hash_table instead of hashtab.
* objc-act.c: use hash_table instead of hashtab.
* 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
* trans-decl.c, trans.c, trans.h: Use hash_table instead of hashtab.
* c-common.c: Use hash_table instead of hashtab.
- ++*((unsigned HOST_WIDE_INT *) data);
+ ++* data;
I think coding standards require no space here. Obviously a nit.
This is obviously a fairly mechanical change. I did some spot checking
and it looks good. I don't expect any fallout.
Good for the trunk.