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 wrote: > 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 d

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 variable. Interesting thi

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: gcc.dg/tree-prof/20041218-1.c: Cannot run create_g

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 wrote: > On Wed, Jul 13, 2016 at 6:09 PM, Bin.Cheng wrote: >> 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

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, for example, auto-in

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 unsafe >> optimizations by assuming all loops m

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 to remove the use in config/bfin. > > OK with tha

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 wrote: > On Mon, Jul 18, 2016 at 3:55 AM, Bin.Cheng wrote: >> 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 suppor

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 wrote: > On Mon, Jul 18, 2016 at 5:36 PM, Bin.Cheng wrote: >> On Mon, Jul 18, 2016 at 4:28 PM, NightStrike wrote: >>> On Mon, Jul 18, 2016 at 3:55 AM, Bin.Cheng wrote: >>>> On Sat, Jul 16, 2016 at 6:28 PM, NightStrik

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 variable. Interesting thi

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 otherwise we would fail >> to recognize result of the

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 wrote: > On Tue, Jul 19, 2016 at 6:15 PM, Bin.Cheng wrote: >> 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

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 the moment, it com

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 >> alias to the new

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 always good to have >> a warning message indicati

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 analyzer, constraint flag >> is mainly set by cons

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 need to check if del

Re: [PATCH PR78507/PR78510]Fix two ICEs in pattern (cond (cmp (convert1? @1) @3) (convert2? @1) @2).

2016-11-25 Thread Bin.Cheng
On Fri, Nov 25, 2016 at 8:23 AM, Richard Biener wrote: > On Thu, Nov 24, 2016 at 4:22 PM, Bin Cheng wrote: >> Hi, >> This patch fixes two issues in newly introduced pattern: (cond (cmp >> (convert1? @1) @3) (convert2? @1) @2). >> For PR78507, we need to check if from_type is INTEGRAL_TYPE_P expl

Re: [PATCH] combine: Tweak change_zero_ext

2016-11-30 Thread Bin.Cheng
On Tue, Nov 29, 2016 at 9:14 PM, Christophe Lyon wrote: > On 29 November 2016 at 20:38, Uros Bizjak wrote: >>> 2016-11-26 Segher Boessenkool >>> >>> * combine.c (change_zero_ext): Also handle extends from a subreg >>> to a mode bigger than that of the operand of the subreg. >> >> This patch in

Re: [PATCH GCC]Simplify (cond (cmp (convert? x) c1) (op x c2) c3) -> (op (minmax x c1) c2)

