aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadupdate.c
diff options
context:
space:
mode:
authorTrevor Saunders <tsaunders@mozilla.com>2014-06-24 13:21:35 +0000
committerTrevor Saunders <tbsaunde@gcc.gnu.org>2014-06-24 13:21:35 +0000
commitc203e8a73b2f12a1da52a16a0c4a50e62b42445b (patch)
treeb8d7f5b21a14b16949ddbc5dcaeb5f2b2654d63a /gcc/tree-ssa-threadupdate.c
parentfbc2a724d481bb5c205baeaaa955533451226d01 (diff)
downloadgcc-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/tree-ssa-threadupdate.c')
-rw-r--r--gcc/tree-ssa-threadupdate.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index fa31613..02cf42c 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -311,7 +311,7 @@ create_block_for_threading (basic_block bb,
/* Main data structure to hold information for duplicates of BB. */
-static hash_table <redirection_data> redirection_data;
+static hash_table<redirection_data> *redirection_data;
/* Given an outgoing edge E lookup and return its entry in our hash table.
@@ -334,7 +334,7 @@ lookup_redirection_data (edge e, enum insert_option insert)
elt->dup_blocks[1] = NULL;
elt->incoming_edges = NULL;
- slot = redirection_data.find_slot (elt, insert);
+ slot = redirection_data->find_slot (elt, insert);
/* This will only happen if INSERT is false and the entry is not
in the hash table. */
@@ -850,7 +850,8 @@ thread_block_1 (basic_block bb, bool noloop_only, bool joiners)
use a hash table. For normal code there should be no noticeable
difference. However, if we have a block with a large number of
incoming and outgoing edges such linear searches can get expensive. */
- redirection_data.create (EDGE_COUNT (bb->succs));
+ redirection_data
+ = new hash_table<struct redirection_data> (EDGE_COUNT (bb->succs));
/* If we thread the latch of the loop to its exit, the loop ceases to
exist. Make sure we do not restrict ourselves in order to preserve
@@ -961,7 +962,7 @@ thread_block_1 (basic_block bb, bool noloop_only, bool joiners)
local_info.template_block = NULL;
local_info.bb = bb;
local_info.jumps_threaded = false;
- redirection_data.traverse <ssa_local_info_t *, ssa_create_duplicates>
+ redirection_data->traverse <ssa_local_info_t *, ssa_create_duplicates>
(&local_info);
/* The template does not have an outgoing edge. Create that outgoing
@@ -969,18 +970,19 @@ thread_block_1 (basic_block bb, bool noloop_only, bool joiners)
We do this after creating all the duplicates to avoid creating
unnecessary edges. */
- redirection_data.traverse <ssa_local_info_t *, ssa_fixup_template_block>
+ redirection_data->traverse <ssa_local_info_t *, ssa_fixup_template_block>
(&local_info);
/* The hash table traversals above created the duplicate blocks (and the
statements within the duplicate blocks). This loop creates PHI nodes for
the duplicated blocks and redirects the incoming edges into BB to reach
the duplicates of BB. */
- redirection_data.traverse <ssa_local_info_t *, ssa_redirect_edges>
+ redirection_data->traverse <ssa_local_info_t *, ssa_redirect_edges>
(&local_info);
/* Done with this block. Clear REDIRECTION_DATA. */
- redirection_data.dispose ();
+ delete redirection_data;
+ redirection_data = NULL;
if (noloop_only
&& bb == bb->loop_father->header)