Re: [PATCH testsuite]Require vect_cond_mixed for test case gcc.dg/vect/pr56541.c

2016-08-11 Thread Bin.Cheng
On Thu, Aug 11, 2016 at 11:38 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Thu, Aug 11, 2016 at 11:56 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Thu, Aug 11, 2016 at 10:50 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>

Re: [PATCH testsuite]Require vect_cond_mixed for test case gcc.dg/vect/pr56541.c

2016-08-11 Thread Bin.Cheng
On Thu, Aug 11, 2016 at 10:50 AM, Richard Biener wrote: > On Wed, Aug 10, 2016 at 5:58 PM, Bin Cheng wrote: >> Hi, >> Due to some reasons, tree-if-conv.c now factors floating point comparison >> out of cond_expr, >> resulting in mixed types in it.

Re: [PATCH AArch64/V3]Add new patterns for vcond_mask and vec_cmp

2016-08-11 Thread Bin.Cheng
On Thu, Aug 11, 2016 at 9:36 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Thu, Aug 11, 2016 at 8:08 AM, Andreas Schwab <sch...@suse.de> wrote: >> ../../gcc/config/aarch64/aarch64-simd.md: In function 'rtx_def* >> gen_vec_cmpv2sfv2si(rtx, rtx, rtx, rtx)': >>

Re: [PATCH AArch64/V3]Add new patterns for vcond_mask and vec_cmp

2016-08-11 Thread Bin.Cheng
On Thu, Aug 11, 2016 at 8:08 AM, Andreas Schwab wrote: > ../../gcc/config/aarch64/aarch64-simd.md: In function 'rtx_def* > gen_vec_cmpv2sfv2si(rtx, rtx, rtx, rtx)': > ../../gcc/config/aarch64/aarch64-simd.md:2498:17: error: 'comparison' may be > used uninitialized in this

Re: [PATCH GCC]Resolve compilation time known alias checks in vectorizer

2016-08-09 Thread Bin.Cheng
On Sat, Aug 6, 2016 at 9:20 PM, Andreas Schwab <sch...@linux-m68k.org> wrote: > On Mi, Jul 13 2016, "Bin.Cheng" <amker.ch...@gmail.com> wrote: > >> Patch re-tested/applied on trunk as r238301. > > This breaks gcc.dg/vect/vect-117.c on powerpc. Hi Andreas,

Re: [PATCH] Fix PR72772

2016-08-09 Thread Bin.Cheng
On Fri, Aug 5, 2016 at 11:48 AM, Richard Biener wrote: > > This fixes PR72772 by avoing placing a degenerate PHI in each > forwarder block loop init creates when creating simple preheaders. > The solution is to simply split the single loop entry edge which > is also way cheaper

Re: [PATCH AArch64/V3]Add new patterns for vcond_mask and vec_cmp

2016-08-08 Thread Bin.Cheng
On Mon, Aug 8, 2016 at 11:40 AM, James Greenhalgh wrote: > On Mon, Aug 01, 2016 at 01:18:53PM +, Bin Cheng wrote: >> Hi, >> This is the 3rd version patch implementing vcond_mask and vec_cmp patterns on >> AArch64. Bootstrap and test along with next patch on AArch64,

Re: [PATCH GCC]Simplify interface for simplify_using_initial_conditions

2016-08-05 Thread Bin.Cheng
On Thu, Aug 4, 2016 at 1:48 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Thu, Aug 4, 2016 at 10:40 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Wed, Aug 3, 2016 at 11:17 PM, Jeff Law <l...@redhat.com> wrote: >>> On 08/03/2016 10:35 AM, Bin

Re: [PATCH GCC]Simplify interface for simplify_using_initial_conditions

2016-08-04 Thread Bin.Cheng
On Wed, Aug 3, 2016 at 11:17 PM, Jeff Law wrote: > On 08/03/2016 10:35 AM, Bin Cheng wrote: >> >> Hi, >> When I introduced parameter STOP for expand_simple_operations, I also >> added it for simplify_using_initial_conditions. The STOP argument is also >> passed to

Re: [PATCH PR34114/1]More multiple_of_p cases.

2016-07-29 Thread Bin.Cheng
On Fri, Jul 29, 2016 at 4:50 PM, Jeff Law wrote: > On 07/29/2016 09:35 AM, Bin Cheng wrote: >> >> Hi, >> This is prerequisite patch for fixing PR34114 which reveals a weakness of >> GCC in analyzing niter for loop with NE_EXPR exit condition. For such >> loops, we quite often

Re: [Patch GCC]Support constraint flags in loop structure.

2016-07-28 Thread Bin.Cheng
On Wed, Jul 27, 2016 at 11:07 AM, Richard Biener wrote: > On Tue, Jul 26, 2016 at 7:10 PM, Bin Cheng wrote: >> Hi, >> This patch adds support for constraint flags in loop structure. Different >> to existing boolean flags which are set by niter

Re: [Patch GCC/01]Bring back warning message on loop whose counter might overflow

2016-07-22 Thread Bin.Cheng
On Fri, Jul 22, 2016 at 12:39 PM, Richard Biener wrote: > On Thu, Jul 21, 2016 at 6:48 PM, Bin Cheng wrote: >> Hi, >> Previous patch removed warning message on loops whose counter might >> overflow, while this patch adds it back. Reason is it's

