diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-22 16:39:49 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-22 16:39:49 +0000 |
commit | 81d080336384ece7e0f3996541093fb348b9f689 (patch) | |
tree | f1ef74e5fc1c2bcc492abd6b400e131a68c5977f /gcc/tree-ssa-pre.c | |
parent | 69a0b2f4022e9bb7dfac0d1aeaab51df3e38dd56 (diff) | |
download | gcc-81d080336384ece7e0f3996541093fb348b9f689.tar.gz |
* tree-into-ssa.c (set_livein_block): Fix typo in comment.
(rewrite_ssa_into_ssa): Start iterating over SSA names at 1.
Release SSA names that have been re-renamed.
* tree-phinodes.c (make_phi_node): Set same TREE_TYPE as the
variable.
* tree-ssa-alias.c (init_alias_info): If aliases have been
computed before, clear existing alias information.
(create_name_tags): Do no fixup PT_ANYTHING pointers.
If the new name tag for a pointer is different than the one it
had before, mark the old tag for renaming.
(replace_may_alias): New function.
(group_aliases): Call it.
(setup_pointers_and_addressables): Always call get_tmt_for.
(maybe_create_global_var): Don't create .GLOBAL_VAR more than
once.
(set_pt_anything): New local function.
(set_pt_malloc): New local function.
(merge_pointed_to_info): Don't merge pointed-to variables from
the original pointer if the destination is pointing to an
unknown location.
(add_pointed_to_expr): Call set_pt_anything and set_pt_malloc.
(add_pointed_to_var): Do not add a variable to the points-to
set if the pointer is already pointing to anywhere.
(collect_points_to_info_r): If the defining statement is a PHI
node, only merge pointed-to information if the argument has
already been visited.
(get_tmt_for): Only create a new tag if the pointer didn't
have one already.
(dump_alias_info): Emit more information.
(dump_points_to_info_for): Likewise.
* tree-ssa-dom.c (redirect_edges_and_update_ssa_graph): Don't
try to get the annotation of an SSA_NAME.
* tree-ssa-operands.c (add_stmt_operand): Only check for empty
alias sets when checking is enabled.
* tree-ssa-pre.c (need_eh_cleanup): New local variable.
(eliminate): Mark basic blocks that will need
EH information cleaned up.
(init_pre): Split ENTRY_BLOCK->0 if block 0 has more than one
predecessor.
Initialize need_eh_cleanup.
(fini_pre): Call tree_purge_all_dead_eh_edges and
cleanup_tree_cfg if needed.
Free need_eh_cleanup.
* tree-ssa.c (verify_ssa_name): New function.
(verify_def): Call it.
Re-arrange to avoid printing too many error messages.
(verify_use): Likewise.
(verify_phi_args): Likewise.
(verify_flow_insensitive_alias_info): New function.
(verify_flow_sensitive_alias_info): New function.
(verify_alias_info): New function.
(verify_ssa): Call verify_alias_info.
Clear TREE_VISITED on all the SSA_NAMEs before scanning the
program.
Re-arrange to avoid printing too many error messages.
* tree-ssanames.c (make_ssa_name): Clear
SSA_NAME_IN_FREE_LIST.
(release_ssa_name): Never release a default definition.
(release_defs): New function.
* tree.h: Declare it.
* tree-ssa-dce.c (remove_dead_stmt): Call it.
* tree-ssa.c (walk_use_def_chains_1): Add new argument IS_DFS.
If true, do a depth-first search. Do a breadht-first search,
otherwise.
(walk_use_def_chains): Add new argument IS_DFS.
Update all users.
* tree-flow.h (walk_use_def_chains): Update prototype.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85052 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-pre.c')
-rw-r--r-- | gcc/tree-ssa-pre.c | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index a6943980229..d24ebc0b547 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -307,6 +307,10 @@ static alloc_pool binary_node_pool; static alloc_pool unary_node_pool; static alloc_pool reference_node_pool; +/* Set of blocks with statements that have had its EH information + cleaned up. */ +static bitmap need_eh_cleanup; + /* The phi_translate_table caches phi translations for a given expression and predecessor. */ @@ -1891,6 +1895,16 @@ eliminate (void) pre_stats.eliminations++; propagate_tree_value (rhs_p, sprime); modify_stmt (stmt); + + /* If we removed EH side effects from the statement, clean + its EH information. */ + if (maybe_clean_eh_stmt (stmt)) + { + bitmap_set_bit (need_eh_cleanup, + bb_for_stmt (stmt)->index); + if (dump_file && (dump_flags & TDF_DETAILS)) + fprintf (dump_file, " Removed EH side effects.\n"); + } } } } @@ -1909,6 +1923,18 @@ init_pre (void) connect_infinite_loops_to_exit (); vn_init (); memset (&pre_stats, 0, sizeof (pre_stats)); + + /* If block 0 has more than one predecessor, it means that its PHI + nodes will have arguments coming from block -1. This creates + problems for several places in PRE that keep local arrays indexed + by block number. To prevent this, we split the edge coming from + ENTRY_BLOCK_PTR (FIXME, if ENTRY_BLOCK_PTR had an index number + different than -1 we wouldn't have to hack this. tree-ssa-dce.c + needs a similar change). */ + if (ENTRY_BLOCK_PTR->succ->dest->pred->pred_next) + if (!(ENTRY_BLOCK_PTR->succ->flags & EDGE_ABNORMAL)) + split_edge (ENTRY_BLOCK_PTR->succ); + FOR_ALL_BB (bb) bb->aux = xcalloc (1, sizeof (struct bb_value_sets)); @@ -1926,7 +1952,8 @@ init_pre (void) binary_node_pool = create_alloc_pool ("Binary tree nodes", tsize, 30); tsize = tree_size (build1 (NEGATE_EXPR, void_type_node, NULL_TREE)); unary_node_pool = create_alloc_pool ("Unary tree nodes", tsize, 30); - tsize = tree_size (build (COMPONENT_REF, void_type_node, NULL_TREE, NULL_TREE, NULL_TREE)); + tsize = tree_size (build (COMPONENT_REF, void_type_node, NULL_TREE, + NULL_TREE, NULL_TREE)); reference_node_pool = create_alloc_pool ("Reference tree nodes", tsize, 30); FOR_ALL_BB (bb) { @@ -1935,6 +1962,8 @@ init_pre (void) TMP_GEN (bb) = bitmap_set_new (); AVAIL_OUT (bb) = bitmap_set_new (); } + + need_eh_cleanup = BITMAP_XMALLOC (); } @@ -1962,6 +1991,14 @@ fini_pre (void) free_dominance_info (CDI_POST_DOMINATORS); vn_delete (); + + if (bitmap_first_set_bit (need_eh_cleanup) >= 0) + { + tree_purge_all_dead_eh_edges (need_eh_cleanup); + cleanup_tree_cfg (); + } + + BITMAP_XFREE (need_eh_cleanup); } |