diff options
author | Jan Hubicka <jh@suse.cz> | 2008-08-29 12:35:57 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2008-08-29 10:35:57 +0000 |
commit | efd8f7507b3ce6e4cc00c7eac4f011736ca4f14d (patch) | |
tree | 1c6f479b4b71cd53544bd1eb2bcc1d8b5055b58e /gcc/tree-ssa-math-opts.c | |
parent | e3536b82d746016fdb16f3480097329f26b12c9b (diff) | |
download | gcc-efd8f7507b3ce6e4cc00c7eac4f011736ca4f14d.zip gcc-efd8f7507b3ce6e4cc00c7eac4f011736ca4f14d.tar.gz gcc-efd8f7507b3ce6e4cc00c7eac4f011736ca4f14d.tar.bz2 |
loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p.
* loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p.
* tree-ssa-threadupdate.c (mark_threaded_blocks): Use optimize_function_for_size_p.
* tracer.c (ignore_bb_p): Use optimize_bb_for_size_p.
* postreload-gcse.c (eliminate_partially_redundant_load): Use optimize_bb_for_size_p.
* value-prof.c (gimple_divmod_fixed_value_transform,
gimple_mod_pow2_value_transform, gimple_mod_subtract_transform,
gimple_stringops_transform): Use optimize_bb_for_size_p.
* ipa-cp.c (ipcp_insert_stage): Use optimize_function_for_size_p.
* final.c (compute_alignments): Use optimize_function_for_size_p.
* builtins.c (fold_builtin_cabs): Use optimize_function_for_speed_p.
(fold_builtin_strcpy, fold_builtin_fputs): Use
optimize_function_for_size_p.
* fold-const.c (tree_swap_operands_p): Use optimize_function_for_size_p.
* recog.c (relax_delay_slots): Likewise.
* tree-ssa-math-opts.c (replace_reciprocal): Use optimize_bb_for_speed_p.
(execute_cse_reciprocals): Use optimize_bb_for_size_p.
* ipa-inline.c (cgraph_decide_recursive_inlining): Use
optimize_function_for_size_p.
(cgraph_decide_inlining_of_small_function): Use
optimize_function_for_size_p.
* global.c (find_reg): Use optimize_function_for_size_p.
* opts.c (decode_options): Do not clear flag_tree_ch, flag_inline_functions,
flag_unswitch_loops, flag_unroll_loops, flag_unroll_all_loops and
flag_prefetch_loop_arrays. Those can work it out from profile.
* tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely): Use
optimize_loop_for_speed_p.
* predict.c (optimize_bb_for_size_p, optimize_bb_for_speed_p): Constify
argument.
(optimize_loop_nest_for_size_p, optimize_loop_nest_for_speed_p): New.
* tree-parloops.c (parallelize_loops): Use optimize_loop_for_size_p.
* tree-eh.c (decide_copy_try_finally): Use optimize_function_for_size_p.
* local-alloc.c (block_alloc): Pass BB pointer.
(find_free_reg): Add BB pointer, use optimize_bb_for_size_p.
* gcse.c (gcse_main): Use optimize_function_for_size_p.
* loop-unroll.c (decide_unrolling_and_peeling): Use optimize_loop_for_size_p.
(decide_peel_completely): Likewise.
* tree-vect-analyze.c (vect_mark_for_runtime_alias_test): Use
optimize_loop_for_size_p.
(vect_enhance_data_refs_alignment): Likewise.
* tree-ssa-coalesce.c (coalesce_cost): Add optimize_for_size argument.
(coalesce_cost_bb, coalesce_cost_edge, create_outofssa_var_map): Update call.
* cfgcleanup.c (outgoing_edges_match): Use optimize_bb_for_speed_p.
(try_crossjump_bb): Use optimize_bb_for_size_p.
* tree-ssa-loop-prefetch.c (loop_prefetch_arrays): Use
optimize_loop_for_speed_p.
* bb-reorder.c (find_traces_1_round): Likewise.
(copy_bb): Use optimize_bb_for_speed_p.
(duplicate_computed_gotos): Likewise.
* basic-block.h (optimize_loop_nest_for_size_p,
optimize_loop_nest_for_speed_p): New.
* stmt.c (expand_case): Use optimize_insn_for_size_p.
From-SVN: r139760
Diffstat (limited to 'gcc/tree-ssa-math-opts.c')
-rw-r--r-- | gcc/tree-ssa-math-opts.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c index 844ec9d..9f88ba6 100644 --- a/gcc/tree-ssa-math-opts.c +++ b/gcc/tree-ssa-math-opts.c @@ -353,7 +353,8 @@ replace_reciprocal (use_operand_p use_p) basic_block bb = gimple_bb (use_stmt); struct occurrence *occ = (struct occurrence *) bb->aux; - if (occ->recip_def && use_stmt != occ->recip_def_stmt) + if (optimize_bb_for_speed_p (bb) + && occ->recip_def && use_stmt != occ->recip_def_stmt) { gimple_assign_set_rhs_code (use_stmt, MULT_EXPR); SET_USE (use_p, occ->recip_def); @@ -445,7 +446,7 @@ execute_cse_reciprocals_1 (gimple_stmt_iterator *def_gsi, tree def) static bool gate_cse_reciprocals (void) { - return optimize && !optimize_size && flag_reciprocal_math; + return optimize && flag_reciprocal_math; } /* Go through all the floating-point SSA_NAMEs, and call @@ -500,6 +501,9 @@ execute_cse_reciprocals (void) execute_cse_reciprocals_1 (&gsi, def); } + if (optimize_bb_for_size_p (bb)) + continue; + /* Scan for a/func(b) and convert it to reciprocal a*rfunc(b). */ for (gsi = gsi_after_labels (bb); !gsi_end_p (gsi); gsi_next (&gsi)) { |