Re: [PATCH GCC/03]New option warning missed optimization on loops whose counter may overflow

2016-07-22 Thread Bin.Cheng
On Fri, Jul 22, 2016 at 9:48 AM, Martin Jambor wrote: > On Thu, Jul 21, 2016 at 04:50:31PM +, Bin Cheng wrote: >> Hi, >> This patch adds new option -Wmissed-loop-optimizations warning on loops >> whose counter may overflow, as well as makes -Wunsafe-loop-optimizations an >>

Re: [PATCH GCC]Vectorize possible infinite loops by versioning

2016-07-21 Thread Bin.Cheng
On Wed, Jul 20, 2016 at 10:27 PM, Jeff Law wrote: > On 06/28/2016 12:18 AM, Bin Cheng wrote: >> >> Hi, >> This patch improves vectorizer in order to handle possible infinite loops >> by versioning. Its changes fall in three categories. >> A) Changes in vect_get_loop_niters. AT

Re: [PATCH GCC]Improve no-overflow check in SCEV using value range info.

2016-07-20 Thread Bin.Cheng
On Wed, Jul 20, 2016 at 11:01 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Tue, Jul 19, 2016 at 6:15 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Tue, Jul 19, 2016 at 1:10 PM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH GCC]Improve no-overflow check in SCEV using value range info.

2016-07-19 Thread Bin.Cheng
On Tue, Jul 19, 2016 at 1:10 PM, Richard Biener wrote: > On Mon, Jul 18, 2016 at 6:27 PM, Bin Cheng wrote: >> Hi, >> Scalar evolution needs to prove no-overflow for source variable when >> handling type conversion. This is important because

Re: [PATCH PR71503/PR71683]Fix ICE in tree-if-conv.c

2016-07-19 Thread Bin.Cheng
On Thu, Jul 14, 2016 at 6:49 PM, Jeff Law wrote: > On 07/14/2016 10:12 AM, Bin Cheng wrote: >> >> Hi, >> This is a simple patch fixing ICE in tree-if-conv.c. Existing code does >> not setup a variable (cond) when predicate of basic block is true and it >> asserts on the

Re: [PATCH GCC]Remove support for -funsafe-loop-optimizations

2016-07-19 Thread Bin.Cheng
On Tue, Jul 19, 2016 at 9:00 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Mon, Jul 18, 2016 at 5:36 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Mon, Jul 18, 2016 at 4:28 PM, NightStrike <nightstr...@gmail.com> wrote: >>> On Mon, Jul 18,

Re: [PATCH GCC]Remove support for -funsafe-loop-optimizations

2016-07-18 Thread Bin.Cheng
On Mon, Jul 18, 2016 at 4:28 PM, NightStrike <nightstr...@gmail.com> wrote: > On Mon, Jul 18, 2016 at 3:55 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Sat, Jul 16, 2016 at 6:28 PM, NightStrike <nightstr...@gmail.com> wrote: >>> On Fri, Jul 15, 2016 at 1

Re: [PATCH GCC]Remove support for -funsafe-loop-optimizations

2016-07-18 Thread Bin.Cheng
On Fri, Jul 15, 2016 at 6:23 PM, Richard Biener wrote: > On July 15, 2016 7:16:42 PM GMT+02:00, Bernd Schmidt > wrote: >>On 07/15/2016 07:07 PM, Bin Cheng wrote: >> >>> Bootstrap and test on x86_64. Is it OK? >> >>If you do this you'll also need

Re: [PATCH GCC]Remove support for -funsafe-loop-optimizations

2016-07-18 Thread Bin.Cheng
On Sat, Jul 16, 2016 at 6:28 PM, NightStrike wrote: > On Fri, Jul 15, 2016 at 1:07 PM, Bin Cheng wrote: >> Hi, >> This patch removes support for -funsafe-loop-optimizations, as well as >> -Wunsafe-loop-optimizations. By its name, this option does

Re: [PATCH testsuite]XFAIL gcc.dg/tree-ssa/pr71347 on some targets

2016-07-15 Thread Bin.Cheng
On Thu, Jul 14, 2016 at 6:14 PM, Jeff Law wrote: > On 07/14/2016 10:11 AM, Bin Cheng wrote: >> >> Hi, Test gcc.dg/tree-ssa/pr71347 failed on some targets if the two >> memory references are re-written into different forms by IVOPT. This >> could be because of various reasons,

Re: [PATCH GCC]Improve loop-niter to handle possible infinite loop.

2016-07-15 Thread Bin.Cheng
On Thu, Jul 14, 2016 at 12:42 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Wed, Jul 13, 2016 at 6:09 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Fri, Jul 1, 2016 at 11:33 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH 2/3] Run profile feedback tests with autofdo

2016-07-15 Thread Bin.Cheng
On Thu, Jul 14, 2016 at 11:33 PM, Andi Kleen wrote: >> >> I haven't seen that. Unstable in what way? >> > For GCC doesn't support FDO, it run below tests as you said: >> > >> > PASS: gcc.dg/tree-prof/20041218-1.c compilation, -g >> > UNSUPPORTED:

Re: [PATCH PR71503/PR71683]Fix ICE in tree-if-conv.c

