aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-propagate.c
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@redhat.com>2006-12-11 20:15:53 +0000
committerDiego Novillo <dnovillo@gcc.gnu.org>2006-12-11 15:15:53 -0500
commitcfaab3a92418d34e14bb0fa447c052fce9f6057b (patch)
tree79969bcc52ffc34edcced0521bbe67cd20e564f5 /gcc/tree-ssa-propagate.c
parent7f46c638e6be449fcd80c08babdfaee63b70278e (diff)
downloadgcc-cfaab3a92418d34e14bb0fa447c052fce9f6057b.zip
gcc-cfaab3a92418d34e14bb0fa447c052fce9f6057b.tar.gz
gcc-cfaab3a92418d34e14bb0fa447c052fce9f6057b.tar.bz2
tree-ssa-operands.h (create_ssa_artificial_load_stmt): Rename from create_ssa_artficial_load_stmt.
* tree-ssa-operands.h (create_ssa_artificial_load_stmt): Rename from create_ssa_artficial_load_stmt. Update all users. * tree-into-ssa.c (register_new_def): Make static. * tree.c (is_global_var): Handle SSA_NAMEs. * tree.h (SSA_NAME_IS_DEFAULT_DEF): Define. Update all users that used to call gimple_default_def. * tree-ssa-operands.c (push_stmt_changes): New. (pop_stmt_changes): New. Update every pass that modifies statements to bracket modifications with push_stmt_changes/pop_stmt_changes. (discard_stmt_changes): New. * tree-ssa-dom.c (stmts_to_rescan): Change to stack of 'tree *' instead of 'tree'. Update all users. * tree-flow-inline.h (zero_imm_uses_p): New. (symbol_mem_tag): New. Update every function that used to access the annotation directly. (set_symbol_mem_tag): Likewise. * tree-dfa.c (dump_variable): Always show the escape mask. (mark_symbols_for_renaming): Rename from mark_new_vars_to_rename. Update all users. Only mark to rename naked symbols in real and virtual operands. From-SVN: r119746
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
-rw-r--r--gcc/tree-ssa-propagate.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c
index b787aae..49277a0 100644
--- a/gcc/tree-ssa-propagate.c
+++ b/gcc/tree-ssa-propagate.c
@@ -1176,6 +1176,9 @@ substitute_and_fold (prop_value_t *prop_value, bool use_ranges_p)
&& TREE_CODE (GIMPLE_STMT_OPERAND (stmt, 1)) == ASSERT_EXPR)
continue;
+ /* Record the state of the statement before replacements. */
+ push_stmt_changes (bsi_stmt_ptr (i));
+
/* Replace the statement with its folded version and mark it
folded. */
did_replace = false;
@@ -1211,10 +1214,6 @@ substitute_and_fold (prop_value_t *prop_value, bool use_ranges_p)
fold_stmt (bsi_stmt_ptr (i));
stmt = bsi_stmt (i);
- /* If we folded a builtin function, we'll likely
- need to rename VDEFs. */
- mark_new_vars_to_rename (stmt);
-
/* If we cleaned up EH information from the statement,
remove EH edges. */
if (maybe_clean_or_replace_eh_stmt (old_stmt, stmt))
@@ -1232,6 +1231,14 @@ substitute_and_fold (prop_value_t *prop_value, bool use_ranges_p)
print_generic_stmt (dump_file, stmt, TDF_SLIM);
fprintf (dump_file, "\n");
}
+
+ /* Determine what needs to be done to update the SSA form. */
+ pop_stmt_changes (bsi_stmt_ptr (i));
+ }
+ else
+ {
+ /* The statement was not modified, discard the change buffer. */
+ discard_stmt_changes (bsi_stmt_ptr (i));
}
/* Some statements may be simplified using ranges. For
@@ -1242,7 +1249,6 @@ substitute_and_fold (prop_value_t *prop_value, bool use_ranges_p)
statement. */
if (use_ranges_p)
simplify_stmt_using_ranges (stmt);
-
}
}