This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCHv2][PING][PR 59521] Respect __builtin_expect in switch statements
- From: Jeff Law <law at redhat dot com>
- To: Yury Gribov <tetra2005 dot patches at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Cc: marxin <marxin at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Fri, 25 Aug 2017 13:22:44 -0600
- Subject: Re: [PATCHv2][PING][PR 59521] Respect __builtin_expect in switch statements
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 96FB6769F0
- References: <57712711-c55f-14e3-465b-db01a869d4f6@gmail.com>
On 07/27/2017 09:21 PM, Yury Gribov wrote:
> Hi all,
>
> This is a ping for
> https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01275.html . I've fixed
> attachment type, hopefully it's easier to read now.
>
> This patch adds support for __builtin_expect in switch statements at
> tree level (RTL part would be reviewed/commited separately). It's an
> update of https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01016.html ,
> rebased and retested.
>
> Ok for trunk?
>
> -Y
>
> pr59521-2.patch
>
>
> 2017-07-21 Yury Gribov <tetra2005@gmail.com>
> Martin Liska <marxin@gcc.gnu.org>
>
> PR middle-end/59521
>
> gcc/
> * predict.c (set_even_probabilities): Handle case of a single
> likely edge.
> (combine_predictions_for_bb): Ditto.
> (tree_predict_by_opcode): Handle switch statements.
> * stmt.c (balance_case_nodes): Select pivot value based on
> probabilities.
>
> gcc/testsuite/
> * gcc.dg/predict-15.c: New test.
Your patch includes changes to tree-cfg.c. Those need to be mentioned
in the ChangeLog.
Your ChangeLog entry mentions a stmt.c change, but there is no such
change in the patch itself.
The bits that are actually in the patch are fine. You just need to
verify they're what you wanted to submit, and if so make sure they have
a correct ChangeLog and they're OK.
jeff