2016-12-02 Thread Bin.Cheng
On Wed, Nov 30, 2016 at 3:10 PM, Richard Biener wrote: > On Fri, Nov 18, 2016 at 5:53 PM, Bin Cheng wrote: >> Hi, >> This is a rework of https://gcc.gnu.org/ml/gcc-patches/2016-10/msg02007.html. >> Though review comments suggested it could be merged with last kind >> simplification >> of fold_co

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 >> for address type uses, this patch makes it gen

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 conservatively assumes newly >> introduced array reference

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". This patch makes >> such PHIs supported uncondi

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 wrote: > 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 >>> a

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 wrote: > On Fri, Apr 29, 2016 at 5:51 PM, Bin.Cheng wrote: >> 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, >>>> Current

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 > suite by 20% (-O2

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 wrote: > On Fri, Apr 29, 2016 at 5:05 PM, Bin.Cheng wrote: >> 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

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 wrote: > On Tue, May 3, 2016 at 12:01 PM, Bin.Cheng wrote: >> On Mon, May 2, 2016 at 10:00 AM, Richard Biener >> wrote: >>> On Fri, Apr 29, 2016 at 5:05 PM, Bin.Cheng wrote: >>>> On Fri, Apr 29, 2016 at

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 wrote: > On Tue, May 3, 2016 at 11:08 AM, Richard Biener > wrote: >> On Tue, May 3, 2016 at 12:01 PM, Bin.Cheng wrote: >>> On Mon, May 2, 2016 at 10:00 AM, Richard Biener >>> wrote: >>>> On Fri, Apr 29, 2016

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 wrote: > On Fri, May 6, 2016 at 11:42 AM, Bin.Cheng wrote: >> On Fri, May 6, 2016 at 10:40 AM, Bin.Cheng wrote: >>> On Tue, May 3, 2016 at 11:08 AM, Richard Biener >>> wrote: >>>> On Tue, May 3, 2016 at 1

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 iterations is printed. Apart from that it also prin

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 wrote: > On 3 May 2016 at 11:07, Bin.Cheng wrote: >> On Mon, May 2, 2016 at 10:02 AM, Richard Biener >> wrote: >>> On Fri, Apr 29, 2016 at 5:51 PM, Bin.Cheng wrote: >>>> On Thu, Apr 28, 2016 at 10:18 AM, Rich

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 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 >> to pointers, and rename iv_inv

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 wrote: > On 05/12/2016 03:51 PM, Bin.Cheng wrote: >> On Thu, May 12, 2016 at 1:13 PM, Martin Liška 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_

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: >> >> _20 = vect__1.6_8 != { 0, 0, 0, 0 }; >> vect_c

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. > (comp_cost::operator+=): Likewise.

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 i

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 AArch64. GCC uses vect_

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 wrote: > On Mon, May 16, 2016 at 10:09 AM, Bin.Cheng wrote: >> 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, >>>>A

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 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 trunk? The third pa

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 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 >>> that info

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 results in memory >> exceptions on x86_64 afte

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 vcond/vcondu in AArch64'

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 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 >>> that info

Re: [PATCH GCC]Improve bound information in loop niter analysis

2015-08-13 Thread Bin.Cheng
Ping. Thanks, bin On Tue, Jul 28, 2015 at 5:36 PM, Bin Cheng wrote: > Hi, > Loop niter computes inaccurate bound information for different loops. This > patch is to improve it by using loop initial condition in > determine_value_range. Generally, loop niter is computed by subtracting > start v

Re: [PATCH GCC]Improve loop bound info by simplifying conversions in iv base

2015-08-13 Thread Bin.Cheng
Ping. Thanks, bin On Tue, Jul 28, 2015 at 5:38 PM, Bin Cheng wrote: > Hi, > For now, SCEV may compute iv base in the form of "(signed T)((unsigned > T)base + step))". This complicates other optimizations/analysis depending > on SCEV because it's hard to dive into type conversions. For many cas

Re: [PATCH GCC]Improve bound information in loop niter analysis

2015-08-13 Thread Bin.Cheng
On Fri, Aug 14, 2015 at 6:08 AM, Jeff Law wrote: > On 07/28/2015 03:36 AM, Bin Cheng wrote: >> >> Hi, >> Loop niter computes inaccurate bound information for different loops. >> This >> patch is to improve it by using loop initial condition in >> determine_value_range. Generally, loop niter is co

Re: [PATCH GCC]Improve loop bound info by simplifying conversions in iv base

2015-08-13 Thread Bin.Cheng
On Fri, Aug 14, 2015 at 6:10 AM, Jeff Law wrote: > On 07/28/2015 03:38 AM, Bin Cheng wrote: >> >> Hi, >> For now, SCEV may compute iv base in the form of "(signed T)((unsigned >> T)base + step))". This complicates other optimizations/analysis depending >> on SCEV because it's hard to dive into ty

Re: [PATCH GCC]Improve bound information in loop niter analysis

2015-08-17 Thread Bin.Cheng
Thanks for all your reviews. On Fri, Aug 14, 2015 at 4:17 PM, Richard Biener wrote: > On Tue, Jul 28, 2015 at 11:36 AM, Bin Cheng wrote: >> Hi, >> Loop niter computes inaccurate bound information for different loops. This >> patch is to improve it by using loop initial condition in >> determine

Re: [PATCH GCC]Improve bound information in loop niter analysis

2015-08-18 Thread Bin.Cheng
de is collecting some comparison basic block of loop? Thanks, bin > > Thanks & Regards > Ajit > > > -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches-ow...@gcc.gnu.org] On > Behalf Of Bin.Cheng > Sent: Monday, August 17, 2015 3:32 PM > To: Richa

Re: [PATCH GCC]Improve bound information in loop niter analysis

