summaryrefslogtreecommitdiff
path: root/gcc/trans-mem.c
diff options
context:
space:
mode:
authortbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-20 15:10:56 +0000
committertbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-20 15:10:56 +0000
commitb7aa58e45b5ed7639b872a9201d5016db87ba596 (patch)
tree32d0ea1b5e051e3d370ca84a45ea541a8f404a5d /gcc/trans-mem.c
parent9f9f871f6cb738b7ce11633bd9a2e7336b136786 (diff)
downloadgcc-b7aa58e45b5ed7639b872a9201d5016db87ba596.tar.gz
convert trans-mem to hash_table
gcc/ * cfgexpand.c, gimple-ssa.h, trans-mem.c: Replace htab with hash_table. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217872 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/trans-mem.c')
-rw-r--r--gcc/trans-mem.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c
index a7de3e60f2f..51f79a204df 100644
--- a/gcc/trans-mem.c
+++ b/gcc/trans-mem.c
@@ -3109,15 +3109,16 @@ split_bb_make_tm_edge (gimple stmt, basic_block dest_bb,
// Record the need for the edge for the benefit of the rtl passes.
if (cfun->gimple_df->tm_restart == NULL)
- cfun->gimple_df->tm_restart = htab_create_ggc (31, struct_ptr_hash,
- struct_ptr_eq, ggc_free);
+ cfun->gimple_df->tm_restart
+ = hash_table<tm_restart_hasher>::create_ggc (31);
struct tm_restart_node dummy;
dummy.stmt = stmt;
dummy.label_or_list = gimple_block_label (dest_bb);
- void **slot = htab_find_slot (cfun->gimple_df->tm_restart, &dummy, INSERT);
- struct tm_restart_node *n = (struct tm_restart_node *) *slot;
+ tm_restart_node **slot = cfun->gimple_df->tm_restart->find_slot (&dummy,
+ INSERT);
+ struct tm_restart_node *n = *slot;
if (n == NULL)
{
n = ggc_alloc<tm_restart_node> ();
@@ -3196,7 +3197,7 @@ expand_block_edges (struct tm_region *const region, basic_block bb)
if (cfun->gimple_df->tm_restart == NULL)
cfun->gimple_df->tm_restart
- = htab_create_ggc (31, struct_ptr_hash, struct_ptr_eq, ggc_free);
+ = hash_table<tm_restart_hasher>::create_ggc (31);
// All TM builtins have an abnormal edge to the outer-most transaction.
// We never restart inner transactions.