Commit a646f6cc by Andrew Haley Committed by Andrew Haley

flow.c (insn_dead_p): When using non-call-exceptions, don't eliminate insns that may trap.

2002-09-30  Andrew Haley  <aph@redhat.com>

	* flow.c (insn_dead_p): When using non-call-exceptions, don't
	eliminate insns that may trap.
	* cse.c (insn_live_p): Likewise.

From-SVN: r57688
parent 3f7967e3
2002-09-30 Andrew Haley <aph@redhat.com>
* flow.c (insn_dead_p): When using non-call-exceptions, don't
eliminate insns that may trap.
* cse.c (insn_live_p): Likewise.
2002-10-01 Richard Sandiford <rsandifo@redhat.com> 2002-10-01 Richard Sandiford <rsandifo@redhat.com>
* config/mips/mips.h (PROCESSOR_R4121): Rename to PROCESSOR_R4120. * config/mips/mips.h (PROCESSOR_R4121): Rename to PROCESSOR_R4120.
......
...@@ -7582,7 +7582,9 @@ insn_live_p (insn, counts) ...@@ -7582,7 +7582,9 @@ insn_live_p (insn, counts)
int *counts; int *counts;
{ {
int i; int i;
if (GET_CODE (PATTERN (insn)) == SET) if (flag_non_call_exceptions && may_trap_p (insn))
return true;
else if (GET_CODE (PATTERN (insn)) == SET)
return set_live_p (PATTERN (insn), insn, counts); return set_live_p (PATTERN (insn), insn, counts);
else if (GET_CODE (PATTERN (insn)) == PARALLEL) else if (GET_CODE (PATTERN (insn)) == PARALLEL)
{ {
......
...@@ -2110,6 +2110,10 @@ insn_dead_p (pbi, x, call_ok, notes) ...@@ -2110,6 +2110,10 @@ insn_dead_p (pbi, x, call_ok, notes)
{ {
enum rtx_code code = GET_CODE (x); enum rtx_code code = GET_CODE (x);
/* Don't eliminate insns that may trap. */
if (flag_non_call_exceptions && may_trap_p (x))
return 0;
#ifdef AUTO_INC_DEC #ifdef AUTO_INC_DEC
/* As flow is invoked after combine, we must take existing AUTO_INC /* As flow is invoked after combine, we must take existing AUTO_INC
expressions into account. */ expressions into account. */
......
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