diff options
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/tree-complex.c | 8 | ||||
-rw-r--r-- | gcc/tree-pass.h | 4 | ||||
-rw-r--r-- | gcc/tree-sra.c | 4 | ||||
-rw-r--r-- | gcc/tree-ssa-ccp.c | 3 | ||||
-rw-r--r-- | gcc/tree-ssa-dom.c | 13 | ||||
-rw-r--r-- | gcc/tree-ssa-forwprop.c | 29 | ||||
-rw-r--r-- | gcc/tree-vrp.c | 3 |
8 files changed, 25 insertions, 47 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7e7e061..cbe3d08 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2007-03-09 Diego Novillo <dnovillo@redhat.com> + + * tree-pass.h (TODO_update_smt_usage): Remove. + Update all users. + * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Remove + argument SOME. + Update all users. + 2007-03-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> * pa.c (attr_length_call): Revise condition for long pc-relative branch. diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c index a64ec18..3f479ed 100644 --- a/gcc/tree-complex.c +++ b/gcc/tree-complex.c @@ -1533,10 +1533,10 @@ struct tree_opt_pass pass_lower_complex = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_dump_func | TODO_ggc_collect - | TODO_update_smt_usage - | TODO_update_ssa - | TODO_verify_stmts, /* todo_flags_finish */ + TODO_dump_func + | TODO_ggc_collect + | TODO_update_ssa + | TODO_verify_stmts, /* todo_flags_finish */ 0 /* letter */ }; diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h index 141ac29..6d4f707 100644 --- a/gcc/tree-pass.h +++ b/gcc/tree-pass.h @@ -215,10 +215,6 @@ struct dump_file_info for the passes that are handed to register_dump_files. */ #define TODO_set_props (1 << 15) -/* Set by passes that may make SMT's that were previously never used - in statements, used. */ -#define TODO_update_smt_usage (1 << 16) - #define TODO_update_ssa_any \ (TODO_update_ssa \ | TODO_update_ssa_no_phi \ diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 7db39c4..239fd84 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1612,9 +1612,6 @@ decide_instantiations (void) } bitmap_clear (&done_head); - if (!bitmap_empty_p (sra_candidates)) - todoflags |= TODO_update_smt_usage; - mark_set_for_renaming (sra_candidates); if (dump_file) @@ -1700,7 +1697,6 @@ generate_one_element_ref (struct sra_elt *elt, tree base) } case ARRAY_TYPE: - todoflags |= TODO_update_smt_usage; if (TREE_CODE (elt->element) == RANGE_EXPR) return build4 (ARRAY_RANGE_REF, elt->type, base, TREE_OPERAND (elt->element, 0), NULL, NULL); diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 673415c..b5adbd9 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -1411,8 +1411,7 @@ execute_ssa_ccp (bool store_ccp) ccp_initialize (); ssa_propagate (ccp_visit_stmt, ccp_visit_phi_node); if (ccp_finalize ()) - return (TODO_cleanup_cfg | TODO_update_ssa | TODO_update_smt_usage - | TODO_remove_unused_locals); + return (TODO_cleanup_cfg | TODO_update_ssa | TODO_remove_unused_locals); else return 0; } diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index 22e0121..6e1387f 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -389,8 +389,7 @@ struct tree_opt_pass pass_dominator = TODO_dump_func | TODO_update_ssa | TODO_cleanup_cfg - | TODO_verify_ssa - | TODO_update_smt_usage, /* todo_flags_finish */ + | TODO_verify_ssa, /* todo_flags_finish */ 0 /* letter */ }; @@ -2551,9 +2550,11 @@ struct tree_opt_pass pass_phi_only_cprop = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_cleanup_cfg | TODO_dump_func - | TODO_ggc_collect | TODO_verify_ssa - | TODO_verify_stmts | TODO_update_smt_usage - | TODO_update_ssa, /* todo_flags_finish */ + TODO_cleanup_cfg + | TODO_dump_func + | TODO_ggc_collect + | TODO_verify_ssa + | TODO_verify_stmts + | TODO_update_ssa, /* todo_flags_finish */ 0 /* letter */ }; diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 446efa7..a854841 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -668,14 +668,11 @@ forward_propagate_addr_into_variable_array_index (tree offset, tree lhs, Often this will allow for removal of an ADDR_EXPR and INDIRECT_REF node or for recovery of array indexing from pointer arithmetic. - CHANGED is an optional pointer to a boolean variable set to true if - either the LHS or RHS was changed in the USE_STMT. - Return true if the propagation was successful (the propagation can be not totally successful, yet things may have been changed). */ static bool -forward_propagate_addr_expr_1 (tree stmt, tree use_stmt, bool *changed) +forward_propagate_addr_expr_1 (tree stmt, tree use_stmt) { tree name = GIMPLE_STMT_OPERAND (stmt, 0); tree lhs, rhs, array_ref; @@ -695,8 +692,6 @@ forward_propagate_addr_expr_1 (tree stmt, tree use_stmt, bool *changed) TREE_OPERAND (lhs, 0) = unshare_expr (GIMPLE_STMT_OPERAND (stmt, 1)); fold_stmt_inplace (use_stmt); tidy_after_forward_propagate_addr (use_stmt); - if (changed) - *changed = true; } /* Trivial case. The use statement could be a trivial copy. We @@ -712,8 +707,6 @@ forward_propagate_addr_expr_1 (tree stmt, tree use_stmt, bool *changed) GIMPLE_STMT_OPERAND (use_stmt, 1) = unshare_expr (GIMPLE_STMT_OPERAND (stmt, 1)); tidy_after_forward_propagate_addr (use_stmt); - if (changed) - *changed = true; return true; } @@ -734,8 +727,6 @@ forward_propagate_addr_expr_1 (tree stmt, tree use_stmt, bool *changed) TREE_OPERAND (rhs, 0) = unshare_expr (GIMPLE_STMT_OPERAND (stmt, 1)); fold_stmt_inplace (use_stmt); tidy_after_forward_propagate_addr (use_stmt); - if (changed) - *changed = true; return true; } @@ -768,8 +759,6 @@ forward_propagate_addr_expr_1 (tree stmt, tree use_stmt, bool *changed) if (fold_stmt_inplace (use_stmt)) { tidy_after_forward_propagate_addr (use_stmt); - if (changed) - *changed = true; return true; } else @@ -795,8 +784,6 @@ forward_propagate_addr_expr_1 (tree stmt, tree use_stmt, bool *changed) res = forward_propagate_addr_into_variable_array_index (offset_stmt, lhs, stmt, use_stmt); - if (res && changed) - *changed = true; return res; } @@ -812,16 +799,12 @@ forward_propagate_addr_expr_1 (tree stmt, tree use_stmt, bool *changed) tree offset_stmt = SSA_NAME_DEF_STMT (TREE_OPERAND (rhs, 0)); res = forward_propagate_addr_into_variable_array_index (offset_stmt, lhs, stmt, use_stmt); - if (res && changed) - *changed = true; return res; } return false; } /* STMT is a statement of the form SSA_NAME = ADDR_EXPR <whatever>. - SOME is a pointer to a boolean value indicating whether we - propagated the address expression anywhere. Try to forward propagate the ADDR_EXPR into all uses of the SSA_NAME. Often this will allow for removal of an ADDR_EXPR and INDIRECT_REF @@ -829,7 +812,7 @@ forward_propagate_addr_expr_1 (tree stmt, tree use_stmt, bool *changed) Returns true, if all uses have been propagated into. */ static bool -forward_propagate_addr_expr (tree stmt, bool *some) +forward_propagate_addr_expr (tree stmt) { int stmt_loop_depth = bb_for_stmt (stmt)->loop_depth; tree name = GIMPLE_STMT_OPERAND (stmt, 0); @@ -860,8 +843,7 @@ forward_propagate_addr_expr (tree stmt, bool *some) push_stmt_changes (&use_stmt); - result = forward_propagate_addr_expr_1 (stmt, use_stmt, some); - *some |= result; + result = forward_propagate_addr_expr_1 (stmt, use_stmt); all &= result; pop_stmt_changes (&use_stmt); @@ -999,8 +981,7 @@ tree_ssa_forward_propagate_single_use_vars (void) if (TREE_CODE (rhs) == ADDR_EXPR) { - bool some = false; - if (forward_propagate_addr_expr (stmt, &some)) + if (forward_propagate_addr_expr (stmt)) { release_defs (stmt); todoflags |= TODO_remove_unused_locals; @@ -1008,8 +989,6 @@ tree_ssa_forward_propagate_single_use_vars (void) } else bsi_next (&bsi); - if (some) - todoflags |= TODO_update_smt_usage; } else if ((TREE_CODE (rhs) == BIT_NOT_EXPR || TREE_CODE (rhs) == NEGATE_EXPR) diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 086c6dd..dcb5f6a 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -5758,7 +5758,6 @@ struct tree_opt_pass pass_vrp = | TODO_ggc_collect | TODO_verify_ssa | TODO_dump_func - | TODO_update_ssa - | TODO_update_smt_usage, /* todo_flags_finish */ + | TODO_update_ssa, /* todo_flags_finish */ 0 /* letter */ }; |