diff options
author | Trevor Saunders <tsaunders@mozilla.com> | 2014-06-24 13:21:35 +0000 |
---|---|---|
committer | Trevor Saunders <tbsaunde@gcc.gnu.org> | 2014-06-24 13:21:35 +0000 |
commit | c203e8a73b2f12a1da52a16a0c4a50e62b42445b (patch) | |
tree | b8d7f5b21a14b16949ddbc5dcaeb5f2b2654d63a /gcc/bitmap.c | |
parent | fbc2a724d481bb5c205baeaaa955533451226d01 (diff) | |
download | gcc-c203e8a73b2f12a1da52a16a0c4a50e62b42445b.zip gcc-c203e8a73b2f12a1da52a16a0c4a50e62b42445b.tar.gz gcc-c203e8a73b2f12a1da52a16a0c4a50e62b42445b.tar.bz2 |
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.
From-SVN: r211936
Diffstat (limited to 'gcc/bitmap.c')
-rw-r--r-- | gcc/bitmap.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/bitmap.c b/gcc/bitmap.c index 4f014331..5f342d4 100644 --- a/gcc/bitmap.c +++ b/gcc/bitmap.c @@ -80,7 +80,7 @@ bitmap_desc_hasher::equal (const value_type *d, const compare_type *l) } /* Hashtable mapping bitmap names to descriptors. */ -static hash_table <bitmap_desc_hasher> bitmap_desc_hash; +static hash_table<bitmap_desc_hasher> *bitmap_desc_hash; /* For given file and line, return descriptor, create new if needed. */ static bitmap_descriptor @@ -93,12 +93,13 @@ get_bitmap_descriptor (const char *file, int line, const char *function) loc.function = function; loc.line = line; - if (!bitmap_desc_hash.is_created ()) - bitmap_desc_hash.create (10); + if (!bitmap_desc_hash) + bitmap_desc_hash = new hash_table<bitmap_desc_hasher> (10); - slot = bitmap_desc_hash.find_slot_with_hash (&loc, - htab_hash_pointer (file) + line, - INSERT); + slot + = bitmap_desc_hash->find_slot_with_hash (&loc, + htab_hash_pointer (file) + line, + INSERT); if (*slot) return *slot; @@ -2185,7 +2186,7 @@ dump_bitmap_statistics (void) if (! GATHER_STATISTICS) return; - if (!bitmap_desc_hash.is_created ()) + if (!bitmap_desc_hash) return; fprintf (stderr, @@ -2196,7 +2197,7 @@ dump_bitmap_statistics (void) fprintf (stderr, "---------------------------------------------------------------------------------\n"); info.count = 0; info.size = 0; - bitmap_desc_hash.traverse <output_info *, print_statistics> (&info); + bitmap_desc_hash->traverse <output_info *, print_statistics> (&info); fprintf (stderr, "---------------------------------------------------------------------------------\n"); fprintf (stderr, "%-41s %9"PRId64" %15"PRId64"\n", |