From: Segher Boessenkool <segher@kernel.crashing.org>
To: Andrew Pinski <pinskia@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [RFC] sched: Do not move expensive insns speculatively (PR68664)
Date: Fri, 27 Jan 2017 01:27:00 -0000 [thread overview]
Message-ID: <20170127011905.GA30284@gate.crashing.org> (raw)
In-Reply-To: <CA+=Sn1nWXo_QEtmzt-gwiRJHyxS4YDpqy6N1nMyR=+=JzYF6Qw@mail.gmail.com>
On Thu, Jan 26, 2017 at 05:00:44PM -0800, Andrew Pinski wrote:
> On Thu, Jan 26, 2017 at 4:38 PM, Segher Boessenkool
> <segher@kernel.crashing.org> wrote:
> > Scheduling should never move very expensive instructions to places they
> > are executed more frequently. This patch fixes that, reducing the
> > execution time of c-ray by over 40% (I tested on a BE Power7 system).
> >
> > Is there some existing way to test for "very expensive insn" or "very
> > expensive insn we should not speculate"? Should there be a new hook?
> > Is only disallowing (FP) SQRT and DIV a good solution?
>
> Seems like it should be checking the insn cost and compare that
> against some parameter. That is possibly set by the target if needed.
But what is "insn cost"? Latency is no good at all -- we *want* insns
with higher latency to be earlier. fsqrt is not pipelined, and that is
what makes it so costly. (This isn't modeled in the scheduling
description btw: that would make the automata sizes explode, the usual
problem).
Segher
next prev parent reply other threads:[~2017-01-27 1:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-27 0:40 Segher Boessenkool
2017-01-27 1:12 ` Andrew Pinski
2017-01-27 1:27 ` Segher Boessenkool [this message]
2017-01-27 2:12 ` Andrew Pinski
2017-01-27 11:36 ` Ramana Radhakrishnan
2017-01-27 12:43 ` Segher Boessenkool
2017-01-27 18:11 ` Jeff Law
2017-01-27 12:45 ` Bernd Schmidt
2017-01-27 14:19 ` Segher Boessenkool
2017-01-27 18:20 ` Jeff Law
2017-01-27 12:20 ` Richard Biener
2017-01-27 12:42 ` Segher Boessenkool
2017-01-27 13:43 ` Richard Biener
2017-01-27 14:37 ` Segher Boessenkool
2017-01-27 18:08 ` Jeff Law
2017-01-27 22:04 ` Segher Boessenkool
2017-01-27 22:21 ` Jeff Law
2017-01-27 22:30 ` Segher Boessenkool
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=20170127011905.GA30284@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=pinskia@gmail.com \
/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).