2015-08-18 Thread Bin.Cheng
On Tue, Aug 18, 2015 at 4:02 PM, Ajit Kumar Agarwal wrote: > > > -Original Message- > From: Bin.Cheng [mailto:amker.ch...@gmail.com] > Sent: Tuesday, August 18, 2015 1:08 PM > To: Ajit Kumar Agarwal > Cc: Richard Biener; Bin Cheng; GCC Patches; Vinod Kathail;

Re: [PATCH GCC]Improve bound information in loop niter analysis

2015-08-18 Thread Bin.Cheng
On Wed, Aug 19, 2015 at 2:14 AM, Jeff Law wrote: > On 08/17/2015 04:01 AM, Bin.Cheng wrote: >>> >>> >>> + c0 = fold_convert (type, c0); >>> + c1 = fold_convert (type, c1); >>> + >>> + if (operand_equal_p (var, c0, 0)) &g

Re: [PATCH] ivopts costs debug

2015-08-18 Thread Bin.Cheng
On Wed, Aug 19, 2015 at 5:19 AM, Segher Boessenkool wrote: > Hi, > > I've used this patch in the past for another port, and now again for > rs6000, and I think it is generally useful. It prints very verbose > information to the dump file about how ivopts comes up with its costs > for various form

Re: [PATCH GCC]Improve loop bound info by simplifying conversions in iv base

2015-08-20 Thread Bin.Cheng
On Fri, Aug 14, 2015 at 4:28 PM, Richard Biener wrote: > On Tue, Jul 28, 2015 at 11:38 AM, Bin Cheng wrote: >> Hi, >> For now, SCEV may compute iv base in the form of "(signed T)((unsigned >> T)base + step))". This complicates other optimizations/analysis depending >> on SCEV because it's hard t

Re: [PATCH 3/5] Build ARRAY_REFs when the base is of ARRAY_TYPE.

2015-08-25 Thread Bin.Cheng
On Wed, Aug 26, 2015 at 3:50 AM, Jeff Law wrote: > On 08/25/2015 05:06 AM, Alan Lawrence wrote: >> >> When SRA completely scalarizes an array, this patch changes the >> generated accesses from e.g. >> >> MEM[(int[8] *)&a + 4B] = 1; >> >> to >> >> a[1] = 1; >> >> This overcomes a limitation in dom2

Re: [PATCH 3/5] Build ARRAY_REFs when the base is of ARRAY_TYPE.

2015-08-26 Thread Bin.Cheng
On Wed, Aug 26, 2015 at 3:29 PM, Richard Biener wrote: > On Wed, 26 Aug 2015, Bin.Cheng wrote: > >> On Wed, Aug 26, 2015 at 3:50 AM, Jeff Law wrote: >> > On 08/25/2015 05:06 AM, Alan Lawrence wrote: >> >> >> >> When SRA completely scalarizes an

Re: [PATCH GCC][rework]Improve loop bound info by simplifying conversions in iv base

2015-08-27 Thread Bin.Cheng
On Thu, Aug 27, 2015 at 6:54 PM, Ajit Kumar Agarwal wrote: > > > -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches-ow...@gcc.gnu.org] On > Behalf Of Bin Cheng > Sent: Thursday, August 27, 2015 3:12 PM > To: gcc-patches@gcc.gnu.org > Subject: [PATCH GCC][rework]I

Re: [PATCH PR66388]Add sizetype cand for BIV of smaller type if it's used as index of memory ref

2015-09-08 Thread Bin.Cheng
On Wed, Sep 2, 2015 at 10:12 PM, Richard Biener wrote: > On Wed, Sep 2, 2015 at 5:26 AM, Bin Cheng wrote: >> Hi, >> This patch is a new approach to fix PR66388. IVO today computes iv_use with >> iv_cand which has at least same type precision as the use. On 64bit >> platforms like AArch64, this

Re: [PATCH PR66388]Add sizetype cand for BIV of smaller type if it's used as index of memory ref

2015-09-08 Thread Bin.Cheng
On Tue, Sep 8, 2015 at 6:06 PM, Bin.Cheng wrote: > On Wed, Sep 2, 2015 at 10:12 PM, Richard Biener > wrote: >> On Wed, Sep 2, 2015 at 5:26 AM, Bin Cheng wrote: >>> Hi, >>> This patch is a new approach to fix PR66388. IVO today computes iv_use with >>&g

