diff options
author | tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-24 13:21:35 +0000 |
---|---|---|
committer | tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-24 13:21:35 +0000 |
commit | c1f445d2fbea31314327e0ce37f86184a6ae3de7 (patch) | |
tree | b8d7f5b21a14b16949ddbc5dcaeb5f2b2654d63a /gcc/lto | |
parent | d0285fb08b709575f6b35bf46efbae5e1cb3a40a (diff) | |
download | gcc-c1f445d2fbea31314327e0ce37f86184a6ae3de7.tar.gz |
Remove a layer of indirection from hash_table
gcc/
* hash-table.h: Remove a layer of indirection from hash_table so that
it contains the hash table's data instead of a pointer to the data.
* alloc-pool.c, asan.c, attribs.c, bitmap.c, cfg.c,
config/arm/arm.c, config/i386/winnt.c, config/ia64/ia64.c,
config/mips/mips.c, config/sol2.c, coverage.c, cselib.c,
data-streamer-out.c, dse.c, dwarf2cfi.c, dwarf2out.c, except.c,
fold-const.c, gcse.c, ggc-common.c,
gimple-ssa-strength-reduction.c, gimplify.c,
graphite-clast-to-gimple.c, graphite-dependences.c,
graphite-htab.h, graphite.c, haifa-sched.c, ipa-devirt.c,
ipa-profile.c, ira-color.c, ira-costs.c, loop-invariant.c,
loop-iv.c, loop-unroll.c, lto-streamer-in.c, lto-streamer-out.c,
lto-streamer.c, lto-streamer.h, passes.c, plugin.c,
postreload-gcse.c, sese.c, statistics.c, store-motion.c,
trans-mem.c, tree-browser.c, tree-cfg.c, tree-complex.c,
tree-eh.c, tree-into-ssa.c, tree-parloops.c, tree-sra.c,
tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-dom.c,
tree-ssa-live.c, tree-ssa-loop-im.c,
tree-ssa-loop-ivopts.c, tree-ssa-phiopt.c, tree-ssa-pre.c,
tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-strlen.c,
tree-ssa-structalias.c, tree-ssa-tail-merge.c,
tree-ssa-threadupdate.c, tree-ssa-uncprop.c,
tree-vect-data-refs.c, tree-vect-loop.c, tree-vectorizer.c,
tree-vectorizer.h, valtrack.c, valtrack.h, var-tracking.c,
vtable-verify.c, vtable-verify.h: Adjust.
gcc/c/
* c-decl.c: Adjust.
gcc/cp/
* class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
Adjust.
gcc/java/
* jcf-io.c: Adjust.
gcc/lto/
* lto.c: Adjust.
gcc/objc/
* objc-act.c: Adjust.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211936 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/lto/lto.c | 19 |
2 files changed, 14 insertions, 9 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 4086b2134eb..29d7a5bff71 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,7 @@ +2014-06-24 Trevor Saunders <tsaunders@mozilla.com> + + * lto.c: Adjust. + 2014-06-20 Jan Hubicka <hubicka@ucw.cz> * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts. diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 9cee3701e05..1fe7ce4eefb 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -1137,7 +1137,7 @@ tree_scc_hasher::equal (const value_type *scc1, const compare_type *scc2) return true; } -static hash_table <tree_scc_hasher> tree_scc_hash; +static hash_table<tree_scc_hasher> *tree_scc_hash; static struct obstack tree_scc_hash_obstack; static unsigned long num_merged_types; @@ -1734,7 +1734,7 @@ unify_scc (struct streamer_tree_cache_d *cache, unsigned from, /* Look for the list of candidate SCCs to compare against. */ tree_scc **slot; - slot = tree_scc_hash.find_slot_with_hash (scc, scc_hash, INSERT); + slot = tree_scc_hash->find_slot_with_hash (scc, scc_hash, INSERT); if (*slot) { /* Try unifying against each candidate. */ @@ -2921,7 +2921,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames) gimple_canonical_types = htab_create_ggc (16381, gimple_canonical_type_hash, gimple_canonical_type_eq, 0); gcc_obstack_init (&tree_scc_hash_obstack); - tree_scc_hash.create (4096); + tree_scc_hash = new hash_table<tree_scc_hasher> (4096); /* Register the common node types with the canonical type machinery so we properly share alias-sets across languages and TUs. Do not @@ -2987,7 +2987,8 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames) print_lto_report_1 (); /* Free gimple type merging datastructures. */ - tree_scc_hash.dispose (); + delete tree_scc_hash; + tree_scc_hash = NULL; obstack_free (&tree_scc_hash_obstack, NULL); htab_delete (gimple_canonical_types); gimple_canonical_types = NULL; @@ -3159,17 +3160,17 @@ print_lto_report_1 (void) fprintf (stderr, "[%s] read %lu SCCs of average size %f\n", pfx, num_sccs_read, total_scc_size / (double)num_sccs_read); fprintf (stderr, "[%s] %lu tree bodies read in total\n", pfx, total_scc_size); - if (flag_wpa && tree_scc_hash.is_created ()) + if (flag_wpa && tree_scc_hash) { fprintf (stderr, "[%s] tree SCC table: size %ld, %ld elements, " "collision ratio: %f\n", pfx, - (long) tree_scc_hash.size (), - (long) tree_scc_hash.elements (), - tree_scc_hash.collisions ()); + (long) tree_scc_hash->size (), + (long) tree_scc_hash->elements (), + tree_scc_hash->collisions ()); hash_table<tree_scc_hasher>::iterator hiter; tree_scc *scc, *max_scc = NULL; unsigned max_length = 0; - FOR_EACH_HASH_TABLE_ELEMENT (tree_scc_hash, scc, x, hiter) + FOR_EACH_HASH_TABLE_ELEMENT (*tree_scc_hash, scc, x, hiter) { unsigned length = 0; tree_scc *s = scc; |