aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-ssa.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gimple-ssa.h')
-rw-r--r--gcc/gimple-ssa.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/gcc/gimple-ssa.h b/gcc/gimple-ssa.h
index d2e62a9..c023956 100644
--- a/gcc/gimple-ssa.h
+++ b/gcc/gimple-ssa.h
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#define GCC_GIMPLE_SSA_H
#include "hash-map.h"
+#include "tree-hasher.h"
#include "tree-ssa-operands.h"
/* This structure is used to map a gimple statement to a label,
@@ -32,6 +33,25 @@ struct GTY(()) tm_restart_node {
tree label_or_list;
};
+struct ssa_name_hasher : ggc_hasher<tree>
+{
+ /* Hash a tree in a uid_decl_map. */
+
+ static hashval_t
+ hash (tree item)
+ {
+ return item->ssa_name.var->decl_minimal.uid;
+ }
+
+ /* Return true if the DECL_UID in both trees are equal. */
+
+ static bool
+ equal (tree a, tree b)
+{
+ return (a->ssa_name.var->decl_minimal.uid == b->ssa_name.var->decl_minimal.uid);
+}
+};
+
/* Gimple dataflow datastructure. All publicly available fields shall have
gimple_ accessor defined, all publicly modifiable fields should have
gimple_set accessor. */
@@ -63,7 +83,7 @@ struct GTY(()) gimple_df {
means that the first reference to this variable in the function is a
USE or a VUSE. In those cases, the SSA renamer creates an SSA name
for this variable with an empty defining statement. */
- htab_t GTY((param_is (union tree_node))) default_defs;
+ hash_table<ssa_name_hasher> *default_defs;
/* True if there are any symbols that need to be renamed. */
unsigned int ssa_renaming_needed : 1;