This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
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)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Jeff Law <law at redhat dot com>, Bernd Schmidt <bschmidt at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 3 Apr 2017 09:20:08 +0200
- 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)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E6FF764A61
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E6FF764A61
- References: <20170401122027.GT17461@tucnak> <CAFULd4bKRsG94P9xFCgUJQj5E=BCJkWoi837yBEj51z0fU4OEg@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sun, Apr 02, 2017 at 08:44:03PM +0200, Uros Bizjak wrote:
> x86 part LGTM.
>
> Hopefully, this infrastructure will allow us to fix (or it already
> fixes) PR 56309 [1].
I think only allows to. The target hook has access to the if_info
structure which contains the original basic blocks, their edges,
frequencies, and can inspect both the new sequence as well as the original
basic blocks etc. I really don't know in detail what the problem with
cmov is (latency, or that it blocks some CPU units, something else?).
In any case, any change will need lots of benchmarking, because apparently
cmov is extremely important to get right (for not well predictable branches
use it, for other not really). Another question is if say setcc has similar
problem or not.
> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56309
Jakub