aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dce.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-08-01 11:48:56 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-08-01 11:48:56 +0000
commit525174a22213a316c4fb668d839a128ce03c6414 (patch)
treee525938828010ae0d2bba879beb2a05b69f70760 /gcc/tree-ssa-dce.c
parent137143106086c762d05037b4d420c1eaf8fe6fbc (diff)
downloadgcc-525174a22213a316c4fb668d839a128ce03c6414.zip
gcc-525174a22213a316c4fb668d839a128ce03c6414.tar.gz
gcc-525174a22213a316c4fb668d839a128ce03c6414.tar.bz2
graphite-clast-to-gimple.c (translate_clast_user): Rename virtual operands.
2012-08-01 Richard Guenther <rguenther@suse.de> * graphite-clast-to-gimple.c (translate_clast_user): Rename virtual operands. * sese.c (graphite_copy_stmts_from_block): Do not rename virtual operands here. * tree-call-cdce.c (tree_call_cdce): Use mark_virtual_operands_for_renaming. * tree-eh.c (sink_clobbers): Simplify. * tree-flow.h (mark_sym_for_renaming): Remove. (mark_virtual_operands_for_renaming): New function. * tree-if-conv.c (tree_if_conversion): Use mark_virtual_operands_for_renaming. * tree-inline.c (update_ssa_across_abnormal_edges): Likewise. * tree-into-ssa.c (mark_sym_for_renaming): Remove. (mark_virtual_operands_for_renaming): New function. * tree-loop-distribution.c (tree_loop_distribution): Use mark_virtual_operands_for_renaming. * tree-ssa-dce.c (mark_virtual_operand_for_renaming): Do not update stmts, use mark_virtual_operands_for_renaming. * tree-ssa-tail-merge.c (release_last_vdef): Remove. (replace_block_by): Adjust. (tail_merge_optimize): Use mark_virtual_operands_for_renaming. * tree-tailcall.c (tree_optimize_tail_calls_1): Use mark_virtual_operands_for_renaming. * tree-vect-slp.c (vect_slp_transform_bb): Likewise. * tree-vectorizer.c (vectorize_loops): Likewise. From-SVN: r190034
Diffstat (limited to 'gcc/tree-ssa-dce.c')
-rw-r--r--gcc/tree-ssa-dce.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c
index 4d1b620..c1db16b 100644
--- a/gcc/tree-ssa-dce.c
+++ b/gcc/tree-ssa-dce.c
@@ -995,31 +995,32 @@ propagate_necessity (struct edge_list *el)
}
/* Replace all uses of NAME by underlying variable and mark it
- for renaming. */
+ for renaming. This assumes the defining statement of NAME is
+ going to be removed. */
void
mark_virtual_operand_for_renaming (tree name)
{
+ tree name_var = SSA_NAME_VAR (name);
bool used = false;
imm_use_iterator iter;
use_operand_p use_p;
gimple stmt;
- tree name_var;
- name_var = SSA_NAME_VAR (name);
+ gcc_assert (VAR_DECL_IS_VIRTUAL_OPERAND (name_var));
FOR_EACH_IMM_USE_STMT (stmt, iter, name)
{
FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
SET_USE (use_p, name_var);
- update_stmt (stmt);
used = true;
}
if (used)
- mark_sym_for_renaming (name_var);
+ mark_virtual_operands_for_renaming (cfun);
}
-/* Replace all uses of result of PHI by underlying variable and mark it
- for renaming. */
+/* Replace all uses of the virtual PHI result by its underlying variable
+ and mark it for renaming. This assumes the PHI node is going to be
+ removed. */
void
mark_virtual_phi_result_for_renaming (gimple phi)