aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-forwprop.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2005-05-23 20:54:06 -0600
committerJeff Law <law@gcc.gnu.org>2005-05-23 20:54:06 -0600
commit6cedb4acda3240c6a7914834f812aa2e86fa7687 (patch)
tree83e8422ca8c90a302030075b4f2619a0b55f42df /gcc/tree-ssa-forwprop.c
parent0d14c01130fe9b1712c0933a30ed14be8c42c469 (diff)
downloadgcc-6cedb4acda3240c6a7914834f812aa2e86fa7687.zip
gcc-6cedb4acda3240c6a7914834f812aa2e86fa7687.tar.gz
gcc-6cedb4acda3240c6a7914834f812aa2e86fa7687.tar.bz2
tree-ssa-dom.c (cprop_into_stmt): Do not call recompute_tree_invariant_for_addr_expr here.
* tree-ssa-dom.c (cprop_into_stmt): Do not call recompute_tree_invariant_for_addr_expr here. (optimize_stmt): Call it here instead and do so if anything at all has changed in the statement and the RHS is an ADDR_EXPR. * tree-ssa-forwprop.c (tidy_after_forward_propagate_addr): If needed, call recompute_tree_invariant_for_addr_expr. * tree-ssa-propagate.c (substitute_and_fold): Call recompute_tree_invariant_for_addr_expr as needed. * gcc.c-torture/compile/pr21638.c: New test. * gcc.c-torture/compile/20050520-1.c: New test. From-SVN: r100092
Diffstat (limited to 'gcc/tree-ssa-forwprop.c')
-rw-r--r--gcc/tree-ssa-forwprop.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index e4cae68..17da0f1 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -446,12 +446,16 @@ static void
tidy_after_forward_propagate_addr (tree stmt)
{
mark_new_vars_to_rename (stmt);
- update_stmt (stmt);
/* We may have turned a trapping insn into a non-trapping insn. */
if (maybe_clean_or_replace_eh_stmt (stmt, stmt)
&& tree_purge_dead_eh_edges (bb_for_stmt (stmt)))
cfg_changed = true;
+
+ if (TREE_CODE (TREE_OPERAND (stmt, 1)) == ADDR_EXPR)
+ recompute_tree_invarant_for_addr_expr (TREE_OPERAND (stmt, 1));
+
+ update_stmt (stmt);
}
/* STMT defines LHS which is contains the address of the 0th element