diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-14 19:18:58 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-14 19:18:58 +0000 |
commit | e38def9ca7953bb5611d08ce8617249516ba5a99 (patch) | |
tree | 2fcbbb5f99b13293753d83230cf9f4e0893a9b51 /gcc/dce.c | |
parent | 74facf6eece2aa84e36088e8e9adf175920b2e8a (diff) | |
download | gcc-e38def9ca7953bb5611d08ce8617249516ba5a99.tar.gz |
Squash commit of EH in gimple
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151696 138bc75d-0d04-0410-961f-82ee72b054a4
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)) { |