Commit 1649d92f by Jan Hubicka Committed by Jan Hubicka

re PR rtl-optimization/8492 (GCC spins forever compiling loop)

	PR opt/8492
	* gcse.c (one_cprop_pass): Delete unreachable blocks.

Co-Authored-By: Eric Botcazou <ebotcazou@libertysurf.fr>

From-SVN: r61798
parent 6ca86a1a
Sat Jan 25 21:04:33 CET 2003 Jan Hubicka <jh@suse.cz>
Eric Botcazou <ebotcazou@libertysurf.fr>
PR opt/8492
* gcse.c (one_cprop_pass): Delete unreachable blocks.
2003-01-25 Richard Henderson <rth@redhat.com>
* config/ia64/ia64.c (ia64_rwreloc_select_rtx_section): Rename
......
......@@ -4378,6 +4378,7 @@ local_cprop_pass (alter_jumps)
rtx insn;
struct reg_use *reg_used;
rtx libcall_stack[MAX_NESTED_LIBCALLS + 1], *libcall_sp;
bool changed = false;
cselib_init ();
libcall_sp = &libcall_stack[MAX_NESTED_LIBCALLS];
......@@ -4409,13 +4410,19 @@ local_cprop_pass (alter_jumps)
reg_used++, reg_use_count--)
if (do_local_cprop (reg_used->reg_rtx, insn, alter_jumps,
libcall_sp))
break;
{
changed = true;
break;
}
}
while (reg_use_count);
}
cselib_process_insn (insn);
}
cselib_finish ();
/* Global analysis may get into infinite loops for unreachable blocks. */
if (changed && alter_jumps)
delete_unreachable_blocks ();
}
/* Forward propagate copies. This includes copies and constants. Return
......@@ -4506,6 +4513,9 @@ one_cprop_pass (pass, cprop_jumps, bypass_jumps)
fprintf (gcse_file, "%d const props, %d copy props\n\n",
const_prop_count, copy_prop_count);
}
/* Global analysis may get into infinite loops for unreachable blocks. */
if (changed && cprop_jumps)
delete_unreachable_blocks ();
return changed;
}
......
Sat Jan 25 21:06:49 CET 2003 Jan Hubicka <jh@suse.cz>
PR opt/8492
* gcc.c-torture/compile/20030125-1.c
2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9403
......@@ -19,7 +24,7 @@
* gcc.c-torture/execute/switch-1.c: New test case.
Sat Jan 25 12:32:55 CET 2003 Jan HUbicka <jh@suse.cz>
Sat Jan 25 12:32:55 CET 2003 Jan Hubicka <jh@suse.cz>
* gcc.c-torture/execute/20030125-1.[cx]: New test.
......
int count;
int func(int *valp) {
int val, locked = 0;
while ((val = *valp) != 0) {
if (count) {
if (count)
locked = 1;
else
locked = 1;
if (!locked)
continue;
}
if (!count)
count--;
break;
}
return val;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment