tm: complete tm_restart insertion
authorAlexandre Oliva <oliva@adacore.com>
Thu, 29 Dec 2022 17:32:57 +0000 (14:32 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Thu, 29 Dec 2022 17:39:47 +0000 (14:39 -0300)
Insertion of a tm_restart_node in tm_restart failed to record the
newly-allocated node in the hash table.

for  gcc/ChangeLog

* trans-mem.cc (split_bb_make_tm_edge): Record new node in
tm_restart.

gcc/trans-mem.cc

index 131dce0..cbd1b89 100644 (file)
@@ -3215,7 +3215,7 @@ split_bb_make_tm_edge (gimple *stmt, basic_block dest_bb,
   struct tm_restart_node *n = *slot;
   if (n == NULL)
     {
-      n = ggc_alloc<tm_restart_node> ();
+      *slot = n = ggc_alloc<tm_restart_node> ();
       *n = dummy;
     }
   else