aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-out.c
diff options
context:
space:
mode:
authorTrevor Saunders <tsaunders@mozilla.com>2014-08-07 10:44:14 +0000
committerTrevor Saunders <tbsaunde@gcc.gnu.org>2014-08-07 10:44:14 +0000
commit39c8aaa4bfab14d348ffbe515b332f03383eb1e9 (patch)
treee1ee8dbd0c20ebb30d7feede4036d428ac99a76f /gcc/lto-streamer-out.c
parent66b5e890ec57bcd04ccde2b69cdd88810697667e (diff)
downloadgcc-39c8aaa4bfab14d348ffbe515b332f03383eb1e9.zip
gcc-39c8aaa4bfab14d348ffbe515b332f03383eb1e9.tar.gz
gcc-39c8aaa4bfab14d348ffbe515b332f03383eb1e9.tar.bz2
convert the rest of the users of pointer_map to hash_map
gcc/ * hash-map.h (default_hashmap_traits): Adjust overloads of hash function to not conflict. * alias.c, cfgexpand.c, dse.c, except.h, gimple-expr.c, gimple-ssa-strength-reduction.c, gimple-ssa.h, ifcvt.c, lto-streamer-out.c, lto-streamer.h, tree-affine.c, tree-affine.h, tree-predcom.c, tree-scalar-evolution.c, tree-ssa-loop-im.c, tree-ssa-loop-niter.c, tree-ssa.c, value-prof.c: Use hash_map instead of pointer_map. gcc/cp/ * cp-tree.h, pt.c: Use hash_map instead of pointer_map. gcc/lto/ * lto-partition.c, lto.c: Use hash_map instead of pointer_map. From-SVN: r213703
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r--gcc/lto-streamer-out.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index 81a7b23..d6fec4c 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -475,7 +475,7 @@ private:
hash_scc (struct output_block *ob, unsigned first, unsigned size);
unsigned int next_dfs_num;
- struct pointer_map_t *sccstate;
+ hash_map<tree, sccs *> sccstate;
struct obstack sccstate_obstack;
};
@@ -483,7 +483,6 @@ DFS::DFS (struct output_block *ob, tree expr, bool ref_p, bool this_ref_p,
bool single_p)
{
sccstack.create (0);
- sccstate = pointer_map_create ();
gcc_obstack_init (&sccstate_obstack);
next_dfs_num = 1;
DFS_write_tree (ob, NULL, expr, ref_p, this_ref_p, single_p);
@@ -492,7 +491,6 @@ DFS::DFS (struct output_block *ob, tree expr, bool ref_p, bool this_ref_p,
DFS::~DFS ()
{
sccstack.release ();
- pointer_map_destroy (sccstate);
obstack_free (&sccstate_obstack, NULL);
}
@@ -1314,7 +1312,6 @@ DFS::DFS_write_tree (struct output_block *ob, sccs *from_state,
tree expr, bool ref_p, bool this_ref_p, bool single_p)
{
unsigned ix;
- sccs **slot;
/* Handle special cases. */
if (expr == NULL_TREE)
@@ -1328,7 +1325,7 @@ DFS::DFS_write_tree (struct output_block *ob, sccs *from_state,
if (streamer_tree_cache_lookup (ob->writer_cache, expr, &ix))
return;
- slot = (sccs **)pointer_map_insert (sccstate, expr);
+ sccs **slot = &sccstate.get_or_insert (expr);
sccs *cstate = *slot;
if (!cstate)
{