Re: [PATCH GCC]Look into unnecessary conversion when checking mult_op in get_shiftadd_cost

2015-09-14 Thread Bin.Cheng
On Wed, Sep 2, 2015 at 8:32 PM, Richard Biener wrote: > On Wed, Sep 2, 2015 at 5:50 AM, Bin Cheng wrote: >> Hi, >> When calling get_shiftadd_cost, the mult_op is stripped at caller places. >> We should look into unnecessary conversion in op1 before checking equality, >> otherwise it computes wron

Re: [PATCH PR66388]Add sizetype cand for BIV of smaller type if it's used as index of memory ref

2015-09-14 Thread Bin.Cheng
Just realized that I missed the updated patch before. Here it is... Thanks, bin On Tue, Sep 8, 2015 at 6:07 PM, Bin.Cheng wrote: > On Tue, Sep 8, 2015 at 6:06 PM, Bin.Cheng wrote: >> On Wed, Sep 2, 2015 at 10:12 PM, Richard Biener >> wrote: >>> On Wed, Sep 2, 20

Re: [PATCH GCC][rework]Improve loop bound info by simplifying conversions in iv base

2015-09-14 Thread Bin.Cheng
Ping. On Thu, Aug 27, 2015 at 5:41 PM, Bin Cheng wrote: > Hi, > This is a rework for > https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02335.html, with review > comments addressed. For now, SCEV may compute iv base in the form of > "(signed T)((unsigned T)base + step))". This complicates other >

Re: [PATCH] Fix PR78189

2016-11-09 Thread Bin.Cheng
On Tue, Nov 8, 2016 at 9:11 AM, Richard Biener wrote: > On Mon, 7 Nov 2016, Christophe Lyon wrote: > >> Hi Richard, >> >> >> On 7 November 2016 at 09:01, Richard Biener wrote: >> > >> > The following fixes an oversight when computing alignment in the >> > vectorizer. >> > >> > Bootstrapped and te

Re: RFA (libstdc++): C++ PATCH to implement C++17 noexcept in type system

2016-11-09 Thread Bin.Cheng
On Tue, Nov 8, 2016 at 9:11 AM, Christophe Lyon wrote: > Hi, > > On 7 November 2016 at 23:56, Jonathan Wakely wrote: >> On 7 November 2016 at 22:49, Jason Merrill wrote: >>> Tested x86_64-pc-linux-gnu. Are the libstdc++ changes OK for trunk? >> >> Yes, I like the approach, thanks. > > The new te

Re: [PATCH, vec-tails] Support loop epilogue vectorization

2016-11-09 Thread Bin.Cheng
On Tue, Nov 1, 2016 at 12:38 PM, Yuri Rumyantsev wrote: > Hi All, > > I re-send all patches sent by Ilya earlier for review which support > vectorization of loop epilogues and loops with low trip count. We > assume that the only patch - vec-tails-07-combine-tail.patch - was not > approved by Jeff.

Re: [PATCH, vec-tails] Support loop epilogue vectorization

2016-11-09 Thread Bin.Cheng
rking on this project. > > Any help will be appreciated. > > Thanks. > Yuri. > > 2016-11-09 13:37 GMT+03:00 Bin.Cheng : >> On Tue, Nov 1, 2016 at 12:38 PM, Yuri Rumyantsev wrote: >>> Hi All, >>> >>> I re-send all patches sent by Ilya earlier for review wh

Re: [PATCH, vec-tails] Support loop epilogue vectorization

2016-11-09 Thread Bin.Cheng
lso it's not related to SVE, As a matter of fact, I haven't read any document about SVE yet. Sorry again for the false impression conveyed by previous messages. Thanks, bin > > Thanks. > Yuri. > > 2016-11-09 14:46 GMT+03:00 Bin.Cheng : >> On Wed, Nov 9, 2016 at

Re: [PATCH, RFC] Improve ivopts group costs

2016-11-09 Thread Bin.Cheng
On Thu, Nov 3, 2016 at 4:00 PM, Bin.Cheng wrote: > On Thu, Nov 3, 2016 at 1:35 PM, Evgeny Kudryashov > wrote: >> Hello, >> >> I'm facing the following problem related to ivopts. The problem is that GCC >> generates a lot of induction variables and as a result

Re: [PATCH TEST]Drop xfail for gcc.dg/vect/vect-cond-2.c

2016-11-10 Thread Bin.Cheng
On Wed, Nov 9, 2016 at 9:46 PM, Christophe Lyon wrote: > Hi Bin > > On 8 November 2016 at 13:37, Bin Cheng wrote: >> Hi, >> Test gcc.dg/vect/vect-cond-2.c can be vectorized by GCC now, this patch >> drops the xfail. >> >> Thanks, >> bin >> >> gcc/testsuite/ChangeLog >> 2016-11-04 Bin Cheng >>

Re: [PATCH, RFC] Improve ivopts group costs

2016-11-10 Thread Bin.Cheng
On Wed, Nov 9, 2016 at 1:02 PM, Bin.Cheng wrote: > On Thu, Nov 3, 2016 at 4:00 PM, Bin.Cheng wrote: >> On Thu, Nov 3, 2016 at 1:35 PM, Evgeny Kudryashov >> wrote: >>> Hello, >>> >>> I'm facing the following problem related to ivopts. The probl

Re: [RFC] Handle unary pass-through jump functions for ipa-vrp

2016-11-11 Thread Bin.Cheng
On Tue, Nov 8, 2016 at 10:13 AM, kugan wrote: > Hi, > > > > On 04/11/16 04:36, Martin Jambor wrote: >> >> Hi, >> >> On Fri, Oct 28, 2016 at 02:03:47PM +1100, kugan wrote: >>> >>> >>> ...snip... >>> >>> I have also separated the constant parameter conversion out and posted as >>> https://gcc.gnu.or

Re: [PATCH, RFC] Improve ivopts group costs

2016-11-14 Thread Bin.Cheng
On Sat, Nov 12, 2016 at 8:36 AM, Evgeny Kudryashov wrote: > On 2016-11-10 13:30, Bin.Cheng wrote: >> >> Hi, >> I see the cost problem with your test now. When computing an address >> type iv_use with a candidate, the computation consists of two parts, >> for

Re: [PATCH PR78114]Refine gfortran.dg/vect/fast-math-mgrid-resid.f

2016-11-17 Thread Bin.Cheng
On Thu, Nov 17, 2016 at 8:32 AM, Richard Biener wrote: > On Wed, Nov 16, 2016 at 6:20 PM, Bin Cheng wrote: >> Hi, >> Currently test gfortran.dg/vect/fast-math-mgrid-resid.f checks all >> predictive commoning opportunities for all possible loops. This makes it >> fragile because vectorizer may

Re: [PATCH PR78114]Refine gfortran.dg/vect/fast-math-mgrid-resid.f

2016-11-17 Thread Bin.Cheng
On Thu, Nov 17, 2016 at 10:53 AM, Richard Biener wrote: > On Thu, Nov 17, 2016 at 11:26 AM, Bin.Cheng wrote: >> On Thu, Nov 17, 2016 at 8:32 AM, Richard Biener >> wrote: >>> On Wed, Nov 16, 2016 at 6:20 PM, Bin Cheng wrote: >>>> Hi, >>>> Current

Re: Fix PR77881: combine improvement

2016-11-18 Thread Bin.Cheng
On Wed, Nov 16, 2016 at 3:05 PM, Andreas Schwab wrote: > On Nov 14 2016, Michael Matz wrote: > >> PR missed-optimization/77881 >> * combine.c (simplify_comparison): Remove useless subregs >> also inside the loop, not just after it. >> (make_compound_operation): Recognize s

Re: [PATCH PR78114]Refine gfortran.dg/vect/fast-math-mgrid-resid.f

