This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: infinite loop in find_avail_set
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: infinite loop in find_avail_set
- From: Bernd Schmidt <bernds at cygnus dot co dot uk>
- Date: Thu, 26 Aug 1999 18:13:46 +0100 (BST)
- cc: "Jeffrey A. Law" <law at cygnus dot com>, gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
> Contrary to Jeff's analysis, I'd like to present a test case that does
> in fact result in a loop. I returned to my computer this morning to
> find that compiling yyparse in cexp.c for stage1 of new_ia32_branch does
> not complete.
>
> There's a built tree at /bcpl/int/rth/egcs/build/new/gcc with z.i being
> the preprocessed test case, if you have time to look at it quickly.
> Otherwise I'll look at it further when I get to the office.
It seems that Jeff misremembered having already installed the patch below.
Bernd
* gcse.c (hash_scan_insn): Don't scan obvious no-ops.
Index: gcse.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/gcse.c,v
retrieving revision 1.39
diff -u -p -r1.39 gcse.c
--- gcse.c 1999/06/03 00:19:42 1.39
+++ gcse.c 1999/07/16 09:56:45
@@ -1915,7 +1923,11 @@ hash_scan_insn (insn, set_p, in_libcall_
what's been modified. */
if (GET_CODE (pat) == SET && ! in_libcall_block)
- hash_scan_set (pat, insn, set_p);
+ {
+ /* Ignore obvious no-ops. */
+ if (SET_SRC (pat) != SET_DEST (pat))
+ hash_scan_set (pat, insn, set_p);
+ }
else if (GET_CODE (pat) == PARALLEL)
{
int i;