diff options
author | Daniel Berlin <dberlin@gcc.gnu.org> | 2006-12-05 18:39:13 +0000 |
---|---|---|
committer | Daniel Berlin <dberlin@gcc.gnu.org> | 2006-12-05 18:39:13 +0000 |
commit | ae07b4632c474d9bc48dfdeb8dd79ee3f4b36850 (patch) | |
tree | cfefb58bb986dfe548ec2f49bd477bcd0fc04cc6 /gcc | |
parent | c1ac94fbe900aed88c60ffcbf8eac80c54f3f95e (diff) | |
download | gcc-ae07b4632c474d9bc48dfdeb8dd79ee3f4b36850.zip gcc-ae07b4632c474d9bc48dfdeb8dd79ee3f4b36850.tar.gz gcc-ae07b4632c474d9bc48dfdeb8dd79ee3f4b36850.tar.bz2 |
tree-vrp.c (pass_vrp): Remove PROP_smt_usage.
2006-12-05 Daniel Berlin <dberlin@dberlin.org>
* tree-vrp.c (pass_vrp): Remove PROP_smt_usage.
* tree-complex.c (pass_lower_complex): Ditto.
* tree-ssa-ccp.c (pass_ccp): Ditto.
(pass_store_ccp): Ditto.
* tree-ssa-dom.c (pass_dominator): Ditto.
(pass_phi_only_cprop): Ditto.
* tree-sra.c (pass_sra): Ditto.
* tree-ssa-forwprop.c (pass_forwprop): Ditto.
* tree-flow.h (updating_used_alone): Remove.
(updating_used_alone): Ditto.
* tree-ssa-alias.c (updating_used_alone): Remove variable.
(lhs_may_store_to): Remove function.
(recalculate_used_alone): Ditto.
(compute_may_aliases): Remove used_alone calculation.
* tree.h (struct tree_memory_tag): Remove is_used_alone and
old_used_alone. Remove SMT_USED_ALONE and SMT_OLD_USED_ALONE.
* tree-pass.h (PROP_smt_usage): Remove.
* passes.c (execute_todo): Remove used alone recalculation.
(execute_one_pass): Ditto.
* tree-ssa-operands.c (add_virtual_operand): Remove used_alone
stuff.
From-SVN: r119550
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/passes.c | 16 | ||||
-rw-r--r-- | gcc/tree-complex.c | 2 | ||||
-rw-r--r-- | gcc/tree-flow.h | 3 | ||||
-rw-r--r-- | gcc/tree-pass.h | 2 | ||||
-rw-r--r-- | gcc/tree-sra.c | 2 | ||||
-rw-r--r-- | gcc/tree-ssa-alias.c | 123 | ||||
-rw-r--r-- | gcc/tree-ssa-ccp.c | 4 | ||||
-rw-r--r-- | gcc/tree-ssa-dom.c | 4 | ||||
-rw-r--r-- | gcc/tree-ssa-forwprop.c | 2 | ||||
-rw-r--r-- | gcc/tree-ssa-operands.c | 11 | ||||
-rw-r--r-- | gcc/tree-vrp.c | 2 | ||||
-rw-r--r-- | gcc/tree.h | 12 |
12 files changed, 9 insertions, 174 deletions
diff --git a/gcc/passes.c b/gcc/passes.c index 05288b6a..13b3b33 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -721,24 +721,14 @@ execute_todo (unsigned int flags) if (!flags) return; - /* Always recalculate SMT usage before doing anything else. */ - if (flags & TODO_update_smt_usage) - recalculate_used_alone (); - /* Always cleanup the CFG before trying to update SSA . */ if (flags & TODO_cleanup_cfg) { - /* CFG Cleanup can cause a constant to prop into an ARRAY_REF. */ - updating_used_alone = true; - if (current_loops) cleanup_tree_cfg_loop (); else cleanup_tree_cfg (); - /* Update the used alone after cleanup cfg. */ - recalculate_used_alone (); - /* When cleanup_tree_cfg merges consecutive blocks, it may perform some simplistic propagation when removing single valued PHI nodes. This propagation may, in turn, cause the @@ -835,9 +825,6 @@ execute_one_pass (struct tree_opt_pass *pass) gcc_assert ((curr_properties & pass->properties_required) == pass->properties_required); - if (pass->properties_destroyed & PROP_smt_usage) - updating_used_alone = true; - /* If a dump file name is present, open it if enabled. */ if (pass->static_pass_number != -1) { @@ -904,9 +891,6 @@ execute_one_pass (struct tree_opt_pass *pass) dump_file = NULL; } - if (pass->properties_destroyed & PROP_smt_usage) - updating_used_alone = false; - return true; } diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c index 38b2101..c3f4e04 100644 --- a/gcc/tree-complex.c +++ b/gcc/tree-complex.c @@ -1540,7 +1540,7 @@ struct tree_opt_pass pass_lower_complex = 0, /* tv_id */ PROP_ssa, /* properties_required */ 0, /* properties_provided */ - PROP_smt_usage, /* properties_destroyed */ + 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_dump_func | TODO_ggc_collect | TODO_update_smt_usage diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h index bee5cd9..b3aa655 100644 --- a/gcc/tree-flow.h +++ b/gcc/tree-flow.h @@ -1060,9 +1060,6 @@ void delete_alias_heapvars (void); void swap_tree_operands (tree, tree *, tree *); -extern void recalculate_used_alone (void); -extern bool updating_used_alone; - int least_common_multiple (int, int); #endif /* _TREE_FLOW_H */ diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h index d6838d2..04db3bb 100644 --- a/gcc/tree-pass.h +++ b/gcc/tree-pass.h @@ -151,8 +151,6 @@ struct dump_file_info #define PROP_rtl (1 << 8) #define PROP_alias (1 << 9) #define PROP_gimple_lomp (1 << 10) /* lowered OpenMP directives */ -#define PROP_smt_usage (1 << 11) /* which SMT's are - used alone. */ #define PROP_trees \ (PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh | PROP_gimple_lomp) diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 2db1925..ab45341 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -2356,7 +2356,7 @@ struct tree_opt_pass pass_sra = TV_TREE_SRA, /* tv_id */ PROP_cfg | PROP_ssa | PROP_alias, /* properties_required */ 0, /* properties_provided */ - PROP_smt_usage, /* properties_destroyed */ + 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_dump_func /* todo_flags_finish */ | TODO_update_ssa diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 6853ea1..b39553e 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -370,12 +370,6 @@ set_initial_properties (struct alias_info *ai) } } - -/* This variable is set to true if we are updating the used alone - information for SMTs, or are in a pass that is going to break it - temporarily. */ -bool updating_used_alone; - /* Compute which variables need to be marked call clobbered because their tag is call clobbered, and which tags need to be marked global because they contain global variables. */ @@ -401,120 +395,6 @@ compute_call_clobbered (struct alias_info *ai) compute_tag_properties (); } - -/* Helper for recalculate_used_alone. Return a conservatively correct - answer as to whether STMT may make a store on the LHS to SYM. */ - -static bool -lhs_may_store_to (tree stmt, tree sym ATTRIBUTE_UNUSED) -{ - tree lhs = GENERIC_TREE_OPERAND (stmt, 0); - - lhs = get_base_address (lhs); - - if (!lhs) - return false; - - if (TREE_CODE (lhs) == SSA_NAME) - return false; - /* We could do better here by looking at the type tag of LHS, but it - is unclear whether this is worth it. */ - return true; -} - -/* Recalculate the used_alone information for SMTs . */ - -void -recalculate_used_alone (void) -{ - VEC (tree, heap) *calls = NULL; - block_stmt_iterator bsi; - basic_block bb; - tree stmt; - size_t i; - referenced_var_iterator rvi; - tree var; - - /* First, reset all the SMT used alone bits to zero. */ - updating_used_alone = true; - FOR_EACH_REFERENCED_VAR (var, rvi) - if (TREE_CODE (var) == SYMBOL_MEMORY_TAG) - { - SMT_OLD_USED_ALONE (var) = SMT_USED_ALONE (var); - SMT_USED_ALONE (var) = 0; - } - - /* Walk all the statements. - Calls get put into a list of statements to update, since we will - need to update operands on them if we make any changes. - If we see a bare use of a SMT anywhere in a real virtual use or virtual - def, mark the SMT as used alone, and for renaming. */ - FOR_EACH_BB (bb) - { - for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi)) - { - bool iscall = false; - ssa_op_iter iter; - - stmt = bsi_stmt (bsi); - - if (TREE_CODE (stmt) == CALL_EXPR - || (TREE_CODE (stmt) == GIMPLE_MODIFY_STMT - && TREE_CODE (GIMPLE_STMT_OPERAND (stmt, 1)) == CALL_EXPR)) - { - iscall = true; - VEC_safe_push (tree, heap, calls, stmt); - } - - FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, - SSA_OP_VUSE | SSA_OP_VIRTUAL_DEFS) - { - tree svar = var; - - if (TREE_CODE (var) == SSA_NAME) - svar = SSA_NAME_VAR (var); - - if (TREE_CODE (svar) == SYMBOL_MEMORY_TAG) - { - /* We only care about the LHS on calls. */ - if (iscall && !lhs_may_store_to (stmt, svar)) - continue; - - if (!SMT_USED_ALONE (svar)) - { - SMT_USED_ALONE (svar) = true; - - /* Only need to mark for renaming if it wasn't - used alone before. */ - if (!SMT_OLD_USED_ALONE (svar)) - mark_sym_for_renaming (svar); - } - } - } - } - } - - /* Update the operands on all the calls we saw. */ - if (calls) - { - for (i = 0; VEC_iterate (tree, calls, i, stmt); i++) - update_stmt (stmt); - } - - /* We need to mark SMT's that are no longer used for renaming so the - symbols go away, or else verification will be angry with us, even - though they are dead. */ - FOR_EACH_REFERENCED_VAR (var, rvi) - if (TREE_CODE (var) == SYMBOL_MEMORY_TAG) - { - if (SMT_OLD_USED_ALONE (var) && !SMT_USED_ALONE (var)) - mark_sym_for_renaming (var); - } - - VEC_free (tree, heap, calls); - updating_used_alone = false; -} - /* Compute may-alias information for every variable referenced in function FNDECL. @@ -687,7 +567,6 @@ compute_may_aliases (void) /* Deallocate memory used by aliasing data structures. */ delete_alias_info (ai); - updating_used_alone = true; { block_stmt_iterator bsi; basic_block bb; @@ -699,8 +578,6 @@ compute_may_aliases (void) } } } - recalculate_used_alone (); - updating_used_alone = false; return 0; } diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index c8ec228..1dced72 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -1434,7 +1434,7 @@ struct tree_opt_pass pass_ccp = TV_TREE_CCP, /* tv_id */ PROP_cfg | PROP_ssa | PROP_alias, /* properties_required */ 0, /* properties_provided */ - PROP_smt_usage, /* properties_destroyed */ + 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_cleanup_cfg | TODO_dump_func | TODO_update_ssa | TODO_ggc_collect | TODO_verify_ssa @@ -1472,7 +1472,7 @@ struct tree_opt_pass pass_store_ccp = TV_TREE_STORE_CCP, /* tv_id */ PROP_cfg | PROP_ssa | PROP_alias, /* properties_required */ 0, /* properties_provided */ - PROP_smt_usage, /* properties_destroyed */ + 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_dump_func | TODO_update_ssa | TODO_ggc_collect | TODO_verify_ssa diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index 134cfe9..7656f36 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -380,7 +380,7 @@ struct tree_opt_pass pass_dominator = TV_TREE_SSA_DOMINATOR_OPTS, /* tv_id */ PROP_cfg | PROP_ssa | PROP_alias, /* properties_required */ 0, /* properties_provided */ - PROP_smt_usage, /* properties_destroyed */ + 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_dump_func | TODO_update_ssa @@ -2521,7 +2521,7 @@ struct tree_opt_pass pass_phi_only_cprop = TV_TREE_PHI_CPROP, /* tv_id */ PROP_cfg | PROP_ssa | PROP_alias, /* properties_required */ 0, /* properties_provided */ - PROP_smt_usage, /* properties_destroyed */ + 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_cleanup_cfg | TODO_dump_func | TODO_ggc_collect | TODO_verify_ssa diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index dd20d00..492c9a0 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -1049,7 +1049,7 @@ struct tree_opt_pass pass_forwprop = { PROP_cfg | PROP_ssa | PROP_alias, /* properties_required */ 0, /* properties_provided */ - PROP_smt_usage, /* properties_destroyed */ + 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_dump_func /* todo_flags_finish */ | TODO_ggc_collect diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c index 3cdc48a..c92c0e7 100644 --- a/gcc/tree-ssa-operands.c +++ b/gcc/tree-ssa-operands.c @@ -1303,17 +1303,8 @@ add_virtual_operand (tree var, stmt_ann_t s_ann, int flags, if (v_ann->is_aliased || none_added || (TREE_CODE (var) == SYMBOL_MEMORY_TAG - && for_clobber - && SMT_USED_ALONE (var))) + && for_clobber)) { - /* Every bare SMT def we add should have SMT_USED_ALONE - set on it, or else we will get the wrong answer on - clobbers. */ - if (none_added - && !updating_used_alone && gimple_aliases_computed_p (cfun) - && TREE_CODE (var) == SYMBOL_MEMORY_TAG) - gcc_assert (SMT_USED_ALONE (var)); - append_v_may_def (var); } } diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 759bf75..bbbaa5b 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -4810,7 +4810,7 @@ struct tree_opt_pass pass_vrp = TV_TREE_VRP, /* tv_id */ PROP_ssa | PROP_alias, /* properties_required */ 0, /* properties_provided */ - PROP_smt_usage, /* properties_destroyed */ + 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_cleanup_cfg | TODO_ggc_collect @@ -2407,22 +2407,10 @@ struct tree_memory_tag GTY(()) { struct tree_decl_minimal common; unsigned int is_global:1; - unsigned int is_used_alone:1; - unsigned int old_used_alone:1; }; #define MTAG_GLOBAL(NODE) (TREE_MEMORY_TAG_CHECK (NODE)->mtag.is_global) -/* This flag is true if a SMT is used as the V_MAY_DEF or VUSE operand - directly, because the access had all of the SMT's aliases pruned - from it. */ -#define SMT_USED_ALONE(NODE) (SYMBOL_MEMORY_TAG_CHECK (NODE)->mtag.is_used_alone) - -/* This flag is used to temporarily store the old value of the used alone - flag when updating so we know whether to mark the symbol for - renaming. */ -#define SMT_OLD_USED_ALONE(NODE) (SYMBOL_MEMORY_TAG_CHECK (NODE)->mtag.old_used_alone) - struct tree_struct_field_tag GTY(()) { struct tree_memory_tag common; |