Hi,
After patch fixing PR69042 at 
https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00887.html, GCC hits bound (30) 
for parameter PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND in case 173.applu, which 
causes ~4% regression on AArch64.  Since adding more candidates is inevitable 
(Well, we might be able to further reduce candidate number, but that's not for 
current stage), this patch increases the bound from 30 to 40.  The parameter 
and the bound are introduced in 2004 and haven't changed since then.  Given 
hardwares are improved in last ten years, I think it is acceptable to make such 
a change.
Bootstrap gcc and build spec2k6 on x86_64/AArch64, there is no obvious 
regression in compilation time.
I also compiled an IVOPT heavy program affected in spec2k by ~150 times, 
overall compilation time is regressed by 1% because of this change.  I looked 
into the specific case,  IVOPT compilation time of IVOPT was actually reduced 
by >20% last year because of address type uses grouping.  I have another patch 
which can further reduce IVOPT compilation time (and its memory use) by 7-8%.  
The idea is skipping cost computation for sub-uses in group, of course it may 
result in different assembly code for some complicated cases because it 
estimates cost rather than doing real computation.  I did double check one of 
such case that the change in generated assembly is not degeneration.  I have 
some other ideas which might be helpful too, but they are not stage4 stuff.

So is this OK?

2016-03-21  Bin Cheng  <bin.ch...@arm.com>

        PR tree-optimization/69042
        * params.def (PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND): Increase the
        parameter from 30 to 40.


diff --git a/gcc/params.def b/gcc/params.def
index 2ee631d..9362c15 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -502,7 +502,7 @@ DEFPARAM(PARAM_LIM_EXPENSIVE,
 DEFPARAM(PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND,
         "iv-consider-all-candidates-bound",
         "Bound on number of candidates below that all candidates are 
considered in iv optimizations.",
-        30, 0, 0)
+        40, 0, 0)
 
 /* The induction variable optimizations give up on loops that contain more
    induction variable uses.  */

Reply via email to