2016-07-15 Thread Bin.Cheng
On Thu, Jul 14, 2016 at 6:49 PM, Jeff Law wrote: > On 07/14/2016 10:12 AM, Bin Cheng wrote: >> >> Hi, >> This is a simple patch fixing ICE in tree-if-conv.c. Existing code does >> not setup a variable (cond) when predicate of basic block is true and it >> asserts on the

Re: [PATCH 2/3] Run profile feedback tests with autofdo

2016-07-14 Thread Bin.Cheng
On Thu, Jul 14, 2016 at 12:06 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Thu, Jul 14, 2016 at 11:55 AM, Andi Kleen <a...@firstfloor.org> wrote: >>> After this patch, I got below test results with command line: make >>> check-gcc RUNTESTFLAGS="tree-prof

Re: [PATCH 2/3] Run profile feedback tests with autofdo

2016-07-14 Thread Bin.Cheng
On Thu, Jul 14, 2016 at 11:55 AM, Andi Kleen wrote: >> After this patch, I got below test results with command line: make >> check-gcc RUNTESTFLAGS="tree-prof.exp" -k > > That is expected if you don't have autofdo. You would prefer to hide it? > >> Also I got unstable test

Re: [PATCH GCC]Resolve compilation time known alias checks in vectorizer

2016-07-14 Thread Bin.Cheng
On Thu, Jul 14, 2016 at 10:49 AM, Thomas Schwinge <tho...@codesourcery.com> wrote: > Hi! > > On Wed, 13 Jul 2016 16:09:21 +0100, "Bin.Cheng" <amker.ch...@gmail.com> wrote: >> Patch re-tested/applied on trunk as r238301. As I mentioned >> previously, gcc

Re: [PATCH GCC]Improve loop-niter to handle possible infinite loop.

2016-07-13 Thread Bin.Cheng
On Fri, Jul 1, 2016 at 11:33 AM, Richard Biener wrote: > On Tue, Jun 28, 2016 at 8:18 AM, Bin Cheng wrote: >> Hi, >> At the moment, loop niter analyzer depends on simple_iv to understand >> control induction variable in order to do further niter

Re: [PATCH GCC]Resolve compilation time known alias checks in vectorizer

2016-07-13 Thread Bin.Cheng
On Fri, Jul 1, 2016 at 1:06 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Tue, Jun 28, 2016 at 8:18 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Tue, Jun 14, 2016 at 1:57 PM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>> O

Re: [PATCH 2/3] Run profile feedback tests with autofdo

2016-07-12 Thread Bin.Cheng
On Thu, Jun 23, 2016 at 3:37 PM, Andi Kleen wrote: > From: ak > > Extend the existing bprob and tree-prof tests to also run with autofdo. > The test runtimes are really a bit too short for autofdo, but it's > a reasonable sanity

Re: [PATCH GCC]Resolve compilation time known alias checks in vectorizer

2016-06-28 Thread Bin.Cheng
On Tue, Jun 14, 2016 at 1:57 PM, Richard Biener wrote: > On Mon, Jun 13, 2016 at 12:01 PM, Bin Cheng wrote: >> Hi, >> GCC vectorizer generates many unnecessary runtime alias checks known at >> compilation time. For some data-reference pairs, alias

Re: [PATCH PR71347][Partial revert r235513]Compute cost for all uses in group

2016-06-20 Thread Bin.Cheng
On Mon, Jun 20, 2016 at 9:20 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Mon, Jun 20, 2016 at 9:18 AM, Christophe Lyon > <christophe.l...@linaro.org> wrote: >> On 18 June 2016 at 10:59, Andreas Schwab <sch...@linux-m68k.org> wrote: >>> Bin Cheng &l

Re: [PATCH PR71347][Partial revert r235513]Compute cost for all uses in group

2016-06-20 Thread Bin.Cheng
On Mon, Jun 20, 2016 at 9:18 AM, Christophe Lyon wrote: > On 18 June 2016 at 10:59, Andreas Schwab wrote: >> Bin Cheng writes: >> >>> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr71347.c >>>

Re: [PATCH, vec-tails 03/10] Support epilogues vectorization with no masking

