On 10/06/14 21:24, tsaund...@mozilla.com wrote:
From: Trevor Saunders <tsaund...@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!


-    ++*((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.

Thanks,
Jeff

Reply via email to