From c1f445d2fbea31314327e0ce37f86184a6ae3de7 Mon Sep 17 00:00:00 2001 From: tbsaunde Date: Tue, 24 Jun 2014 13:21:35 +0000 Subject: 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 --- gcc/ipa-profile.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'gcc/ipa-profile.c') diff --git a/gcc/ipa-profile.c b/gcc/ipa-profile.c index 339f38ea0db..625d49cbbb9 100644 --- a/gcc/ipa-profile.c +++ b/gcc/ipa-profile.c @@ -112,12 +112,12 @@ histogram_hash::equal (const histogram_entry *val, const histogram_entry *val2) HASHTABLE is the on-side hash kept to avoid duplicates. */ static void -account_time_size (hash_table hashtable, +account_time_size (hash_table *hashtable, vec &histogram, gcov_type count, int time, int size) { histogram_entry key = {count, 0, 0}; - histogram_entry **val = hashtable.find_slot (&key, INSERT); + histogram_entry **val = hashtable->find_slot (&key, INSERT); if (!*val) { @@ -179,10 +179,9 @@ ipa_profile_generate_summary (void) { struct cgraph_node *node; gimple_stmt_iterator gsi; - hash_table hashtable; basic_block bb; - hashtable.create (10); + hash_table hashtable (10); histogram_pool = create_alloc_pool ("IPA histogram", sizeof (struct histogram_entry), 10); @@ -230,9 +229,8 @@ ipa_profile_generate_summary (void) time += estimate_num_insns (stmt, &eni_time_weights); size += estimate_num_insns (stmt, &eni_size_weights); } - account_time_size (hashtable, histogram, bb->count, time, size); + account_time_size (&hashtable, histogram, bb->count, time, size); } - hashtable.dispose (); histogram.qsort (cmp_counts); } @@ -263,10 +261,9 @@ ipa_profile_read_summary (void) struct lto_file_decl_data ** file_data_vec = lto_get_file_decl_data (); struct lto_file_decl_data * file_data; - hash_table hashtable; int j = 0; - hashtable.create (10); + hash_table hashtable (10); histogram_pool = create_alloc_pool ("IPA histogram", sizeof (struct histogram_entry), 10); @@ -287,7 +284,7 @@ ipa_profile_read_summary (void) gcov_type count = streamer_read_gcov_count (ib); int time = streamer_read_uhwi (ib); int size = streamer_read_uhwi (ib); - account_time_size (hashtable, histogram, + account_time_size (&hashtable, histogram, count, time, size); } lto_destroy_simple_input_block (file_data, @@ -295,7 +292,6 @@ ipa_profile_read_summary (void) ib, data, len); } } - hashtable.dispose (); histogram.qsort (cmp_counts); } -- cgit v1.2.1