diff mbox

Change PRED_LOOP_EXIT from 92 to 85.

Message ID 43c22d54-b930-7fd9-658b-9f1ac813a00a@suse.cz
State New
Headers show

Commit Message

Martin Liška June 17, 2016, 2:29 p.m. UTC
Hello.

After we've recently applied various changes (fixes) to predict.c, SPEC2006
shows that PRED_LOOP_EXIT value should be amended.

Survives regression tests & bootstrap on x86_64-linux.
Pre-approved by Honza, installed as r237556.

Thanks,
Martin

Comments

Andrew Pinski June 18, 2016, 4:24 a.m. UTC | #1
On Fri, Jun 17, 2016 at 7:29 AM, Martin Liška <mliska@suse.cz> wrote:
> Hello.
>
> After we've recently applied various changes (fixes) to predict.c, SPEC2006
> shows that PRED_LOOP_EXIT value should be amended.


This caused a 1% decrease of performance on coremarks on
aarch64-linux-gnu on ThunderX.

Thanks,
Andrew

>
> Survives regression tests & bootstrap on x86_64-linux.
> Pre-approved by Honza, installed as r237556.
>
> Thanks,
> Martin
Martin Liška June 20, 2016, 8:50 a.m. UTC | #2
On 06/18/2016 06:24 AM, Andrew Pinski wrote:
> This caused a 1% decrease of performance on coremarks on
> aarch64-linux-gnu on ThunderX.
> 
> Thanks,
> Andrew

Hi.

It would be good if you will run your benchmark with -fprofile-generate and
-fprofile-use -fdump-ipa-profile-details. After that, running contrib/analyze_brprob.py
on the concatenated *.profile dumps will display predictor results, maybe it can provide
interesting numbers, compared to numbers get on CPU2006.

Thanks,
Martin
diff mbox

Patch

From 849c2e064bcadc269f82656d15722f28d1b1fe73 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Fri, 17 Jun 2016 14:44:24 +0200
Subject: [PATCH] Change PRED_LOOP_EXIT from 92 to 85.

contrib/ChangeLog:

2016-06-17  Martin Liska  <mliska@suse.cz>

	* analyze_brprob.py: Fix columns of script output.

gcc/ChangeLog:

2016-06-17  Martin Liska  <mliska@suse.cz>

	* predict.def: PRED_LOOP_EXIT from 92 to 85.

gcc/testsuite/ChangeLog:

2016-06-17  Martin Liska  <mliska@suse.cz>

	* gcc.dg/predict-9.c: Fix dump scanning.
---
 contrib/analyze_brprob.py        | 4 ++--
 gcc/predict.def                  | 2 +-
 gcc/testsuite/gcc.dg/predict-9.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/contrib/analyze_brprob.py b/contrib/analyze_brprob.py
index 9808c46..2526623 100755
--- a/contrib/analyze_brprob.py
+++ b/contrib/analyze_brprob.py
@@ -119,10 +119,10 @@  class Profile:
         elif sorting == 'coverage':
             sorter = lambda x: x[1].count
 
-        print('%-36s %8s %6s  %-16s %14s %8s %6s' % ('HEURISTICS', 'BRANCHES', '(REL)',
+        print('%-40s %8s %6s  %-16s %14s %8s %6s' % ('HEURISTICS', 'BRANCHES', '(REL)',
               'HITRATE', 'COVERAGE', 'COVERAGE', '(REL)'))
         for (k, v) in sorted(self.heuristics.items(), key = sorter):
-            print('%-36s %8i %5.1f%% %6.2f%% / %6.2f%% %14i %8s %5.1f%%' %
+            print('%-40s %8i %5.1f%% %6.2f%% / %6.2f%% %14i %8s %5.1f%%' %
             (k, v.branches, percentage(v.branches, self.branches_max ()),
              percentage(v.hits, v.count), percentage(v.fits, v.count),
              v.count, v.count_formatted(), percentage(v.count, self.count_max()) ))
diff --git a/gcc/predict.def b/gcc/predict.def
index a0d0ba9..d3bc757 100644
--- a/gcc/predict.def
+++ b/gcc/predict.def
@@ -89,7 +89,7 @@  DEF_PREDICTOR (PRED_COLD_FUNCTION, "cold function call", PROB_VERY_LIKELY,
 	       PRED_FLAG_FIRST_MATCH)
 
 /* Edge causing loop to terminate is probably not taken.  */
-DEF_PREDICTOR (PRED_LOOP_EXIT, "loop exit", HITRATE (92),
+DEF_PREDICTOR (PRED_LOOP_EXIT, "loop exit", HITRATE (85),
 	       PRED_FLAG_FIRST_MATCH)
 
 /* Edge causing loop to terminate by computing value used by later
diff --git a/gcc/testsuite/gcc.dg/predict-9.c b/gcc/testsuite/gcc.dg/predict-9.c
index a613961..196e31c 100644
--- a/gcc/testsuite/gcc.dg/predict-9.c
+++ b/gcc/testsuite/gcc.dg/predict-9.c
@@ -19,5 +19,5 @@  void foo (int base)
   }
 }
 
-/* { dg-final { scan-tree-dump-times "first match heuristics: 2.0%" 3 "profile_estimate"} } */
-/* { dg-final { scan-tree-dump-times "first match heuristics: 4.0%" 1 "profile_estimate"} } */
+/* { dg-final { scan-tree-dump-times "first match heuristics: 3.0%" 3 "profile_estimate"} } */
+/* { dg-final { scan-tree-dump-times "first match heuristics: 7.5%" 1 "profile_estimate"} } */
-- 
2.8.3