diff options
author | Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> | 2004-06-30 23:11:28 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2004-06-30 21:11:28 +0000 |
commit | 5f240ec46eaea80964f62124351e64cda949592e (patch) | |
tree | 4c5126e282f3640784ee7d2bb37012cbef9d3ff5 /gcc/tree-optimize.c | |
parent | 43e7557b6e0632e056b517ff41ab1c7161fed9e6 (diff) | |
download | gcc-5f240ec46eaea80964f62124351e64cda949592e.zip gcc-5f240ec46eaea80964f62124351e64cda949592e.tar.gz gcc-5f240ec46eaea80964f62124351e64cda949592e.tar.bz2 |
tree-ssa-loop-ch.c: New file.
* tree-ssa-loop-ch.c: New file.
* Makefile.in (tree-ssa-loop-ch.o): Add.
(tree-into-ssa.o): Add GGC_H dependency.
* tree-cfg.c (tree_duplicate_bb): Copy virtual arguments.
* tree-flow.h (rewrite_into_ssa): Declaration changed.
(rewrite_ssa_into_ssa, compute_global_livein, duplicate_ssa_name):
Declare.
* tree-into-ssa.c: Include ggc.h.
(struct def_blocks_d): Add phi_blocks field.
(struct mark_def_sites_global_data): Add names_to_rename field.
(struct ssa_name_info): New.
(compute_global_livein): Export.
(set_def_block, insert_phi_nodes, mark_def_sites, set_livein_block,
insert_phi_nodes_1, rewrite_finalize_block, insert_phi_nodes_for,
register_new_def, get_reaching_def, def_blocks_free,
get_def_blocks_for, rewrite_into_ssa): Modified to work with
rewrite_ssa_into_ssa.
(get_ssa_name_ann, get_phi_state, set_phi_state, get_current_def,
set_current_def, ssa_mark_def_sites_initialize_block,
ssa_mark_phi_uses, ssa_mark_def_sites, duplicate_ssa_name,
ssa_register_new_def, ssa_rewrite_initialize_block,
ssa_rewrite_phi_arguments, ssa_rewrite_finalize_block,
ssa_rewrite_stmt, rewrite_ssa_into_ssa, rewrite_all_into_ssa): New
functions.
(pass_build_ssa): Call rewrite_all_into_ssa.
* tree-optimize.c (execute_todo, execute_one_pass,
tree_rest_of_compilation): Allocate vars_to_rename only once.
* tree-ssa-dom.c (tree_ssa_dominator_optimize): Provide parameter
to rewrite_into_ssa.
* tree-ssa-loop.c (should_duplicate_loop_header_p,
mark_defs_for_rewrite, duplicate_blocks, do_while_loop_p,
copy_loop_headers, gate_ch, pass_ch): Moved to tree-ssa-loop-ch.c.
Use rewrite_ssa_into_ssa.
* tree-ssa-operands.c (copy_virtual_operands): New function.
* tree-ssa-operands.h (copy_virtual_operands): Declare.
* tree.h (struct tree_ssa_name): Add aux field.
(SSA_NAME_AUX): New macro to access it.
From-SVN: r83932
Diffstat (limited to 'gcc/tree-optimize.c')
-rw-r--r-- | gcc/tree-optimize.c | 12 |
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) |