Commit a5828d1e by Michael Matz Committed by Michael Matz

tree-pass.h (pass_cselim): Declare new pass.

        * tree-pass.h (pass_cselim): Declare new pass.
        * passes.c (init_optimization_passes): Link in pass_cselim.
        * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Renamed from
        tree_ssa_phiopt; add do_store_elim parameter, handle it by calling
        cond_store_replacement.
        (condstoretemp): New static variable.
        (cond_store_replacement): New function.
        (tree_ssa_phiopt, tree_ssa_cs_elim): New wrappers around
        tree_ssa_phiopt_worker.
        (struct name_to_bb): New.
        (get_non_trapping, name_to_bb_hash, name_to_bb_eq, add_or_mark_expr,
        nt_init_block, nt_fini_block): New static functions.
        (seen_ssa_names, nontrap_set): New static variables.
        (gate_cselim, pass_cselim): Define new pass.
        * common.opt (ftree-cselim): New flag.
        * toplev.c (process_options): Set flag_tree_cselim if required.

From-SVN: r128324
parent cf369845
2007-09-10 Michael Matz <matz@suse.de>
* tree-pass.h (pass_cselim): Declare new pass.
* passes.c (init_optimization_passes): Link in pass_cselim.
* tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Renamed from
tree_ssa_phiopt; add do_store_elim parameter, handle it by calling
cond_store_replacement.
(condstoretemp): New static variable.
(cond_store_replacement): New function.
(tree_ssa_phiopt, tree_ssa_cs_elim): New wrappers around
tree_ssa_phiopt_worker.
(struct name_to_bb): New.
(get_non_trapping, name_to_bb_hash, name_to_bb_eq, add_or_mark_expr,
nt_init_block, nt_fini_block): New static functions.
(seen_ssa_names, nontrap_set): New static variables.
(gate_cselim, pass_cselim): Define new pass.
* common.opt (ftree-cselim): New flag.
* toplev.c (process_options): Set flag_tree_cselim if required.
2007-09-10 Hans-Peter Nilsson <hp@axis.com> 2007-09-10 Hans-Peter Nilsson <hp@axis.com>
* simplify-rtx.c (simplify_relational_operation_1): For recent * simplify-rtx.c (simplify_relational_operation_1): For recent
...@@ -1052,6 +1052,10 @@ ftree-store-copy-prop ...@@ -1052,6 +1052,10 @@ ftree-store-copy-prop
Common Report Var(flag_tree_store_copy_prop) Optimization Common Report Var(flag_tree_store_copy_prop) Optimization
Enable copy propagation for stores and loads Enable copy propagation for stores and loads
ftree-cselim
Common Report Var(flag_tree_cselim) Init(2) Optimization
Transform condition stores into unconditional ones
ftree-dce ftree-dce
Common Report Var(flag_tree_dce) Optimization Common Report Var(flag_tree_dce) Optimization
Enable SSA dead code elimination optimization on trees Enable SSA dead code elimination optimization on trees
......
...@@ -569,6 +569,7 @@ init_optimization_passes (void) ...@@ -569,6 +569,7 @@ init_optimization_passes (void)
NEXT_PASS (pass_merge_phi); NEXT_PASS (pass_merge_phi);
NEXT_PASS (pass_vrp); NEXT_PASS (pass_vrp);
NEXT_PASS (pass_dce); NEXT_PASS (pass_dce);
NEXT_PASS (pass_cselim);
NEXT_PASS (pass_dominator); NEXT_PASS (pass_dominator);
/* The only const/copy propagation opportunities left after /* The only const/copy propagation opportunities left after
DOM should be due to degenerate PHI nodes. So rather than DOM should be due to degenerate PHI nodes. So rather than
......
...@@ -1920,6 +1920,13 @@ process_options (void) ...@@ -1920,6 +1920,13 @@ process_options (void)
if (flag_var_tracking == AUTODETECT_VALUE) if (flag_var_tracking == AUTODETECT_VALUE)
flag_var_tracking = optimize >= 1; flag_var_tracking = optimize >= 1;
if (flag_tree_cselim == AUTODETECT_VALUE)
#ifdef HAVE_conditional_move
flag_tree_cselim = 1;
#else
flag_tree_cselim = 0;
#endif
/* If the user specifically requested variable tracking with tagging /* If the user specifically requested variable tracking with tagging
uninitialized variables, we need to turn on variable tracking. uninitialized variables, we need to turn on variable tracking.
(We already determined above that variable tracking is feasible.) */ (We already determined above that variable tracking is feasible.) */
......
...@@ -301,6 +301,7 @@ extern struct tree_opt_pass pass_cse_sincos; ...@@ -301,6 +301,7 @@ extern struct tree_opt_pass pass_cse_sincos;
extern struct tree_opt_pass pass_convert_to_rsqrt; extern struct tree_opt_pass pass_convert_to_rsqrt;
extern struct tree_opt_pass pass_warn_function_return; extern struct tree_opt_pass pass_warn_function_return;
extern struct tree_opt_pass pass_warn_function_noreturn; extern struct tree_opt_pass pass_warn_function_noreturn;
extern struct tree_opt_pass pass_cselim;
extern struct tree_opt_pass pass_phiopt; extern struct tree_opt_pass pass_phiopt;
extern struct tree_opt_pass pass_forwprop; extern struct tree_opt_pass pass_forwprop;
extern struct tree_opt_pass pass_phiprop; extern struct tree_opt_pass pass_phiprop;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment