This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add missing edge probability in simd_clone_adjust
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Tom de Vries <Tom_deVries at mentor dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 2 Aug 2017 20:26:28 +0200
- Subject: Re: [PATCH] Add missing edge probability in simd_clone_adjust
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jakub at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B3C9981235
- References: <61e0af9b-205c-644a-b1ee-42e035d61cc1@mentor.com> <4639e236-9c4a-ef5c-ade5-b955011e772b@mentor.com> <20170802162936.GM2123@tucnak> <f232be07-9191-e708-023f-b76b2e2ebde0@mentor.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Aug 02, 2017 at 08:19:41PM +0200, Tom de Vries wrote:
> 2017-08-02 Tom de Vries <tom@codesourcery.com>
>
> * omp-simd-clone.c (simd_clone_adjust): Add missing edge probability.
Ok, thanks.
> diff --git a/gcc/omp-simd-clone.c b/gcc/omp-simd-clone.c
> index a1a563e..fbb122c 100644
> --- a/gcc/omp-simd-clone.c
> +++ b/gcc/omp-simd-clone.c
> @@ -1240,8 +1240,11 @@ simd_clone_adjust (struct cgraph_node *node)
> g = gimple_build_cond (EQ_EXPR, mask, build_zero_cst (TREE_TYPE (mask)),
> NULL, NULL);
> gsi_insert_after (&gsi, g, GSI_CONTINUE_LINKING);
> - make_edge (loop->header, incr_bb, EDGE_TRUE_VALUE);
> - FALLTHRU_EDGE (loop->header)->flags = EDGE_FALSE_VALUE;
> + edge e = make_edge (loop->header, incr_bb, EDGE_TRUE_VALUE);
> + e->probability = profile_probability::unlikely ().guessed ();
> + edge fallthru = FALLTHRU_EDGE (loop->header);
> + fallthru->flags = EDGE_FALSE_VALUE;
> + fallthru->probability = profile_probability::likely ().guessed ();
> }
>
> basic_block latch_bb = NULL;
Jakub