2016-11-18 Thread Bin.Cheng
On Fri, Nov 18, 2016 at 4:52 PM, Michael Matz wrote: > Hi, > > On Thu, 17 Nov 2016, Bin.Cheng wrote: > >> B) Depending on ilp, I think below test strings fail for long time with >> haswell: >> ! { dg-final { scan-tree-dump-times "Executing predictive comm

Re: [PATCH, ARM] Enable ldrd/strd peephole rules unconditionally

2016-11-21 Thread Bin.Cheng
On Fri, Nov 18, 2016 at 3:50 PM, Bernd Edlinger wrote: > On 11/18/16 12:58, Christophe Lyon wrote: >> On 17 November 2016 at 10:23, Kyrill Tkachov >> wrote: >>> >>> On 09/11/16 12:58, Bernd Edlinger wrote: Hi! This patch enables the ldrd/strd peephole rules unconditionall

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

2016-11-22 Thread Bin.Cheng
On Mon, Nov 21, 2016 at 9:34 PM, Doug Gilmore wrote: > I haven't seen any followups to this discussion of Bin's patch to > PR68303 and PR69710, the patch submission: > http://gcc.gnu.org/ml/gcc-patches/2016-05/msg02000.html > > Discussion: > http://gcc.gnu.org/ml/gcc-patches/2016-07/msg00761.html

Re: [PATCH GCC]Move simplification from fold-cond.c to match.pd and extend it

2016-11-23 Thread Bin.Cheng
On Wed, Nov 23, 2016 at 10:29 AM, Richard Biener wrote: > On Fri, Nov 18, 2016 at 11:20 AM, Bin Cheng wrote: >> Hi, >> This is a rework of >> https://gcc.gnu.org/ml/gcc-patches/2016-10/msg02005.html. According to >> review comment, I extended the original patch and made it covering last kind

Re: [PATCH GCC]Move simplification from fold-cond.c to match.pd and extend it

2016-11-23 Thread Bin.Cheng
On Wed, Nov 23, 2016 at 10:51 AM, Richard Biener wrote: > On Wed, Nov 23, 2016 at 11:40 AM, Bin.Cheng wrote: >> On Wed, Nov 23, 2016 at 10:29 AM, Richard Biener >> wrote: >>> On Fri, Nov 18, 2016 at 11:20 AM, Bin Cheng wrote: >>>> Hi, >>>> This

Re: [PATCH GCC]Move simplification of (A == C1) ? A : C2 to match.pd

2016-11-23 Thread Bin.Cheng
On Wed, Nov 23, 2016 at 2:40 PM, Marc Glisse wrote: > On Fri, 18 Nov 2016, Bin Cheng wrote: > > +(for cmp (lt le gt ge) > + (simplify > + (cond (cmp@0 (convert1? @1) INTEGER_CST@3) (convert2? @1) INTEGER_CST@2) > + (with > + { > + tree from_type = TREE_TYPE (@1); > + tree c1_type = TRE

Re: [PATCH GCC]Refine type conversion in result expressions for cond_expr pattern

2016-11-23 Thread Bin.Cheng
On Wed, Nov 23, 2016 at 2:27 PM, Richard Biener wrote: > On Wed, Nov 23, 2016 at 2:54 PM, Bin Cheng wrote: >> Hi, >> This is actually the review suggestion for patch >> @https://gcc.gnu.org/ml/gcc-patches/2016-11/msg02341.html, but I forgot to >> incorporate it when committing that patch. Here

Re: [PATCH GCC]Refine type conversion in result expressions for cond_expr pattern

2016-11-24 Thread Bin.Cheng
On Thu, Nov 24, 2016 at 8:57 AM, Richard Biener wrote: > On Wed, Nov 23, 2016 at 3:57 PM, Bin.Cheng wrote: >> On Wed, Nov 23, 2016 at 2:27 PM, Richard Biener >> wrote: >>> On Wed, Nov 23, 2016 at 2:54 PM, Bin Cheng wrote: >>>> Hi, >>>>

Re: [PATCH GCC]Refine type conversion in result expressions for cond_expr pattern

2016-11-24 Thread Bin.Cheng
Here is the patch. Thanks, bin On Thu, Nov 24, 2016 at 10:11 AM, Bin.Cheng wrote: > On Thu, Nov 24, 2016 at 8:57 AM, Richard Biener > wrote: >> On Wed, Nov 23, 2016 at 3:57 PM, Bin.Cheng wrote: >>> On Wed, Nov 23, 2016 at 2:27 PM, Richard Biener >>> wrote: >

Re: [PATCH GCC]Refine type conversion in result expressions for cond_expr pattern

2016-11-24 Thread Bin.Cheng
On Thu, Nov 24, 2016 at 11:17 AM, Richard Biener wrote: > On Thu, Nov 24, 2016 at 11:11 AM, Bin.Cheng wrote: >> On Thu, Nov 24, 2016 at 8:57 AM, Richard Biener >> wrote: >>> On Wed, Nov 23, 2016 at 3:57 PM, Bin.Cheng wrote: >>>> On Wed, Nov 23, 2016 at

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 version is better > than

Re: [PATCH AARCH64]load store pair optimization using sched_fusion pass.

2014-12-07 Thread Bin.Cheng
On Sun, Dec 7, 2014 at 6:24 PM, Andrew Pinski wrote: > On Sat, Dec 6, 2014 at 6:35 PM, Andrew Pinski wrote: >> On Sat, Dec 6, 2014 at 5:54 PM, Andrew Pinski wrote: >>> On Fri, Dec 5, 2014 at 9:08 AM, Marcus Shawcroft >>> wrote: On 18 November 2014 at 08:34, Bin Cheng wrote: > 201

Re: [PATCH AARCH64]load store pair optimization using sched_fusion pass.

2014-12-07 Thread Bin.Cheng
On Mon, Dec 8, 2014 at 11:16 AM, Andrew Pinski wrote: > On Sun, Dec 7, 2014 at 5:47 PM, Bin.Cheng wrote: >> On Sun, Dec 7, 2014 at 6:24 PM, Andrew Pinski wrote: >>> On Sat, Dec 6, 2014 at 6:35 PM, Andrew Pinski wrote: >>>> On Sat, Dec 6, 2014 at 5:54 PM, Andrew Pi

Re: [PATCH AARCH64]load store pair optimization using sched_fusion pass.

2014-12-07 Thread Bin.Cheng
On Mon, Dec 8, 2014 at 11:26 AM, Bin.Cheng wrote: > On Mon, Dec 8, 2014 at 11:16 AM, Andrew Pinski wrote: >> On Sun, Dec 7, 2014 at 5:47 PM, Bin.Cheng wrote: >>> On Sun, Dec 7, 2014 at 6:24 PM, Andrew Pinski wrote: >>>> On Sat, Dec 6, 2014 at 6:35 PM, Andrew Pins

Re: [PATCH AARCH64]load store pair optimization using sched_fusion pass.

2014-12-07 Thread Bin.Cheng
On Mon, Dec 8, 2014 at 11:38 AM, Andrew Pinski wrote: > On Sun, Dec 7, 2014 at 7:35 PM, Bin.Cheng wrote: >> On Mon, Dec 8, 2014 at 11:26 AM, Bin.Cheng wrote: >>> On Mon, Dec 8, 2014 at 11:16 AM, Andrew Pinski wrote: >>>> On Sun, Dec 7, 2014 at 5:47 PM, Bin.Che

Re: [PATCH/AARCH64] Disable load/store pair peephole for volatile mem

2014-12-09 Thread Bin.Cheng
On Wed, Dec 10, 2014 at 10:18 AM, Andrew Pinski wrote: > Hi, > As mentioned in > https://gcc.gnu.org/ml/gcc-patches/2014-12/msg00609.html, the > load/store pair peepholes currently accept volatile mem which can > cause wrong code as the architecture does not define which part of the > pair happe

Re: [PATCH PR62178]Improve candidate selecting in IVOPT, 2nd try.

2014-12-09 Thread Bin.Cheng
On Wed, Dec 10, 2014 at 6:58 AM, Jeff Law wrote: > On 12/05/14 05:15, Bin Cheng wrote: >> >> Hi, >> Though PR62178 is hidden by recent cost change in aarch64 backend, the >> ivopt >> issue still exists. >> >> Current candidate selecting algorithm tends to select fewer candidates >> given >> below

Re: [PATCH PR62178]Improve candidate selecting in IVOPT, 2nd try.

2014-12-11 Thread Bin.Cheng
On Wed, Dec 10, 2014 at 9:47 PM, Richard Biener wrote: > On Fri, Dec 5, 2014 at 1:15 PM, Bin Cheng wrote: >> Hi, >> Though PR62178 is hidden by recent cost change in aarch64 backend, the ivopt >> issue still exists. >> >> Current candidate selecting algorithm tends to select fewer candidates give

Re: [PATCH PR62178]Improve candidate selecting in IVOPT, 2nd try.

2014-12-11 Thread Bin.Cheng
On Thu, Dec 11, 2014 at 5:56 PM, Bin.Cheng wrote: > On Wed, Dec 10, 2014 at 9:47 PM, Richard Biener > wrote: >> On Fri, Dec 5, 2014 at 1:15 PM, Bin Cheng wrote: >>> Hi, >>> Though PR62178 is hidden by recent cost change in aarch64 backend, the ivopt >>&

Re: [PATCH PR62178]Improve candidate selecting in IVOPT, 2nd try.

2014-12-16 Thread Bin.Cheng
On Thu, Dec 11, 2014 at 8:08 PM, Richard Biener wrote: > On Thu, Dec 11, 2014 at 10:56 AM, Bin.Cheng wrote: >> On Wed, Dec 10, 2014 at 9:47 PM, Richard Biener >> wrote: >>> On Fri, Dec 5, 2014 at 1:15 PM, Bin Cheng wrote: >>>> Hi, >>>> Though PR

Fwd: [PATCH PR62178]Improve candidate selecting in IVOPT, 2nd try.

2014-12-16 Thread Bin.Cheng
CCing Sebastian. Thanks, bin -- Forwarded message -- From: Bin.Cheng Date: Tue, Dec 16, 2014 at 4:42 PM Subject: Re: [PATCH PR62178]Improve candidate selecting in IVOPT, 2nd try. To: Richard Biener Cc: Bin Cheng , GCC Patches , Zdenek Dvorak On Thu, Dec 11, 2014 at 8:08 PM

Re: [PATCH ARM]Prefer neon for stringops on a53/a57 in AArch32 mode

2014-12-16 Thread Bin.Cheng
On Thu, Nov 13, 2014 at 1:54 PM, Bin Cheng wrote: > Hi, > As commented at https://gcc.gnu.org/ml/gcc-patches/2014-09/msg00684.html, > this is a simple patch enabling neon memset inlining on > cortex-a53/cortex-a57 in AArch32 mode. > > Test on > arm-none-linux-gnueabihf/--with-cpu=cortex-a57/--with

Re: [PATCH PR62178]Improve candidate selecting in IVOPT, 2nd try.

2014-12-16 Thread Bin.Cheng
Please ignore this one, I will further refine it. Sorry for disturbing! Thanks, bin On Tue, Dec 16, 2014 at 4:42 PM, Bin.Cheng wrote: > On Thu, Dec 11, 2014 at 8:08 PM, Richard Biener > wrote: >> On Thu, Dec 11, 2014 at 10:56 AM, Bin.Cheng wrote: >>> On Wed, Dec 10, 201

Re: [PATCH PR62178]Improve candidate selecting in IVOPT, 2nd try.

2014-12-17 Thread Bin.Cheng
On Tue, Dec 16, 2014 at 4:42 PM, Bin.Cheng wrote: > On Thu, Dec 11, 2014 at 8:08 PM, Richard Biener > wrote: >> On Thu, Dec 11, 2014 at 10:56 AM, Bin.Cheng wrote: >>> On Wed, Dec 10, 2014 at 9:47 PM, Richard Biener >>> wrote: >>>> On Fri, Dec 5, 2

Re: [PATCH] PR 62173, re-shuffle insns for RTL loop invariant hoisting

2014-12-18 Thread Bin.Cheng
On Fri, Dec 19, 2014 at 6:09 AM, Segher Boessenkool wrote: > On Thu, Dec 18, 2014 at 05:00:01PM +, Jiong Wang wrote: >> On 17/12/14 15:54, Richard Biener wrote: >> >ick. I realize we don't have SSA form on RTL but doesn't DF provide >> >at least some help in looking up definition statements f

<    3   4   5   6   7   8   9   10   >