summaryrefslogtreecommitdiff
path: root/gcc/tree-complex.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-complex.c')
-rw-r--r--gcc/tree-complex.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index f8dbe0a8519..cd8f53b7b32 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-iterator.h"
#include "tree-pass.h"
#include "tree-ssa-propagate.h"
+#include "tree-hasher.h"
/* For each complex ssa name, a lattice value. We're interested in finding
@@ -53,7 +54,7 @@ static vec<complex_lattice_t> complex_lattice_values;
/* For each complex variable, a pair of variables for the components exists in
the hashtable. */
-static htab_t complex_variable_components;
+static int_tree_htab_type complex_variable_components;
/* For each complex SSA_NAME, a pair of ssa names for the components. */
static vec<tree> complex_ssa_name_components;
@@ -65,7 +66,7 @@ cvc_lookup (unsigned int uid)
{
struct int_tree_map *h, in;
in.uid = uid;
- h = (struct int_tree_map *) htab_find_with_hash (complex_variable_components, &in, uid);
+ h = complex_variable_components.find_with_hash (&in, uid);
return h ? h->to : NULL;
}
@@ -75,14 +76,13 @@ static void
cvc_insert (unsigned int uid, tree to)
{
struct int_tree_map *h;
- void **loc;
+ int_tree_map **loc;
h = XNEW (struct int_tree_map);
h->uid = uid;
h->to = to;
- loc = htab_find_slot_with_hash (complex_variable_components, h,
- uid, INSERT);
- *(struct int_tree_map **) loc = h;
+ loc = complex_variable_components.find_slot_with_hash (h, uid, INSERT);
+ *loc = h;
}
/* Return true if T is not a zero constant. In the case of real values,
@@ -1604,8 +1604,7 @@ tree_lower_complex (void)
init_parameter_lattice_values ();
ssa_propagate (complex_visit_stmt, complex_visit_phi);
- complex_variable_components = htab_create (10, int_tree_map_hash,
- int_tree_map_eq, free);
+ complex_variable_components.create (10);
complex_ssa_name_components.create (2 * num_ssa_names);
complex_ssa_name_components.safe_grow_cleared (2 * num_ssa_names);
@@ -1626,7 +1625,7 @@ tree_lower_complex (void)
gsi_commit_edge_inserts ();
- htab_delete (complex_variable_components);
+ complex_variable_components.dispose ();
complex_ssa_name_components.release ();
complex_lattice_values.release ();
return 0;