This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix my gcse ldst speedup


This fixes a thinko in my gcse speedup patch which causes -fgcse
-fno-gcse-lm to segfault deleting a NULL hashtable.

Will apply as obvious after some sanity-checking.

Richard.

2005-11-10  Richard Guenther  <rguenther@suse.de>

	* gcse.c (free_ldst_entry): Only free hashtable if
	it exists.

Index: gcse.c
===================================================================
--- gcse.c	(revision 106728)
+++ gcse.c	(working copy)
@@ -5088,7 +5088,8 @@ free_ldst_entry (struct ls_expr * ptr)
 static void
 free_ldst_mems (void)
 {
-  htab_delete (pre_ldst_table);
+  if (pre_ldst_table)
+    htab_delete (pre_ldst_table);
   pre_ldst_table = NULL;
 
   while (pre_ldst_mems)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]