diff options
author | Trevor Saunders <tsaunders@mozilla.com> | 2014-11-20 15:10:56 +0000 |
---|---|---|
committer | Trevor Saunders <tbsaunde@gcc.gnu.org> | 2014-11-20 15:10:56 +0000 |
commit | 509793471ab9e93d8627a6d74064ec43c36ff4ca (patch) | |
tree | 32d0ea1b5e051e3d370ca84a45ea541a8f404a5d /gcc/gimple-ssa.h | |
parent | 907dadbd2ade80fd356071954711375ce9b0c85a (diff) | |
download | gcc-509793471ab9e93d8627a6d74064ec43c36ff4ca.zip gcc-509793471ab9e93d8627a6d74064ec43c36ff4ca.tar.gz gcc-509793471ab9e93d8627a6d74064ec43c36ff4ca.tar.bz2 |
convert trans-mem to hash_table
gcc/
* cfgexpand.c, gimple-ssa.h, trans-mem.c: Replace htab with
hash_table.
From-SVN: r217872
Diffstat (limited to 'gcc/gimple-ssa.h')
-rw-r--r-- | gcc/gimple-ssa.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/gimple-ssa.h b/gcc/gimple-ssa.h index c023956..9bdb233 100644 --- a/gcc/gimple-ssa.h +++ b/gcc/gimple-ssa.h @@ -28,11 +28,24 @@ along with GCC; see the file COPYING3. If not see /* This structure is used to map a gimple statement to a label, or list of labels to represent transaction restart. */ -struct GTY(()) tm_restart_node { +struct GTY((for_user)) tm_restart_node { gimple stmt; tree label_or_list; }; +/* Hasher for tm_restart_node. */ + +struct tm_restart_hasher : ggc_hasher<tm_restart_node *> +{ + static hashval_t hash (tm_restart_node *n) { return htab_hash_pointer (n); } + + static bool + equal (tm_restart_node *a, tm_restart_node *b) + { + return a == b; + } +}; + struct ssa_name_hasher : ggc_hasher<tree> { /* Hash a tree in a uid_decl_map. */ @@ -101,7 +114,7 @@ struct GTY(()) gimple_df { /* Map gimple stmt to tree label (or list of labels) for transaction restart and abort. */ - htab_t GTY ((param_is (struct tm_restart_node))) tm_restart; + hash_table<tm_restart_hasher> *tm_restart; }; |