diff options
author | Jan Hubicka <jh@suse.cz> | 2005-11-05 01:55:23 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2005-11-05 00:55:23 +0000 |
commit | 95b9a3a55c158fc87ac4164d87fdccaa33bfa8df (patch) | |
tree | 2528946d7ea31c1a4553fc28e301db2d6bfac0d1 /gcc/predict.c | |
parent | 50fe876da0e0792b5cf55d7eba7dd30f0efbf1de (diff) | |
download | gcc-95b9a3a55c158fc87ac4164d87fdccaa33bfa8df.zip gcc-95b9a3a55c158fc87ac4164d87fdccaa33bfa8df.tar.gz gcc-95b9a3a55c158fc87ac4164d87fdccaa33bfa8df.tar.bz2 |
re PR rtl-optimization/23490 (Long compile time for array initializer with inlined constructor)
PR rtl-optimization/23490
* doc/invoke.texi (max-predicted-iterations, max-cse-insns,
max-flow-memory-location): Document.
* flow.c: Include params.h
(MAX_MEM_SET_LIST_LEN): Kill.
(add_to_mem_set_list): Use new param.
* cse.c (cse_basic_block): Replace 1000 by new param.
* params.def (PARAM_MAX_PREDICTED_ITERATIONS, PARAM_MAX_CSE_INSNS,
PARAM_MAX_FLOW_MEMORY_LOCATIONS): New.
* predict.c (predict_loops): Use new param.
* predict.def (MAX_PRED_LOOP_ITERATIONS): Remove.
From-SVN: r106520
Diffstat (limited to 'gcc/predict.c')
-rw-r--r-- | gcc/predict.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/predict.c b/gcc/predict.c index e2f7262..8f50ba0 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -624,8 +624,9 @@ predict_loops (struct loops *loops_info, bool rtlsimpleloops) niter = desc.niter + 1; if (niter == 0) /* We might overflow here. */ niter = desc.niter; - if (niter > MAX_PRED_LOOP_ITERATIONS) - niter = MAX_PRED_LOOP_ITERATIONS; + if (niter + > (unsigned int) PARAM_VALUE (PARAM_MAX_PREDICTED_ITERATIONS)) + niter = PARAM_VALUE (PARAM_MAX_PREDICTED_ITERATIONS); prob = (REG_BR_PROB_BASE - (REG_BR_PROB_BASE + niter /2) / niter); @@ -653,19 +654,17 @@ predict_loops (struct loops *loops_info, bool rtlsimpleloops) if (TREE_CODE (niter) == INTEGER_CST) { int probability; + int max = PARAM_VALUE (PARAM_MAX_PREDICTED_ITERATIONS); if (host_integerp (niter, 1) && tree_int_cst_lt (niter, - build_int_cstu (NULL_TREE, - MAX_PRED_LOOP_ITERATIONS - 1))) + build_int_cstu (NULL_TREE, max - 1))) { HOST_WIDE_INT nitercst = tree_low_cst (niter, 1) + 1; probability = ((REG_BR_PROB_BASE + nitercst / 2) / nitercst); } else - probability = ((REG_BR_PROB_BASE - + MAX_PRED_LOOP_ITERATIONS / 2) - / MAX_PRED_LOOP_ITERATIONS); + probability = ((REG_BR_PROB_BASE + max / 2) / max); predict_edge (exits[j], PRED_LOOP_ITERATIONS, probability); } |