diff options
author | Richard Henderson <rth@redhat.com> | 2009-09-14 12:18:58 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2009-09-14 12:18:58 -0700 |
commit | 1d65f45cfaefa060737af130c3fc69afb3030980 (patch) | |
tree | 2fcbbb5f99b13293753d83230cf9f4e0893a9b51 /gcc/dce.c | |
parent | 0c433c31b31f25e3f18e58bd8d404c02722d7f7c (diff) | |
download | gcc-1d65f45cfaefa060737af130c3fc69afb3030980.tar.gz |
Squash commit of EH in gimple
From-SVN: r151696
Diffstat (limited to 'gcc/dce.c')
-rw-r--r-- | gcc/dce.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/gcc/dce.c b/gcc/dce.c index 3e1dd47f3a4..b937dd44a19 100644 --- a/gcc/dce.c +++ b/gcc/dce.c @@ -79,13 +79,7 @@ deletable_insn_p_1 (rtx body) return false; default: - if (volatile_refs_p (body)) - return false; - - if (flag_non_call_exceptions && may_trap_p (body)) - return false; - - return true; + return !volatile_refs_p (body); } } @@ -99,6 +93,14 @@ 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 @@ -113,13 +115,6 @@ 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); - if (!NONJUMP_INSN_P (insn)) - return false; - - /* Similarly, we cannot delete other insns that can throw either. */ - if (df_in_progress && flag_non_call_exceptions && can_throw_internal (insn)) - return false; - body = PATTERN (insn); switch (GET_CODE (body)) { |