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.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c
index a9217b1..00ddc20 100644
--- a/gcc/tree-optimize.c
+++ b/gcc/tree-optimize.c
@@ -349,9 +349,8 @@ execute_todo (unsigned int flags)
{
if (flags & TODO_rename_vars)
{
- if (bitmap_first_set_bit (vars_to_rename) >= 0)
- rewrite_into_ssa ();
- BITMAP_XFREE (vars_to_rename);
+ rewrite_into_ssa (false);
+ bitmap_clear (vars_to_rename);
}
if ((flags & TODO_dump_func) && dump_file)
@@ -407,10 +406,6 @@ execute_one_pass (struct tree_opt_pass *pass)
if (pass->tv_id)
timevar_push (pass->tv_id);
- /* If the pass is requesting ssa variable renaming, allocate the bitmap. */
- if (pass->todo_flags_finish & TODO_rename_vars)
- vars_to_rename = BITMAP_XMALLOC ();
-
/* Do it! */
if (pass->execute)
pass->execute ();
@@ -509,6 +504,9 @@ tree_rest_of_compilation (tree fndecl, bool nested_p)
}
}
+ if (!vars_to_rename)
+ vars_to_rename = BITMAP_XMALLOC ();
+
/* If this is a nested function, protect the local variables in the stack
above us from being collected while we're compiling this function. */
if (nested_p)