[08/13] tm: complete tm_restart insertion

Message ID or4jthfp1e.fsf@lxoliva.fsfla.org
State Accepted
Headers
Series [01/13] scoped tables: insert before further lookups |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Alexandre Oliva Dec. 27, 2022, 4:28 a.m. UTC
  Insertion of a tm_restart_node in tm_restart failed to record the
newly-allocated node in the hash table.

Regstrapped on x86_64-linux-gnu.  Ok to install?


for  gcc/ChangeLog

	* trans-mem.cc (split_bb_make_tm_edge): Record new node in
	tm_restart.
---
 gcc/trans-mem.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Jeff Law Dec. 27, 2022, 3:27 p.m. UTC | #1
On 12/26/22 21:28, Alexandre Oliva via Gcc-patches wrote:
> 
> Insertion of a tm_restart_node in tm_restart failed to record the
> newly-allocated node in the hash table.
> 
> Regstrapped on x86_64-linux-gnu.  Ok to install?
> 
> 
> for  gcc/ChangeLog
> 
> 	* trans-mem.cc (split_bb_make_tm_edge): Record new node in
> 	tm_restart.
OK
jeff
  

Patch

diff --git a/gcc/trans-mem.cc b/gcc/trans-mem.cc
index 131dce05476ac..cbd1b891266fd 100644
--- a/gcc/trans-mem.cc
+++ b/gcc/trans-mem.cc
@@ -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