aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2007-10-04 13:34:09 +0000
committerMichael Matz <matz@gcc.gnu.org>2007-10-04 13:34:09 +0000
commit0a64eecaf4c81c3a22d49573965d8bf48e556a40 (patch)
treeb51ceabc1c62b9e5e872d2fab7d76ec05f362c57
parentcf909b0d8ce459088de2987c46a7932561d27bd1 (diff)
downloadgcc-0a64eecaf4c81c3a22d49573965d8bf48e556a40.zip
gcc-0a64eecaf4c81c3a22d49573965d8bf48e556a40.tar.gz
gcc-0a64eecaf4c81c3a22d49573965d8bf48e556a40.tar.bz2
re PR rtl-optimization/33653 (volatile memory access optimized away)
PR rtl-optimization/33653 * dce.c (deletable_insn_p_1): Use volatile_refs_p(). * dse.c (scan_insn): Same. From-SVN: r129006
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/dce.c2
-rw-r--r--gcc/dse.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 30699de..455ad65 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2007-10-04 Michael Matz <matz@suse.de>
+
+ PR rtl-optimization/33653
+ * dce.c (deletable_insn_p_1): Use volatile_refs_p().
+ * dse.c (scan_insn): Same.
+
2007-10-04 Kazu Hirata <kazu@codesourcery.com>
* config.gcc: Remove USE_GAS for m68k targets.
diff --git a/gcc/dce.c b/gcc/dce.c
index aca7311..b892d84 100644
--- a/gcc/dce.c
+++ b/gcc/dce.c
@@ -78,7 +78,7 @@ deletable_insn_p_1 (rtx body)
return false;
default:
- if (volatile_insn_p (body))
+ if (volatile_refs_p (body))
return false;
if (flag_non_call_exceptions && may_trap_p (body))
diff --git a/gcc/dse.c b/gcc/dse.c
index 7bf759d..d031c49 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -1997,7 +1997,7 @@ scan_insn (bb_info_t bb_info, rtx insn)
/* Assuming that there are sets in these insns, we cannot delete
them. */
if ((GET_CODE (PATTERN (insn)) == CLOBBER)
- || volatile_insn_p (PATTERN (insn))
+ || volatile_refs_p (PATTERN (insn))
|| (flag_non_call_exceptions && may_trap_p (PATTERN (insn)))
|| (RTX_FRAME_RELATED_P (insn))
|| find_reg_note (insn, REG_FRAME_RELATED_EXPR, NULL_RTX))