diff options
author | mkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-27 19:29:48 +0000 |
---|---|---|
committer | mkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-27 19:29:48 +0000 |
commit | 8b38b1505adace259e8fd33c80ac4d104cd8b965 (patch) | |
tree | 5230a8924f60a6f3b8ae64ec9b7f69f6d703a3db /gcc/params.def | |
parent | f151d0c60af393e59d7bb29bba6e78bdfcd203a1 (diff) | |
download | gcc-8b38b1505adace259e8fd33c80ac4d104cd8b965.tar.gz |
* gcse.c (struct expr:max_distance): New field.
(doing_code_hoisting_p): New static variable.
(want_to_gcse_p): Change signature. Allow constrained hoisting of
simple expressions, don't change behavior for PRE. Set max_distance.
(insert_expr_in_table): Set new max_distance field.
(hash_scan_set): Update.
(hoist_expr_reaches_here_p): Stop search after max_distance
instructions.
(find_occr_in_bb): New static function. Use it in ...
(hoist_code): Calculate sizes of basic block before any changes are
done. Pass max_distance to hoist_expr_reaches_here_p.
(one_code_hoisting_pass): Set doing_code_hoisting_p.
* params.def (PARAM_GCSE_COST_DISTANCE_RATIO,)
(PARAM_GCSE_UNRESTRICTED_COST): New parameters.
* params.h (GCSE_COST_DISTANCE_RATIO, GCSE_UNRESTRICTED_COST): New
macros.
* doc/invoke.texi (gcse-cost-distance-ratio, gcse-unrestricted-cost):
Document.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162589 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/params.def')
-rw-r--r-- | gcc/params.def | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/params.def b/gcc/params.def index 767ecd9e512..ada50f67093 100644 --- a/gcc/params.def +++ b/gcc/params.def @@ -225,6 +225,21 @@ DEFPARAM(PARAM_GCSE_AFTER_RELOAD_CRITICAL_FRACTION, "gcse-after-reload-critical-fraction", "The threshold ratio of critical edges execution count that permit performing redundancy elimination after reload", 10, 0, 0) + +/* GCSE will use GCSE_COST_DISTANCE_RATION as a scaling factor + to calculate maximum distance for which an expression is allowed to move + from its rtx_cost. */ +DEFPARAM(PARAM_GCSE_COST_DISTANCE_RATIO, + "gcse-cost-distance-ratio", + "Scaling factor in calculation of maximum distance an expression can be moved by GCSE optimizations", + 10, 0, 0) +/* GCSE won't restrict distance for which an expression with rtx_cost greater + than COSTS_N_INSN(GCSE_UNRESTRICTED_COST) is allowed to move. */ +DEFPARAM(PARAM_GCSE_UNRESTRICTED_COST, + "gcse-unrestricted-cost", + "Cost at which GCSE optimizations will not constraint the distance an expression can travel", + 3, 0, 0) + /* This parameter limits the number of insns in a loop that will be unrolled, and by how much the loop is unrolled. |