summaryrefslogtreecommitdiff
path: root/gcc/loop-invariant.c
diff options
context:
space:
mode:
authortbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-24 13:21:35 +0000
committertbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-24 13:21:35 +0000
commitc1f445d2fbea31314327e0ce37f86184a6ae3de7 (patch)
treeb8d7f5b21a14b16949ddbc5dcaeb5f2b2654d63a /gcc/loop-invariant.c
parentd0285fb08b709575f6b35bf46efbae5e1cb3a40a (diff)
downloadgcc-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/loop-invariant.c')
-rw-r--r--gcc/loop-invariant.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c
index 25e63e44272..3852c6b91b4 100644
--- a/gcc/loop-invariant.c
+++ b/gcc/loop-invariant.c
@@ -453,14 +453,14 @@ invariant_expr_hasher::equal (const value_type *entry1,
entry2->inv->insn, entry2->expr);
}
-typedef hash_table <invariant_expr_hasher> invariant_htab_type;
+typedef hash_table<invariant_expr_hasher> invariant_htab_type;
/* Checks whether invariant with value EXPR in machine mode MODE is
recorded in EQ. If this is the case, return the invariant. Otherwise
insert INV to the table for this expression and return INV. */
static struct invariant *
-find_or_insert_inv (invariant_htab_type eq, rtx expr, enum machine_mode mode,
+find_or_insert_inv (invariant_htab_type *eq, rtx expr, enum machine_mode mode,
struct invariant *inv)
{
hashval_t hash = hash_invariant_expr_1 (inv->insn, expr);
@@ -471,7 +471,7 @@ find_or_insert_inv (invariant_htab_type eq, rtx expr, enum machine_mode mode,
pentry.expr = expr;
pentry.inv = inv;
pentry.mode = mode;
- slot = eq.find_slot_with_hash (&pentry, hash, INSERT);
+ slot = eq->find_slot_with_hash (&pentry, hash, INSERT);
entry = *slot;
if (entry)
@@ -491,7 +491,7 @@ find_or_insert_inv (invariant_htab_type eq, rtx expr, enum machine_mode mode,
hash table of the invariants. */
static void
-find_identical_invariants (invariant_htab_type eq, struct invariant *inv)
+find_identical_invariants (invariant_htab_type *eq, struct invariant *inv)
{
unsigned depno;
bitmap_iterator bi;
@@ -528,13 +528,10 @@ merge_identical_invariants (void)
{
unsigned i;
struct invariant *inv;
- invariant_htab_type eq;
- eq.create (invariants.length ());
+ invariant_htab_type eq (invariants.length ());
FOR_EACH_VEC_ELT (invariants, i, inv)
- find_identical_invariants (eq, inv);
-
- eq.dispose ();
+ find_identical_invariants (&eq, inv);
}
/* Determines the basic blocks inside LOOP that are always executed and