public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH PR69042/02]Increase PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND from 30 to 40
@ 2016-03-21 15:23 Bin Cheng
  2016-03-21 16:10 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Bin Cheng @ 2016-03-21 15:23 UTC (permalink / raw)
  To: gcc-patches; +Cc: nd

[-- Attachment #1: Type: text/plain, Size: 1661 bytes --]

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.cheng@arm.com>

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



[-- Attachment #2: increase-param-iv_consider_all_candidates_bound-20160315.txt --]
[-- Type: text/plain, Size: 491 bytes --]

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.  */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH PR69042/02]Increase PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND from 30 to 40
  2016-03-21 15:23 [PATCH PR69042/02]Increase PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND from 30 to 40 Bin Cheng
@ 2016-03-21 16:10 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2016-03-21 16:10 UTC (permalink / raw)
  To: Bin Cheng, gcc-patches; +Cc: nd

On 03/21/2016 09:14 AM, Bin Cheng wrote:
> 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.cheng@arm.com>
>
> 	PR tree-optimization/69042
> 	* params.def (PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND): Increase the
> 	parameter from 30 to 40.
OK.
jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-21 16:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-21 15:23 [PATCH PR69042/02]Increase PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND from 30 to 40 Bin Cheng
2016-03-21 16:10 ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).