aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-optimize.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-optimize.c')
-rw-r--r--gcc/tree-optimize.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c
index 63131af..e643915 100644
--- a/gcc/tree-optimize.c
+++ b/gcc/tree-optimize.c
@@ -438,8 +438,11 @@ static void execute_pass_list (struct tree_opt_pass *);
static unsigned int last_verified;
static void
-execute_todo (int properties, unsigned int flags)
+execute_todo (struct tree_opt_pass *pass, unsigned int flags, bool use_required)
{
+ int properties
+ = use_required ? pass->properties_required : pass->properties_provided;
+
if (flags & TODO_rename_vars)
{
rewrite_into_ssa (false);
@@ -475,11 +478,15 @@ execute_todo (int properties, unsigned int flags)
}
if (flags & TODO_ggc_collect)
- ggc_collect ();
+ {
+ ggc_collect ();
+ }
#ifdef ENABLE_CHECKING
- if (flags & TODO_verify_ssa)
- verify_ssa ();
+ if ((pass->properties_required & PROP_ssa)
+ && !(pass->properties_destroyed & PROP_ssa))
+ verify_ssa (true);
+
if (flags & TODO_verify_flow)
verify_flow_info ();
if (flags & TODO_verify_stmts)
@@ -503,7 +510,7 @@ execute_one_pass (struct tree_opt_pass *pass)
/* Run pre-pass verification. */
todo = pass->todo_flags_start & ~last_verified;
if (todo)
- execute_todo (pass->properties_required, todo);
+ execute_todo (pass, todo, true);
/* If a dump file name is present, open it if enabled. */
if (pass->static_pass_number != -1)
@@ -553,7 +560,7 @@ execute_one_pass (struct tree_opt_pass *pass)
todo = pass->todo_flags_finish;
last_verified = todo & TODO_verify_all;
if (todo)
- execute_todo (pass->properties_provided, todo);
+ execute_todo (pass, todo, false);
/* Flush and close dump file. */
if (dump_file_name)