Re: [PATCH 2/3] Make early return predictor more precise.

2017-06-23 Thread Christophe Lyon
On 23 June 2017 at 09:03, Martin Liška wrote: > On 06/22/2017 04:14 PM, Christophe Lyon wrote: >> Since this commit (r249450), I have noticed a regression: >> FAIL:gcc.dg/tree-ssa/ipa-split-5.c scan-tree-dump optimized "part" >> on aarch64/arm >> >> Christophe > > Hello. > >

Re: [PATCH 2/3] Make early return predictor more precise.

2017-06-23 Thread Martin Liška
On 06/22/2017 04:14 PM, Christophe Lyon wrote: > Since this commit (r249450), I have noticed a regression: > FAIL:gcc.dg/tree-ssa/ipa-split-5.c scan-tree-dump optimized "part" > on aarch64/arm > > Christophe Hello. I'm aware of the failure and I fixed that (hopefully) in r249503. Can you

Re: [PATCH 2/3] Make early return predictor more precise.

2017-06-22 Thread Christophe Lyon
Hi, On 21 June 2017 at 14:50, Martin Liška wrote: > On 06/21/2017 10:26 AM, Jan Hubicka wrote: >>> >>> Ok, so I fixed that in the described way. There's one remaining fallout of: >>> gcc/testsuite/gcc.dg/tree-ssa/ipa-split-5.c >>> >>> Where a fnsplit is properly done, but then

Re: [PATCH 2/3] Make early return predictor more precise.

2017-06-21 Thread Martin Liška
On 06/21/2017 10:26 AM, Jan Hubicka wrote: >> >> Ok, so I fixed that in the described way. There's one remaining fallout of: >> gcc/testsuite/gcc.dg/tree-ssa/ipa-split-5.c >> >> Where a fnsplit is properly done, but then it's again inlined: >> >> Considering split_me.part.0/5 with 23 size >> to

Re: [PATCH 2/3] Make early return predictor more precise.

2017-06-21 Thread Jan Hubicka
> > Ok, so I fixed that in the described way. There's one remaining fallout of: > gcc/testsuite/gcc.dg/tree-ssa/ipa-split-5.c > > Where a fnsplit is properly done, but then it's again inlined: > > Considering split_me.part.0/5 with 23 size > to be inlined into test/2 in unknown:0 > Estimated

Re: [PATCH 2/3] Make early return predictor more precise.

2017-06-20 Thread Martin Liška
On 06/19/2017 01:11 PM, Jan Hubicka wrote: >> Ok, you're right that we can preserve the predictor. However, let's consider >> following test-case: >> >> static >> int baz(int a) >> { >> if (a == 1) >> return 1; >> >> return 0; >> } >> >> >> static >> int bar(int a) >> { >> if (a ==

Re: [PATCH 2/3] Make early return predictor more precise.

2017-06-19 Thread Jan Hubicka
> Ok, you're right that we can preserve the predictor. However, let's consider > following test-case: > > static > int baz(int a) > { > if (a == 1) > return 1; > > return 0; > } > > > static > int bar(int a) > { > if (a == 1) > return baz(a); > > return 0; > } > > static

Re: [PATCH 2/3] Make early return predictor more precise.

2017-06-13 Thread Martin Liška
On 06/09/2017 04:08 PM, Jan Hubicka wrote: >> gcc/ChangeLog: >> >> 2017-05-26 Martin Liska >> >> PR tree-optimization/79489 >> * gimplify.c (maybe_add_early_return_predict_stmt): New >> function. >> (gimplify_return_expr): Call the function. >> *

Re: [PATCH 2/3] Make early return predictor more precise.

2017-06-09 Thread Jan Hubicka
> gcc/ChangeLog: > > 2017-05-26 Martin Liska > > PR tree-optimization/79489 > * gimplify.c (maybe_add_early_return_predict_stmt): New > function. > (gimplify_return_expr): Call the function. > * predict.c (tree_estimate_probability_bb): Remove

[PATCH 2/3] Make early return predictor more precise.

2017-06-06 Thread marxin
gcc/ChangeLog: 2017-05-26 Martin Liska PR tree-optimization/79489 * gimplify.c (maybe_add_early_return_predict_stmt): New function. (gimplify_return_expr): Call the function. * predict.c (tree_estimate_probability_bb): Remove handling