This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix my gcse ldst speedup
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 10 Nov 2005 13:07:46 +0100 (CET)
- Subject: [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)