From: Segher Boessenkool <segher@kernel.crashing.org>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Uros Bizjak <ubizjak@gmail.com>, Jeff Law <law@redhat.com>,
Bernd Schmidt <bschmidt@redhat.com>,
gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] On x86 allow if-conversion of more than one insn as long as there is at most one cmov (PR tree-optimization/79390)
Date: Sat, 01 Apr 2017 18:43:00 -0000 [thread overview]
Message-ID: <20170401184335.GE4402@gate.crashing.org> (raw)
In-Reply-To: <20170401122027.GT17461@tucnak>
Hi,
On Sat, Apr 01, 2017 at 02:20:27PM +0200, Jakub Jelinek wrote:
> As discussed in the PR, in the following testcase we don't if-convert
> with the generic (and many other) tuning, because we default to
> --param max-rtl-if-conversion-insns=1 in most of the tunings.
> The problem we have is with multiple cmov instructions, but in the
> testcase there is just one cmov and the other insn is turned into a SSE
> max insn, which is fine.
>
> This patch stops artificially lowering that param, and for one_if_conv_insn
> tuning it instead rejects the if-conversion if the resulting sequence has
> multiple cmov instructions. The hook is passed if_info too, so it can
> in the future do better heuristics based on predictability of the edges,
> how far the uses of the cmov result are (I assume cmov major problem is
> latency, right?) etc.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
Does this change anything for targets that do not implement the new hook?
It isn't immediately obvious from the patch.
Segher
next prev parent reply other threads:[~2017-04-01 18:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-01 12:20 Jakub Jelinek
2017-04-01 18:43 ` Segher Boessenkool [this message]
2017-04-01 18:47 ` Jakub Jelinek
2017-04-02 18:44 ` Uros Bizjak
2017-04-03 7:20 ` Jakub Jelinek
2017-04-04 17:31 ` Jeff Law
2017-04-06 12:50 ` Rainer Orth
2017-04-06 12:55 ` Jakub Jelinek
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=20170401184335.GE4402@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=bschmidt@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=law@redhat.com \
--cc=ubizjak@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).