aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-im.c
diff options
context:
space:
mode:
authorTrevor Saunders <tsaunders@mozilla.com>2014-08-02 11:34:54 +0000
committerTrevor Saunders <tbsaunde@gcc.gnu.org>2014-08-02 11:34:54 +0000
commitb787e7a2c2c9be2f548d4c76ec324b71859851a4 (patch)
treeb20f9df1d7e2cb3a642d2fab604f827c7d23712a /gcc/tree-ssa-loop-im.c
parent6e2830c3dbe0d4972519ddd44bd1b15b2b274ba2 (diff)
downloadgcc-b787e7a2c2c9be2f548d4c76ec324b71859851a4.zip
gcc-b787e7a2c2c9be2f548d4c76ec324b71859851a4.tar.gz
gcc-b787e7a2c2c9be2f548d4c76ec324b71859851a4.tar.bz2
convert many uses of pointer_map to hash_map
gcc/c-family/ * cilk.c: Use hash_map instead of pointer_map. gcc/c/ * c-typeck.c: Use hash_map instead of pointer_map. gcc/cp/ * optimize.c, semantics.c: Use hash_map instead of pointer_map. gcc/ * hash-map.h (default_hashmap_traits::mark_key_deleted): Fix cast. (hash_map::remove): New method. (hash_map::traverse): New method. * cgraph.h, except.c, except.h, gimple-ssa-strength-reduction.c, ipa-utils.c, lto-cgraph.c, lto-streamer.h, omp-low.c, predict.c, tree-cfg.c, tree-cfgcleanup.c, tree-eh.c, tree-eh.h, tree-inline.c, tree-inline.h, tree-nested.c, tree-sra.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-reassoc.c, tree-ssa-structalias.c, tree-ssa.c, tree-ssa.h, var-tracking.c: Use hash_map instead of pointer_map. From-SVN: r213517
Diffstat (limited to 'gcc/tree-ssa-loop-im.c')
-rw-r--r--gcc/tree-ssa-loop-im.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index c614978..0cbb3ae 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#include "gimple-pretty-print.h"
#include "pointer-set.h"
+#include "hash-map.h"
#include "hash-table.h"
#include "tree-ssa-alias.h"
#include "internal-fn.h"
@@ -103,7 +104,7 @@ struct lim_aux_data
/* Maps statements to their lim_aux_data. */
-static struct pointer_map_t *lim_aux_data_map;
+static hash_map<gimple, lim_aux_data *> *lim_aux_data_map;
/* Description of a memory reference location. */
@@ -225,20 +226,20 @@ static bool ref_indep_loop_p (struct loop *, mem_ref_p);
static struct lim_aux_data *
init_lim_data (gimple stmt)
{
- void **p = pointer_map_insert (lim_aux_data_map, stmt);
+ lim_aux_data *p = XCNEW (struct lim_aux_data);
+ lim_aux_data_map->put (stmt, p);
- *p = XCNEW (struct lim_aux_data);
- return (struct lim_aux_data *) *p;
+ return p;
}
static struct lim_aux_data *
get_lim_data (gimple stmt)
{
- void **p = pointer_map_contains (lim_aux_data_map, stmt);
+ lim_aux_data **p = lim_aux_data_map->get (stmt);
if (!p)
return NULL;
- return (struct lim_aux_data *) *p;
+ return *p;
}
/* Releases the memory occupied by DATA. */
@@ -253,11 +254,11 @@ free_lim_aux_data (struct lim_aux_data *data)
static void
clear_lim_data (gimple stmt)
{
- void **p = pointer_map_contains (lim_aux_data_map, stmt);
+ lim_aux_data **p = lim_aux_data_map->get (stmt);
if (!p)
return;
- free_lim_aux_data ((struct lim_aux_data *) *p);
+ free_lim_aux_data (*p);
*p = NULL;
}
@@ -2429,7 +2430,7 @@ tree_ssa_lim_initialize (void)
bitmap_obstack_initialize (&lim_bitmap_obstack);
gcc_obstack_init (&mem_ref_obstack);
- lim_aux_data_map = pointer_map_create ();
+ lim_aux_data_map = new hash_map<gimple, lim_aux_data *>;
if (flag_tm)
compute_transaction_bits ();
@@ -2484,7 +2485,7 @@ tree_ssa_lim_finalize (void)
SET_ALWAYS_EXECUTED_IN (bb, NULL);
bitmap_obstack_release (&lim_bitmap_obstack);
- pointer_map_destroy (lim_aux_data_map);
+ delete lim_aux_data_map;
delete memory_accesses.refs;
memory_accesses.refs = NULL;