This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Create an extra BB in profile-generate (PR tree-optimization/81041).
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Martin Li?ka <mliska at suse dot cz>
- Cc: Markus Trippelsdorf <markus at trippelsdorf dot de>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Mon, 12 Jun 2017 11:15:33 +0200
- Subject: Re: [PATCH] Create an extra BB in profile-generate (PR tree-optimization/81041).
- Authentication-results: sourceware.org; auth=none
- References: <fc4af520-5e2d-734c-1493-bf05777b1d62@suse.cz> <20170609165646.GA29049@x4> <8ae4fa57-9834-732e-bb68-0803503c1c8b@suse.cz>
> Hello.
>
> Sorry for this breakage, it's actually the same mistake I did in the PR
> that belongs to the test I broke. I overlooked the ICE in log file.
>
> I'm testing the patch, may I install it after it survives regression
> tests?
OK,
thanks!
Honza
>
> Martin
> >From 20e5419136ec26ed009ca93eedccd2582b65dd36 Mon Sep 17 00:00:00 2001
> From: marxin <mliska@suse.cz>
> Date: Mon, 12 Jun 2017 09:50:06 +0200
> Subject: [PATCH] Create an extra BB in profile-generate (PR
> tree-optimization/81041).
>
> gcc/ChangeLog:
>
> 2017-06-12 Martin Liska <mliska@suse.cz>
>
> PR tree-optimization/81041
> * tree-profile.c (gimple_gen_ic_func_profiler):
> Create an extra BB in profile-generate
> (gimple_gen_time_profiler): Likewise.
> ---
> gcc/tree-profile.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
> index f5c06684402..2ae4b69b68e 100644
> --- a/gcc/tree-profile.c
> +++ b/gcc/tree-profile.c
> @@ -429,6 +429,10 @@ gimple_gen_ic_func_profiler (void)
> basic_block cond_bb = split_edge (single_succ_edge (entry));
> basic_block update_bb = split_edge (single_succ_edge (cond_bb));
>
> + /* We need to do an extra split in order to not create an input
> + for a possible PHI node. */
> + split_edge (single_succ_edge (update_bb));
> +
> edge true_edge = single_succ_edge (cond_bb);
> true_edge->flags = EDGE_TRUE_VALUE;
>
> @@ -487,6 +491,10 @@ gimple_gen_time_profiler (unsigned tag, unsigned base)
> basic_block cond_bb = split_edge (single_succ_edge (entry));
> basic_block update_bb = split_edge (single_succ_edge (cond_bb));
>
> + /* We need to do an extra split in order to not create an input
> + for a possible PHI node. */
> + split_edge (single_succ_edge (update_bb));
> +
> edge true_edge = single_succ_edge (cond_bb);
> true_edge->flags = EDGE_TRUE_VALUE;
> true_edge->probability = PROB_UNLIKELY;
> --
> 2.13.1
>