From: marxin <mliska@suse.cz>
To: gcc-patches@gcc.gnu.org
Cc: hubicka@ucw.cz
Subject: [PATCH 0/3] Rework early return and hot/cold label predictors
Date: Tue, 06 Jun 2017 09:05:00 -0000 [thread overview]
Message-ID: <cover.1496739572.git.mliska@suse.cz> (raw)
Hello.
As mentioned in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79489#c1
early-return predictors is currenty not much precise. I decided to
come up with GIMPLE_PREDICT statement that I put early and thus
more precise numbers can be seen.
For SPEC 2017 we can improve the predictor from:
HEURISTICS BRANCHES (REL) BR. HITRATE HITRATE COVERAGE COVERAGE (REL) predict.def (REL)
early return (on trees) 17804 11.7% 63.54% 55.14% / 85.46% 38154989508 38.15G 5.4% 54% 1.1%
to:
early return (on trees) 3692 4.1% 79.55% 66.22% / 76.14% 15778842701 15.78G 2.4% 66% 0.2%
For tests I had to change couple of tailrecursion tests, where recursion
happens in tailr2 pass. It's not done in tailr1 due to GIMPLE_PREDICT
statement.
Apart from that I would like to add a sanity unit tests for values
of predictors. And finally, I was asked by Honza to transform cold/hot
label predictors to GIMPLE_PREDICT as well.
Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
Ready to be installed?
Martin
marxin (3):
Come up with selftests for predict.c.
Make early return predictor more precise.
Rework cold and hot label attributes in predict.c.
gcc/gimple-low.c | 3 +
gcc/gimple-predict.h | 8 ++
gcc/gimplify.c | 26 +++++-
gcc/predict.c | 103 +++++++++---------------
gcc/predict.def | 15 +---
gcc/selftest-run-tests.c | 1 +
gcc/selftest.h | 1 +
gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c | 4 +-
gcc/testsuite/gcc.dg/tree-ssa/tailrecursion-1.c | 4 +-
gcc/testsuite/gcc.dg/tree-ssa/tailrecursion-2.c | 4 +-
gcc/testsuite/gcc.dg/tree-ssa/tailrecursion-6.c | 4 +-
gcc/tree-inline.c | 7 ++
12 files changed, 95 insertions(+), 85 deletions(-)
--
2.13.0
next reply other threads:[~2017-06-06 9:05 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 9:05 marxin [this message]
2017-06-06 9:05 ` [PATCH 2/3] Make early return predictor more precise marxin
2017-06-09 14:08 ` Jan Hubicka
2017-06-13 10:59 ` Martin Liška
2017-06-19 11:11 ` Jan Hubicka
2017-06-20 12:13 ` Martin Liška
2017-06-21 8:27 ` Jan Hubicka
2017-06-21 12:50 ` Martin Liška
2017-06-22 10:48 ` [PATCH] Fix ipa-split-5.c test-case Martin Liška
2017-06-22 14:14 ` [PATCH 2/3] Make early return predictor more precise Christophe Lyon
2017-06-23 7:03 ` Martin Liška
2017-06-23 7:40 ` Christophe Lyon
2017-06-06 9:05 ` [PATCH 1/3] Come up with selftests for predict.c marxin
2017-06-06 10:44 ` David Malcolm
2017-06-08 12:30 ` Martin Liška
2017-06-08 13:09 ` David Malcolm
2017-06-08 23:07 ` Jan Hubicka
2017-06-06 9:05 ` [PATCH 3/3] Rework cold and hot label attributes in predict.c marxin
2017-06-09 14:04 ` Jan Hubicka
2017-06-21 13:06 ` [PATCH 4/N] Recover GOTO predictor Martin Liška
2017-06-21 13:09 ` Martin Liška
2017-06-22 10:27 ` Richard Biener
2017-06-22 10:57 ` Martin Liška
2017-06-22 11:47 ` Richard Biener
2017-06-30 9:24 ` Martin Liška
2017-06-30 12:37 ` Jan Hubicka
2017-06-30 13:48 ` Martin Liška
2017-07-31 7:47 ` Martin Liška
2017-07-31 8:55 ` Richard Biener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1496739572.git.mliska@suse.cz \
--to=mliska@suse.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).