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/tree-ssa-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/tree-ssa-dce.c')
-rw-r--r-- | gcc/tree-ssa-dce.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c index 99a039fffee..67d0472cc59 100644 --- a/gcc/tree-ssa-dce.c +++ b/gcc/tree-ssa-dce.c @@ -322,15 +322,6 @@ mark_stmt_if_obviously_necessary (gimple stmt, bool aggressive) case GIMPLE_ASSIGN: if (!lhs) lhs = gimple_assign_lhs (stmt); - /* These values are mildly magic bits of the EH runtime. We can't - see the entire lifetime of these values until landing pads are - generated. */ - if (TREE_CODE (lhs) == EXC_PTR_EXPR - || TREE_CODE (lhs) == FILTER_EXPR) - { - mark_stmt_necessary (stmt, true); - return; - } break; case GIMPLE_DEBUG: @@ -817,28 +808,33 @@ propagate_necessity (struct edge_list *el) /* Replace all uses of result of PHI by underlying variable and mark it for renaming. */ -static void +void mark_virtual_phi_result_for_renaming (gimple phi) { bool used = false; imm_use_iterator iter; use_operand_p use_p; gimple stmt; + tree result_ssa, result_var; + if (dump_file && (dump_flags & TDF_DETAILS)) { fprintf (dump_file, "Marking result for renaming : "); print_gimple_stmt (dump_file, phi, 0, TDF_SLIM); fprintf (dump_file, "\n"); } - FOR_EACH_IMM_USE_STMT (stmt, iter, gimple_phi_result (phi)) + + result_ssa = gimple_phi_result (phi); + result_var = SSA_NAME_VAR (result_ssa); + FOR_EACH_IMM_USE_STMT (stmt, iter, result_ssa) { FOR_EACH_IMM_USE_ON_STMT (use_p, iter) - SET_USE (use_p, SSA_NAME_VAR (gimple_phi_result (phi))); + SET_USE (use_p, result_var); update_stmt (stmt); used = true; } if (used) - mark_sym_for_renaming (SSA_NAME_VAR (PHI_RESULT (phi))); + mark_sym_for_renaming (result_var); } /* Remove dead PHI nodes from block BB. */ |