diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-09 21:49:44 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-09 21:49:44 +0000 |
commit | 827c9a9ee6cd1366ee336eb9f48a6b0fa70e7e16 (patch) | |
tree | 94bae21be77c1e10d071c24ca7c48b99738ab87d /gcc/dce.c | |
parent | 0d290c9d17fe55e9c70da316068fd3fb2d0ab72d (diff) | |
download | gcc-827c9a9ee6cd1366ee336eb9f48a6b0fa70e7e16.tar.gz |
PR rtl-optimization/42461
* dce.c (deletable_insn_p): Return true for const or pure calls again.
* except.c (insn_could_throw_p): Return false if !flag_exceptions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160507 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dce.c')
-rw-r--r-- | gcc/dce.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/dce.c b/gcc/dce.c index 38a5b307e7b..ee18b58c4ab 100644 --- a/gcc/dce.c +++ b/gcc/dce.c @@ -94,14 +94,6 @@ deletable_insn_p (rtx insn, bool fast, bitmap arg_stores) rtx body, x; int i; - /* Don't delete jumps, notes and the like. */ - if (!NONJUMP_INSN_P (insn)) - return false; - - /* Don't delete insns that can throw. */ - if (!insn_nothrow_p (insn)) - return false; - if (CALL_P (insn) /* We cannot delete calls inside of the recursive dce because this may cause basic blocks to be deleted and this messes up @@ -116,6 +108,14 @@ deletable_insn_p (rtx insn, bool fast, bitmap arg_stores) && !RTL_LOOPING_CONST_OR_PURE_CALL_P (insn))) return find_call_stack_args (insn, false, fast, arg_stores); + /* Don't delete jumps, notes and the like. */ + if (!NONJUMP_INSN_P (insn)) + return false; + + /* Don't delete insns that can throw. */ + if (!insn_nothrow_p (insn)) + return false; + body = PATTERN (insn); switch (GET_CODE (body)) { |