2016-06-17 Thread Bin.Cheng
On Fri, Jun 17, 2016 at 4:37 PM, Jeff Law <l...@redhat.com> wrote: > On 06/17/2016 08:48 AM, Bin.Cheng wrote: >>>> >>>> >>>>> + /* FORNOW: Currently alias checks are not inherited for epilogues. >>>>> + Don't try to vectoriz

Re: [PATCH, vec-tails 03/10] Support epilogues vectorization with no masking

2016-06-17 Thread Bin.Cheng
On Fri, Jun 17, 2016 at 3:33 PM, Ilya Enkovich wrote: > 2016-06-16 9:00 GMT+03:00 Jeff Law : >> On 05/19/2016 01:39 PM, Ilya Enkovich wrote: >>> >>> Hi, >>> >>> This patch introduces changes required to run vectorizer on loop epilogue. >>> This also

Re: [PATCH PR68030/PR69710][RFC]Introduce a simple local CSE interface and use it in vectorizer

2016-06-06 Thread Bin.Cheng
On Fri, May 27, 2016 at 12:56 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Fri, May 27, 2016 at 1:11 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Fri, May 27, 2016 at 11:45 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH PR68030/PR69710][RFC]Introduce a simple local CSE interface and use it in vectorizer

2016-05-27 Thread Bin.Cheng
On Fri, May 27, 2016 at 11:45 AM, Richard Biener wrote: > On Wed, May 25, 2016 at 1:22 PM, Bin Cheng wrote: >> Hi, >> As analyzed in PR68303 and PR69710, vectorizer generates duplicated >> computations in loop's pre-header basic block when creating

Re: [PATCH 2/3] Add profiling support for IVOPTS

2016-05-24 Thread Bin.Cheng
On Thu, May 19, 2016 at 11:28 AM, Martin Liška <mli...@suse.cz> wrote: > On 05/17/2016 12:27 AM, Bin.Cheng wrote: >>> As profile-guided optimization can provide very useful information >>> about basic block frequencies within a loop, following patch set leverages >>

Re: [PATCH AArch64]Support missing vcond pattern by adding/using vec_cmp/vcond_mask patterns.

2016-05-24 Thread Bin.Cheng
Ping. Thanks, bin On Tue, May 17, 2016 at 10:02 AM, Bin Cheng wrote: > Hi, > Alan and Renlin noticed that some vcond patterns are not supported in > AArch64(or AArch32?) backend, and they both had some patches fixing this. > After investigation, I agree with them that

Re: [PATCH GCC]A latent alignment bug in tree-ssa-address.c

2016-05-23 Thread Bin.Cheng
On Mon, May 23, 2016 at 3:16 PM, Richard Biener wrote: > On Mon, May 23, 2016 at 3:23 PM, Bin Cheng wrote: >> Hi, >> When working on PR69710, I ran into this latent bug in which alignment >> information is wrongly updated for pointer variables. It

Re: [PATCH 2/3] Add profiling support for IVOPTS

2016-05-20 Thread Bin.Cheng
On Thu, May 19, 2016 at 11:28 AM, Martin Liška <mli...@suse.cz> wrote: > On 05/17/2016 12:27 AM, Bin.Cheng wrote: >>> As profile-guided optimization can provide very useful information >>> about basic block frequencies within a loop, following patch set leverages >>

Re: [PATCH 1/3] Encapsulate comp_cost within a class with methods.

2016-05-19 Thread Bin.Cheng
On Thu, May 19, 2016 at 11:23 AM, Martin Liška <mli...@suse.cz> wrote: > On 05/16/2016 03:55 PM, Martin Liška wrote: >> On 05/16/2016 12:13 PM, Bin.Cheng wrote: >>> Hi Martin, >>> Could you please rebase this patch and the profiling one against >>> latest

Re: [PATCH PR69848/partial]Propagate comparison into VEC_COND_EXPR if target supports

2016-05-18 Thread Bin.Cheng
On Tue, May 17, 2016 at 12:08 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Mon, May 16, 2016 at 10:09 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Fri, May 13, 2016 at 5:53 PM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH GCC]Enable vect_cond_mixed for AArch64.

2016-05-18 Thread Bin.Cheng
On Tue, May 17, 2016 at 9:33 PM, Jeff Law wrote: > On 05/17/2016 03:04 AM, Bin Cheng wrote: >> >> Hi, >> After supporting all vcond/vcondu patterns in AArch64 backend, now we can >> vectorize VEC_COND_EXPR with different type in comparison operands and value >> operands on

Re: [PATCH 2/3] Add profiling support for IVOPTS

2016-05-16 Thread Bin.Cheng
> As profile-guided optimization can provide very useful information > about basic block frequencies within a loop, following patch set leverages > that information. It speeds up a single benchmark from upcoming SPECv6 > suite by 20% (-O2 -profile-generate/-fprofile use) and I think it can > also

Re: [PATCH 1/3] Encapsulate comp_cost within a class with methods.

2016-05-16 Thread Bin.Cheng
On Mon, Apr 25, 2016 at 10:42 AM, marxin wrote: > gcc/ChangeLog: > > 2016-04-25 Martin Liska > > * tree-ssa-loop-ivopts.c(comp_cost::operator=): New function. > (comp_cost::infinite_cost_p): Likewise. > (operator+): Likewise. >

Re: [PATCH PR69848/partial]Propagate comparison into VEC_COND_EXPR if target supports

2016-05-16 Thread Bin.Cheng
On Fri, May 13, 2016 at 5:53 PM, Richard Biener wrote: > On May 13, 2016 6:02:27 PM GMT+02:00, Bin Cheng wrote: >>Hi, >>As PR69848 reported, GCC vectorizer now generates comparison outside of >>VEC_COND_EXPR for COND_REDUCTION case, as below: >> >>

Re: [PATCH 3/3] Enhance dumps of IVOPTS

2016-05-13 Thread Bin.Cheng
On Thu, May 12, 2016 at 5:41 PM, Martin Liška <mli...@suse.cz> wrote: > On 05/12/2016 03:51 PM, Bin.Cheng wrote: >> On Thu, May 12, 2016 at 1:13 PM, Martin Liška <mli...@suse.cz> wrote: >>> On 05/10/2016 03:16 PM, Bin.Cheng wrote: >>>> Another

Re: [PATCH 3/3] Enhance dumps of IVOPTS

2016-05-12 Thread Bin.Cheng
On Thu, May 12, 2016 at 1:13 PM, Martin Liška <mli...@suse.cz> wrote: > On 05/10/2016 03:16 PM, Bin.Cheng wrote: >> Another way is to remove the use of id for struct iv_inv_expr_ent once >> for all. We can change iv_ca.used_inv_expr and cost_pair.inv_expr_id >&

Re: [PATCH GCC]Do more tree if-conversions by handlding PHIs with more than two arguments.

2016-05-10 Thread Bin.Cheng
On Tue, May 10, 2016 at 3:00 PM, Christophe Lyon <christophe.l...@linaro.org> wrote: > On 3 May 2016 at 11:07, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Mon, May 2, 2016 at 10:02 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>> On Fri, Ap

Re: [PATCH 3/3] Enhance dumps of IVOPTS

2016-05-10 Thread Bin.Cheng
On Mon, May 9, 2016 at 10:46 AM, Richard Biener wrote: > On Fri, May 6, 2016 at 11:19 AM, Martin Liška wrote: >> Hi. >> >> Honza asked me to explain the change more verbosely. >> The patch simplify enhances verbose dump of IVOPTS so that >> # of

Re: [PATCH GCC]Proving no-trappness for array ref in tree if-conv using loop niter information.

2016-05-09 Thread Bin.Cheng
On Mon, May 9, 2016 at 11:54 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Fri, May 6, 2016 at 11:42 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Fri, May 6, 2016 at 10:40 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >>> On Tue, May

Re: [PATCH GCC]Proving no-trappness for array ref in tree if-conv using loop niter information.

2016-05-06 Thread Bin.Cheng
On Fri, May 6, 2016 at 10:40 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Tue, May 3, 2016 at 11:08 AM, Richard Biener > <richard.guent...@gmail.com> wrote: >> On Tue, May 3, 2016 at 12:01 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >>> On Mon,

Re: [PATCH GCC]Proving no-trappness for array ref in tree if-conv using loop niter information.

2016-05-06 Thread Bin.Cheng
On Tue, May 3, 2016 at 11:08 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Tue, May 3, 2016 at 12:01 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Mon, May 2, 2016 at 10:00 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH GCC]Proving no-trappness for array ref in tree if-conv using loop niter information.

2016-05-03 Thread Bin.Cheng
On Mon, May 2, 2016 at 10:00 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Fri, Apr 29, 2016 at 5:05 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Fri, Apr 29, 2016 at 12:16 PM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH 0/3] IVOPTS: support profiling

2016-05-03 Thread Bin.Cheng
On Fri, Apr 29, 2016 at 12:56 PM, marxin wrote: > Hello. > > As profile-guided optimization can provide very useful information > about basic block frequencies within a loop, following patch set leverages > that information. It speeds up a single benchmark from upcoming SPECv6 >

Re: [PATCH GCC]Do more tree if-conversions by handlding PHIs with more than two arguments.

2016-05-03 Thread Bin.Cheng
On Mon, May 2, 2016 at 10:02 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Fri, Apr 29, 2016 at 5:51 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Thu, Apr 28, 2016 at 10:18 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH GCC]Do more tree if-conversions by handlding PHIs with more than two arguments.

2016-04-29 Thread Bin.Cheng
On Fri, Apr 29, 2016 at 4:51 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Thu, Apr 28, 2016 at 10:18 AM, Richard Biener > <richard.guent...@gmail.com> wrote: >> On Wed, Apr 27, 2016 at 5:49 PM, Bin Cheng <bin.ch...@arm.com> wrote: >>> Hi, >>>

Re: [PATCH GCC]Do more tree if-conversions by handlding PHIs with more than two arguments.

2016-04-29 Thread Bin.Cheng
On Thu, Apr 28, 2016 at 10:18 AM, Richard Biener wrote: > On Wed, Apr 27, 2016 at 5:49 PM, Bin Cheng wrote: >> Hi, >> Currently tree if-conversion only supports PHIs with no more than two >> arguments unless the loop is marked with "simd pragma".

Re: [PATCH GCC]Proving no-trappness for array ref in tree if-conv using loop niter information.

2016-04-29 Thread Bin.Cheng
On Fri, Apr 29, 2016 at 12:16 PM, Richard Biener wrote: > On Thu, Apr 28, 2016 at 2:56 PM, Bin Cheng wrote: >> Hi, >> Tree if-conversion sometimes cannot convert conditional array reference into >> unconditional one. Root cause is GCC

Re: [PATCH GCC]Refactor IVOPT.

2016-04-27 Thread Bin.Cheng
On Fri, Apr 22, 2016 at 8:20 AM, Richard Biener wrote: > On Thu, Apr 21, 2016 at 7:26 PM, Bin Cheng wrote: >> Hi, >> This patch refactors IVOPT in three major aspects: >> Firstly it rewrites iv_use groups. Use group is originally introduced only

Re: [PATCH GCC]Improve tree ifconv by handling virtual PHIs which can be degenerated.

2016-04-25 Thread Bin.Cheng
On Fri, Apr 22, 2016 at 11:47 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Fri, Apr 22, 2016 at 12:33 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Fri, Apr 22, 2016 at 11:25 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>

Re: [PATCH GCC]Refactor IVOPT.

2016-04-25 Thread Bin.Cheng
On Mon, Apr 25, 2016 at 3:49 PM, Martin Liška wrote: > Hello. > > Please consider application of the following patch, it fixes > a coding style issue and a memory leak. Hi Martin, Will do, thanks very much for the help. Thanks, bin > > Thanks, > Martin

Re: [PATCH PR70715]Expand simple operations in IV.base and check if it's the control_IV

2016-04-22 Thread Bin.Cheng
On Fri, Apr 22, 2016 at 4:26 PM, Christophe Lyon wrote: > On 21 April 2016 at 11:03, Richard Biener wrote: >> On Wed, Apr 20, 2016 at 5:08 PM, Bin Cheng wrote: >>> Hi, >>> As reported in PR70715, GCC failed to prove

Re: [PATCH GCC]Improve tree ifconv by handling virtual PHIs which can be degenerated.

2016-04-22 Thread Bin.Cheng
On Fri, Apr 22, 2016 at 11:25 AM, Richard Biener wrote: > On Fri, Apr 22, 2016 at 12:07 PM, Bin Cheng wrote: >> Hi, >> Tree if-conv has below code checking on virtual PHI nodes in >> if_convertible__phi_p: >> >> if (any_mask_load_store) >>

Re: [PATCH] Fix ICE in predicate_mem_writes (PR tree-optimization/70725)

2016-04-21 Thread Bin.Cheng
On Thu, Apr 21, 2016 at 4:13 PM, Marek Polacek wrote: > On Wed, Apr 20, 2016 at 11:57:23AM -0700, H.J. Lu wrote: >> On Wed, Apr 20, 2016 at 4:19 AM, Marek Polacek wrote: >> It leads to ICE on 32-bit x86 host: >> >>

Re: [PATCH] Fix PR70725 (followup to Mareks patch)

2016-04-21 Thread Bin.Cheng
On Thu, Apr 21, 2016 at 3:12 PM, Richard Biener wrote: > On Thu, 21 Apr 2016, Jakub Jelinek wrote: > >> On Thu, Apr 21, 2016 at 02:20:34PM +0200, Richard Biener wrote: >> > >> > The following fixes the followup ICEs in the testcase for PR70725 >> > where Markes patch only fixed

Re: [PATCH PR69489/02]Handle PHI which can be degenerated to two arguments node in tree ifcvt.

2016-04-20 Thread Bin.Cheng
On Tue, Mar 22, 2016 at 10:41 AM, Richard Biener wrote: > On Mon, Mar 21, 2016 at 4:22 PM, Bin Cheng wrote: >> Hi, >> The second issue revealed by PR69489 is tree ifcvt could not convert PHI >> nodes with more than 2 arguments. Among these nodes,

Re: [PATCH GCC]Support BIT_AND_EXPR in scalar evolution

2016-04-20 Thread Bin.Cheng
On Wed, Apr 20, 2016 at 9:55 AM, Richard Biener wrote: > On Tue, Apr 19, 2016 at 7:00 PM, Bin Cheng wrote: >> Hi, >> Type conversion from integer to smaller unsigned type could be transformed >> into BIT_AND_EXPR in compilation. For example, >>

Re: Re-apply reverted niter change 1/4

2016-04-19 Thread Bin.Cheng
On Tue, Apr 19, 2016 at 12:09 PM, Jan Hubicka wrote: >> > Index: tree-ssa-loop-ivopts.c >> > === >> > --- tree-ssa-loop-ivopts.c (revision 235064) >> > +++ tree-ssa-loop-ivopts.c (working copy) >> > @@

Re: Re-apply reverted niter change 1/4

2016-04-19 Thread Bin.Cheng
On Mon, Apr 18, 2016 at 6:24 PM, Jan Hubicka wrote: > Hi, > as discussed on IRC today, I would like to re-apply the patch to fix bogus > realistic bounds in niter. As it turned out, we seem to rely on this bogus > estimate in few benchmarks and there is miscompilation with

Re: [PATCH PR69489/01]Improve tree ifcvt by storing/tracking DR against its innermost loop bahavior if possible

2016-04-04 Thread Bin.Cheng
On Mon, Apr 4, 2016 at 2:07 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Thu, Mar 31, 2016 at 6:43 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Tue, Mar 29, 2016 at 9:37 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH PR69489/01]Improve tree ifcvt by storing/tracking DR against its innermost loop bahavior if possible

2016-03-31 Thread Bin.Cheng
On Tue, Mar 29, 2016 at 9:37 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Mon, Mar 28, 2016 at 9:57 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> Sorry, Should have replied to gcc-patches list. >> >> Thanks, >> bin >> >>

Re: [PATCH GCC]Reduce compilation time for IVOPT by skipping cost computation in use group

2016-03-31 Thread Bin.Cheng
On Thu, Mar 31, 2016 at 1:27 PM, H.J. Lu <hjl.to...@gmail.com> wrote: > On Wed, Mar 30, 2016 at 5:11 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Wed, Mar 30, 2016 at 9:09 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>> On Thu,

Re: Do not give realistic estimates for loop with array accesses

2016-03-30 Thread Bin.Cheng
On Wed, Mar 30, 2016 at 3:22 PM, Jan Hubicka wrote: >> > - /* If access is not executed on every iteration, we must ensure that >> > overlow may >> > - not make the access valid later. */ >> > + /* If access is not executed on every iteration, we must ensure that >> >

Re: Do not give realistic estimates for loop with array accesses

2016-03-30 Thread Bin.Cheng
On Wed, Mar 30, 2016 at 11:00 AM, Jan Hubicka wrote: > Hi, > while looking into sudoku solving benchark, I noticed that we incorrectly > estimate loop to iterate 10 times just because the array it traverses is of > dimension 10. This of course is just upper bound and not realistic

Re: [PATCH GCC]Reduce compilation time for IVOPT by skipping cost computation in use group

2016-03-30 Thread Bin.Cheng
On Wed, Mar 30, 2016 at 9:09 AM, Richard Biener wrote: > On Thu, Mar 24, 2016 at 6:26 PM, Bin Cheng wrote: >> Hi, >> Quite lot of time is used when IVOPT computes cost for pairs. >> As a matter of fact, some pairs are very similar to

Fwd: [PATCH PR69489/01]Improve tree ifcvt by storing/tracking DR against its innermost loop bahavior if possible

2016-03-28 Thread Bin.Cheng
Sorry, Should have replied to gcc-patches list. Thanks, bin -- Forwarded message -- From: "Bin.Cheng" <amker.ch...@gmail.com> Date: Tue, 29 Mar 2016 03:55:04 +0800 Subject: Re: [PATCH PR69489/01]Improve tree ifcvt by storing/tracking DR against its innermo

Re: [PATCH PR69042/01]Add IV candidate for use with constant offset stripped in base.

2016-03-23 Thread Bin.Cheng
On Wed, Mar 23, 2016 at 2:18 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Wed, Mar 23, 2016 at 2:58 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Tue, Mar 22, 2016 at 11:01 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>> O

Re: [PATCH PR69042/01]Add IV candidate for use with constant offset stripped in base.

2016-03-23 Thread Bin.Cheng
On Tue, Mar 22, 2016 at 11:01 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Tue, Mar 22, 2016 at 11:22 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Wed, Mar 16, 2016 at 10:06 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH PR69042/01]Add IV candidate for use with constant offset stripped in base.

2016-03-22 Thread Bin.Cheng
On Wed, Mar 16, 2016 at 10:06 AM, Richard Biener wrote: > > On Wed, Mar 16, 2016 at 10:48 AM, Bin Cheng wrote: > > Hi, > > When I tried to decrease # of IV candidates, I removed code that adds IV > > candidates for use with constant offset stripped

Re: [PATCH PR69489/01]Improve tree ifcvt by storing/tracking DR against its innermost loop bahavior if possible

2016-03-19 Thread Bin.Cheng
On Wed, Mar 16, 2016 at 12:20 PM, Richard Biener wrote: > > On Wed, Mar 16, 2016 at 10:59 AM, Bin Cheng wrote: > > Hi, > > .. > > Bootstrap and test on x86_64 and AArch64. Is it OK, not sure if it's GCC 7? > > Hmm. Hi, Thanks for reviewing. > >

Re: [PATCH PR69052]Set higher precedence for CONST_WIDE_INT than CONST_INT when canonicalizing addr expr

2016-03-07 Thread Bin.Cheng
On Fri, Mar 4, 2016 at 6:06 PM, Richard Biener <richard.guent...@gmail.com> wrote: > > On March 4, 2016 5:35:13 PM GMT+01:00, "Bin.Cheng" <amker.ch...@gmail.com> > wrote: > >On Fri, Mar 4, 2016 at 11:57 AM, Richard Biener > ><richard.guent...@gmail.co

Re: [PATCH PR69052]Set higher precedence for CONST_WIDE_INT than CONST_INT when canonicalizing addr expr

2016-03-04 Thread Bin.Cheng
On Fri, Mar 4, 2016 at 11:57 AM, Richard Biener wrote: > On Fri, Mar 4, 2016 at 12:07 PM, Bin Cheng wrote: >> Hi, >> A address canonicalization interface was introduced by my original patch to >> PR69052. The interface sorts sub-parts in an

Re: [PATCH PR69052]Check if loop inv can be propagated into mem ref with additional addr expr canonicalization

2016-03-01 Thread Bin.Cheng
On Thu, Feb 25, 2016 at 8:47 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Thu, Feb 25, 2016 at 6:39 AM, Jeff Law <l...@redhat.com> wrote: >> On 02/22/2016 02:22 AM, Bin.Cheng wrote: >> >>>> My only question is why didn't you use FOR_EACH_SUBRTX_VRA fr

Re: [PATCH PR69052]Check if loop inv can be propagated into mem ref with additional addr expr canonicalization

2016-02-25 Thread Bin.Cheng
On Thu, Feb 25, 2016 at 6:39 AM, Jeff Law <l...@redhat.com> wrote: > On 02/22/2016 02:22 AM, Bin.Cheng wrote: > >>> My only question is why didn't you use FOR_EACH_SUBRTX_VRA from >>> rtl-iter.h >>> to walk the RTX expressions in collect_address_parts and

Re: [PATCH PR69052]Check if loop inv can be propagated into mem ref with additional addr expr canonicalization

2016-02-23 Thread Bin.Cheng
On Fri, Feb 19, 2016 at 10:24 PM, Jeff Law <l...@redhat.com> wrote: > On 02/16/2016 11:43 AM, Bin Cheng wrote: >> >> >> From: Jeff Law <l...@redhat.com> >> Sent: 11 February 2016 23:26 >> To: Bin.Cheng

Re: [PATCH PR69052]Check if loop inv can be propagated into mem ref with additional addr expr canonicalization

2016-02-22 Thread Bin.Cheng
On Fri, Feb 19, 2016 at 10:24 PM, Jeff Law <l...@redhat.com> wrote: > On 02/16/2016 11:43 AM, Bin Cheng wrote: >> >> >> From: Jeff Law <l...@redhat.com> >> Sent: 11 February 2016 23:26 >> To: Bin.Cheng

Re: [PATCH PR69052]Check if loop inv can be propagated into mem ref with additional addr expr canonicalization

2016-02-11 Thread Bin.Cheng
On Thu, Feb 11, 2016 at 7:14 AM, Jeff Law wrote: > On 02/09/2016 04:08 AM, Bin Cheng wrote: >> >> Hi, >> When counting cost for loop inv, GCC checks if a loop inv can be >> propagated into its use site (a memory reference). If it cannot be >> propagated, we increase its cost so

Re: [PATCH PR68021]Set ratio to 1 when computing the value of biv cand by itself

2016-02-10 Thread Bin.Cheng
On Wed, Feb 10, 2016 at 1:27 PM, Richard Biener wrote: > > On Wed, Feb 10, 2016 at 12:34 PM, Bin Cheng wrote: > > Hi, > > This is another way to fix PR68021, and I think it's the least intrusive > > way. The issue is triggered in a special case in

Re: [PATCH PR66796]Obvious, revise check condition in test case

2016-01-18 Thread Bin.Cheng
On Mon, Jan 18, 2016 at 9:28 AM, Bin Cheng wrote: > Hi, > Turns out the check on number of iv_uses is still too large on target hppa. > It only supports small offset in REG+offset addressing mode for floating > point load/store. Even with this restriction, the grouped

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-12-03 Thread Bin.Cheng
On Thu, Dec 3, 2015 at 6:26 PM, Richard Earnshaw <richard.earns...@foss.arm.com> wrote: > On 03/12/15 05:26, Bin.Cheng wrote: >> On Tue, Dec 1, 2015 at 6:25 PM, Richard Earnshaw >> <richard.earns...@foss.arm.com> wrote: >>> On 01/12/15 03:19, Bin.Cheng wrote:

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-12-02 Thread Bin.Cheng
On Tue, Dec 1, 2015 at 6:25 PM, Richard Earnshaw <richard.earns...@foss.arm.com> wrote: > On 01/12/15 03:19, Bin.Cheng wrote: >> On Tue, Nov 24, 2015 at 6:18 PM, Richard Earnshaw >> <richard.earns...@foss.arm.com> wrote: >>> On 24/11/15 09:56, Richard Ea

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-11-30 Thread Bin.Cheng
On Tue, Nov 24, 2015 at 6:18 PM, Richard Earnshaw <richard.earns...@foss.arm.com> wrote: > On 24/11/15 09:56, Richard Earnshaw wrote: >> On 24/11/15 02:51, Bin.Cheng wrote: >>>>> The aarch64's problem is we don't define addptr3 pattern, and we don't >>>&

Re: [PATCH] Fix vector rsqrt discovery (PR tree-optimization/68501)

2015-11-30 Thread Bin.Cheng
On Sat, Nov 28, 2015 at 3:40 AM, Jakub Jelinek wrote: > Hi! > > The recent changes where vector sqrt is represented in the IL using > IFN_SQRT instead of target specific builtins broke the discovery > of vector rsqrt, as targetm.builtin_reciprocal is called only > on builtin

Re: [PATCH PR68529]Fix not recognized scev by computing no-overflow info for loop with NE_EXPR exit condition

2015-11-27 Thread Bin.Cheng
On Fri, Nov 27, 2015 at 8:51 PM, Richard Biener wrote: > On Fri, Nov 27, 2015 at 12:44 PM, Bin Cheng wrote: >> Hi, >> This patch is to fix PR68529. In my previous scev/niter overflow patches, I >> only computed no-overflow information for control

Re: [PATCH 7/N] Fix newly introduced memory leak in tree-ssa-loop-ivopts.c

2015-11-27 Thread Bin.Cheng
On Fri, Nov 27, 2015 at 4:29 PM, Martin Liška <mli...@suse.cz> wrote: > On 11/27/2015 04:54 AM, Bin.Cheng wrote: >> On Fri, Nov 27, 2015 at 5:08 AM, Martin Liška <mli...@suse.cz> wrote: >>> Hi. >>> >>> There's one more patch that fixes reall

Re: [PATCH 7/N] Fix newly introduced memory leak in tree-ssa-loop-ivopts.c

2015-11-26 Thread Bin.Cheng
On Fri, Nov 27, 2015 at 5:08 AM, Martin Liška wrote: > Hi. > > There's one more patch that fixes really of lot memory leaks related to loop > ivopts. > The regression was introduced by r230647. > > Patch was tested in the series with the rest and the compiler bootstraps >

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-11-24 Thread Bin.Cheng
On Tue, Nov 24, 2015 at 5:56 PM, Richard Earnshaw <richard.earns...@foss.arm.com> wrote: > On 24/11/15 02:51, Bin.Cheng wrote: >>>> The aarch64's problem is we don't define addptr3 pattern, and we don't >>>> >> have direct insn pattern describing the

<    1   2   3   4   5   6   7   8   9   10   >