Re: [PATCH GCC][3/4]Generalize dead store elimination (or store motion) across loop iterations in predcom

2017-07-03 Thread Bin.Cheng
On Mon, Jul 3, 2017 at 10:38 AM, Richard Biener wrote: > On Tue, Jun 27, 2017 at 12:49 PM, Bin Cheng wrote: >> Hi, >> For the moment, tree-predcom.c only supports >> invariant/load-loads/store-loads chains. >> This patch generalizes dead store

Re: [PATCH GCC][13/13]Distribute loop with loop versioning under runtime alias check

2017-06-30 Thread Bin.Cheng
On Wed, Jun 28, 2017 at 2:09 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Wed, Jun 28, 2017 at 1:29 PM, Richard Biener > <richard.guent...@gmail.com> wrote: >> On Wed, Jun 28, 2017 at 1:46 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >>> On Wed, J

Re: [PATCH GCC][01/13]Introduce internal function IFN_LOOP_DIST_ALIAS

2017-06-30 Thread Bin.Cheng
On Wed, Jun 28, 2017 at 8:29 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Tue, Jun 27, 2017 at 6:46 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Tue, Jun 27, 2017 at 3:59 PM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>

Re: Tweak BB analysis for dr_analyze_innermost

2017-06-28 Thread Bin.Cheng
On Wed, Jun 28, 2017 at 8:06 PM, Richard Sandiford <richard.sandif...@linaro.org> wrote: > "Bin.Cheng" <amker.ch...@gmail.com> writes: >> On Wed, Jun 28, 2017 at 5:56 PM, Richard Sandiford >> <richard.sandif...@linaro.org> wrote: >>> "

Re: Tweak BB analysis for dr_analyze_innermost

2017-06-28 Thread Bin.Cheng
On Wed, Jun 28, 2017 at 5:56 PM, Richard Sandiford <richard.sandif...@linaro.org> wrote: > "Bin.Cheng" <amker.ch...@gmail.com> writes: >> On Wed, Jun 28, 2017 at 3:04 PM, Richard Sandiford >> <richard.sandif...@linaro.org> wrote: >>> "Bin.C

Re: Tweak BB analysis for dr_analyze_innermost

2017-06-28 Thread Bin.Cheng
On Wed, Jun 28, 2017 at 3:04 PM, Richard Sandiford <richard.sandif...@linaro.org> wrote: > "Bin.Cheng" <amker.ch...@gmail.com> writes: >> On Wed, Jun 28, 2017 at 2:36 PM, Richard Sandiford >> <richard.sandif...@linaro.or

Re: Tweak BB analysis for dr_analyze_innermost

2017-06-28 Thread Bin.Cheng
On Wed, Jun 28, 2017 at 2:36 PM, Richard Sandiford wrote: > Index: gcc/tree-data-ref.c > === > --- gcc/tree-data-ref.c 2017-06-28 14:33:41.294720044 +0100 > +++ gcc/tree-data-ref.c 2017-06-28

Re: [PATCH GCC][13/13]Distribute loop with loop versioning under runtime alias check

2017-06-28 Thread Bin.Cheng
On Wed, Jun 28, 2017 at 1:29 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Wed, Jun 28, 2017 at 1:46 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Wed, Jun 28, 2017 at 11:58 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH GCC][13/13]Distribute loop with loop versioning under runtime alias check

2017-06-28 Thread Bin.Cheng
On Wed, Jun 28, 2017 at 11:58 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Tue, Jun 27, 2017 at 4:07 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Tue, Jun 27, 2017 at 1:44 PM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>> O

Re: [PATCH GCC][3/6]New file computing regional register pressure on TREE SSA

2017-06-28 Thread Bin.Cheng
On Tue, Jun 27, 2017 at 6:40 PM, Jeff Law wrote: > On 05/12/2017 05:28 AM, Bin Cheng wrote: >> Hi, >> This patch computes register pressure information on TREE SSA by a backward >> live >> range data flow problem. The major motivation is to estimate register >> pressure >> for

Re: [PATCH GCC][01/13]Introduce internal function IFN_LOOP_DIST_ALIAS

2017-06-27 Thread Bin.Cheng
On Tue, Jun 27, 2017 at 3:59 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On June 27, 2017 4:27:17 PM GMT+02:00, "Bin.Cheng" <amker.ch...@gmail.com> > wrote: >>On Tue, Jun 27, 2017 at 1:58 PM, Richard Biener >><richard.guent...@gmail.com&g

Re: [PATCH GCC][01/13]Introduce internal function IFN_LOOP_DIST_ALIAS

2017-06-27 Thread Bin.Cheng
On Tue, Jun 27, 2017 at 1:58 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Fri, Jun 23, 2017 at 12:10 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Mon, Jun 12, 2017 at 6:02 PM, Bin Cheng <bin.ch...@arm.com> wrote: >>> Hi, >>&

Re: [PATCH GCC][13/13]Distribute loop with loop versioning under runtime alias check

2017-06-27 Thread Bin.Cheng
On Tue, Jun 27, 2017 at 1:44 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Fri, Jun 23, 2017 at 12:30 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Tue, Jun 20, 2017 at 10:22 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >>> On Mon, Jun 12

Re: [PATCH GCC][5/6]Record initialization statements and only insert it for valid chains

2017-06-26 Thread Bin.Cheng
On Fri, May 12, 2017 at 12:28 PM, Bin Cheng wrote: > Hi, > This patch caches initialization statements and only inserts it for valid > chains. > Looks like current code even inserts such stmts for invalid chains which will > be > deleted as dead code afterwards. > > Bootstrap

Re: [PATCH GCC][09/13]Simply cost model merges partitions with the same references

2017-06-23 Thread Bin.Cheng
On Fri, Jun 23, 2017 at 11:48 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Fri, Jun 23, 2017 at 12:19 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Mon, Jun 19, 2017 at 4:20 PM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH GCC][13/13]Distribute loop with loop versioning under runtime alias check

2017-06-23 Thread Bin.Cheng
On Tue, Jun 20, 2017 at 10:22 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Mon, Jun 12, 2017 at 6:03 PM, Bin Cheng <bin.ch...@arm.com> wrote: >> Hi, >> This is the main patch rewriting loop distribution in order to handle hmmer. >> It improves loop dist

Re: [PATCH GCC][08/13]Refactoring structure partition for distribution

2017-06-23 Thread Bin.Cheng
On Mon, Jun 19, 2017 at 4:18 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Mon, Jun 19, 2017 at 3:37 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Wed, Jun 14, 2017 at 2:47 PM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH GCC][12/13]Workaround reduction statements for distribution

2017-06-23 Thread Bin.Cheng
On Tue, Jun 20, 2017 at 12:36 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Tue, Jun 20, 2017 at 11:20 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Fri, Jun 16, 2017 at 6:15 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >>> On Fri, Jun

Re: [PATCH GCC][11/13]Annotate partition by its parallelism execution type

2017-06-23 Thread Bin.Cheng
And the patch. On Fri, Jun 23, 2017 at 11:24 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Tue, Jun 20, 2017 at 12:34 PM, Richard Biener > <richard.guent...@gmail.com> wrote: >> On Tue, Jun 20, 2017 at 11:18 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >&g

Re: [PATCH GCC][11/13]Annotate partition by its parallelism execution type

2017-06-23 Thread Bin.Cheng
On Tue, Jun 20, 2017 at 12:34 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Tue, Jun 20, 2017 at 11:18 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Fri, Jun 16, 2017 at 11:10 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>

Re: [PATCH GCC][10/13]Compute and cache data dependence relation

2017-06-23 Thread Bin.Cheng
On Tue, Jun 20, 2017 at 12:32 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Tue, Jun 20, 2017 at 11:15 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Fri, Jun 16, 2017 at 11:03 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>

Re: [PATCH GCC][09/13]Simply cost model merges partitions with the same references

2017-06-23 Thread Bin.Cheng
On Mon, Jun 19, 2017 at 4:20 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Mon, Jun 19, 2017 at 3:40 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Wed, Jun 14, 2017 at 2:54 PM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH GCC][01/13]Introduce internal function IFN_LOOP_DIST_ALIAS

2017-06-23 Thread Bin.Cheng
On Mon, Jun 12, 2017 at 6:02 PM, Bin Cheng wrote: > Hi, > I was asked by upstream to split the loop distribution patch into small ones. > It is hard because data structure and algorithm are closely coupled together. > Anyway, this is the patch series with smaller patches.

Re: [PATCH GCC][5/5]Enable tree loop distribution at -O3 and above optimization levels.

2017-06-23 Thread Bin.Cheng
On Fri, Jun 23, 2017 at 6:04 AM, Jeff Law <l...@redhat.com> wrote: > On 06/07/2017 02:07 AM, Bin.Cheng wrote: >> On Tue, Jun 6, 2017 at 6:47 PM, Jeff Law <l...@redhat.com> wrote: >>> On 06/02/2017 05:52 AM, Bin Cheng wrote: >>>> Hi, >>>>

Re: [PATCH GCC][13/13]Distribute loop with loop versioning under runtime alias check

2017-06-20 Thread Bin.Cheng
On Mon, Jun 12, 2017 at 6:03 PM, Bin Cheng wrote: > Hi, > This is the main patch rewriting loop distribution in order to handle hmmer. > It improves loop distribution by versioning loop under runtime alias check > conditions. > As described in comments, the patch basically

Re: [PATCH GCC][12/13]Workaround reduction statements for distribution

2017-06-20 Thread Bin.Cheng
On Fri, Jun 16, 2017 at 6:15 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Fri, Jun 16, 2017 at 11:21 AM, Richard Biener > <richard.guent...@gmail.com> wrote: >> On Mon, Jun 12, 2017 at 7:03 PM, Bin Cheng <bin.ch...@arm.com> wrote: >>> Hi, >>> F

Re: [PATCH GCC][11/13]Annotate partition by its parallelism execution type

2017-06-20 Thread Bin.Cheng
On Fri, Jun 16, 2017 at 11:10 AM, Richard Biener wrote: > On Mon, Jun 12, 2017 at 7:03 PM, Bin Cheng wrote: >> Hi, >> This patch checks and records if partition can be executed in parallel by >> looking if there exists data dependence cycles. The

Re: [PATCH GCC][10/13]Compute and cache data dependence relation

2017-06-20 Thread Bin.Cheng
On Fri, Jun 16, 2017 at 11:03 AM, Richard Biener wrote: > On Mon, Jun 12, 2017 at 7:03 PM, Bin Cheng wrote: >> Hi, >> This patch computes and caches data dependence relation in a hash table >> so that it can be queried multiple times later for

Re: [PATCH GCC][07/13]Preserve data references for whole distribution life time

2017-06-19 Thread Bin.Cheng
On Mon, Jun 19, 2017 at 4:16 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Mon, Jun 19, 2017 at 3:34 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Tue, Jun 13, 2017 at 12:14 PM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH GCC][09/13]Simply cost model merges partitions with the same references

2017-06-19 Thread Bin.Cheng
On Wed, Jun 14, 2017 at 2:54 PM, Richard Biener wrote: > On Mon, Jun 12, 2017 at 7:03 PM, Bin Cheng wrote: >> Hi, >> Current primitive cost model merges partitions with data references sharing >> the same >> base address. I believe it's designed

Re: [PATCH GCC][08/13]Refactoring structure partition for distribution

2017-06-19 Thread Bin.Cheng
On Wed, Jun 14, 2017 at 2:47 PM, Richard Biener wrote: > On Mon, Jun 12, 2017 at 7:03 PM, Bin Cheng wrote: >> Hi, >> This patch refactors struct partition for later distribution. It records >> bitmap of data references in struct partition rather

Re: [PATCH GCC][07/13]Preserve data references for whole distribution life time

2017-06-19 Thread Bin.Cheng
On Tue, Jun 13, 2017 at 12:14 PM, Richard Biener wrote: > On Mon, Jun 12, 2017 at 7:02 PM, Bin Cheng wrote: >> Hi, >> This patch collects and preserves all data references in loop for whole >> distribution life time. It will be used afterwards. >>

Re: [PATCH GCC][06/13]Preserve loop nest in whole distribution life time

2017-06-19 Thread Bin.Cheng
On Tue, Jun 13, 2017 at 12:08 PM, Richard Biener wrote: > On Tue, Jun 13, 2017 at 1:06 PM, Richard Biener > wrote: >> On Mon, Jun 12, 2017 at 7:02 PM, Bin Cheng wrote: >>> Hi, >>> This simple patch computes and preserves

Re: [PATCH GCC][12/13]Workaround reduction statements for distribution

2017-06-16 Thread Bin.Cheng
On Fri, Jun 16, 2017 at 11:21 AM, Richard Biener wrote: > On Mon, Jun 12, 2017 at 7:03 PM, Bin Cheng wrote: >> Hi, >> For now, loop distribution handles variables used outside of loop as >> reduction. >> This is inaccurate because all partitions

Re: [PATCH GCC][1/2]Feed bound computation to folder in loop split

2017-06-16 Thread Bin.Cheng
On Fri, Jun 16, 2017 at 5:48 PM, Marc Glisse <marc.gli...@inria.fr> wrote: > On Fri, 16 Jun 2017, Bin.Cheng wrote: > >> On Fri, Jun 16, 2017 at 5:16 PM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>> >>> On June 16, 2017 3:31:32 PM G

Re: [PATCH GCC][1/2]Feed bound computation to folder in loop split

2017-06-16 Thread Bin.Cheng
On Fri, Jun 16, 2017 at 5:16 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On June 16, 2017 3:31:32 PM GMT+02:00, "Bin.Cheng" <amker.ch...@gmail.com> > wrote: >>On Fri, Jun 16, 2017 at 2:10 PM, Richard Biener >><richard.guent...@gmail.com&

Re: [PATCH GCC][1/2]Feed bound computation to folder in loop split

2017-06-16 Thread Bin.Cheng
On Fri, Jun 16, 2017 at 2:10 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Fri, Jun 16, 2017 at 3:06 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Fri, Jun 16, 2017 at 11:49 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH GCC][1/2]Feed bound computation to folder in loop split

2017-06-16 Thread Bin.Cheng
On Fri, Jun 16, 2017 at 11:49 AM, Richard Biener wrote: > On Wed, Jun 14, 2017 at 3:07 PM, Bin Cheng wrote: >> Hi, >> Loop split forces intermediate computation to gimple operands all the time >> when >> computing bound information. This is not

Re: [PATCH GCC][09/13]Simply cost model merges partitions with the same references

2017-06-14 Thread Bin.Cheng
On Wed, Jun 14, 2017 at 2:54 PM, Richard Biener wrote: > On Mon, Jun 12, 2017 at 7:03 PM, Bin Cheng wrote: >> Hi, >> Current primitive cost model merges partitions with data references sharing >> the same >> base address. I believe it's designed

Re: [PATCH GCC][04/13]Sort statements in topological order for loop distribution

2017-06-14 Thread Bin.Cheng
On Wed, Jun 14, 2017 at 10:15 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Wed, Jun 14, 2017 at 9:53 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Tue, Jun 13, 2017 at 11:59 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH GCC][04/13]Sort statements in topological order for loop distribution

2017-06-14 Thread Bin.Cheng
On Tue, Jun 13, 2017 at 11:59 AM, Richard Biener wrote: > On Mon, Jun 12, 2017 at 7:02 PM, Bin Cheng wrote: >> Hi, >> During the work I ran into a latent bug for distributing. For the moment we >> sort statements >> in dominance order, but that's

Re: [PATCH] Fix PR66313

2017-06-13 Thread Bin.Cheng
On Tue, Jun 13, 2017 at 12:48 PM, Richard Biener wrote: > On Tue, 13 Jun 2017, Richard Sandiford wrote: > >> Richard Biener writes: >> > On Tue, 13 Jun 2017, Richard Sandiford wrote: >> >> Richard Biener writes: >> >> > So I've come back

Re: [PATCH] Fix PR66313

2017-06-13 Thread Bin.Cheng
On Tue, Jun 13, 2017 at 12:23 PM, Richard Sandiford wrote: > Richard Biener writes: >> On Tue, 13 Jun 2017, Richard Sandiford wrote: >>> Richard Biener writes: >>> > So I've come back to PR66313 and found a solution to the

Re: [PATCH GCC][06/13]Preserve loop nest in whole distribution life time

2017-06-13 Thread Bin.Cheng
On Tue, Jun 13, 2017 at 12:06 PM, Richard Biener wrote: > On Mon, Jun 12, 2017 at 7:02 PM, Bin Cheng wrote: >> Hi, >> This simple patch computes and preserves loop nest vector for whole >> distribution >> life time. The loop nest will be used

Re: [PATCH GCC][03/13]Mark and skip distributed loops

2017-06-13 Thread Bin.Cheng
On Tue, Jun 13, 2017 at 11:47 AM, Richard Biener wrote: > On Mon, Jun 12, 2017 at 7:02 PM, Bin Cheng wrote: >> Hi, >> This simple patch marks distributed loops and skips it in following >> distribution. >> >> Bootstrap and test on x86_64 and

Re: [PATCH PR78005]Fix miscompare issue by computing correct guard condition for vectorized loop

2017-06-12 Thread Bin.Cheng
On Mon, Jun 12, 2017 at 9:19 AM, Richard Sandiford <richard.sandif...@linaro.org> wrote: > "Bin.Cheng" <amker.ch...@gmail.com> writes: >> On Sat, Jun 10, 2017 at 10:40 AM, Richard Sandiford >> <richard.sandif...@linaro.org> wrote: >>> Sorry to r

Re: [PATCH GCC8][32/33]Save niter check for vect peeling if loop versioning is required

2017-06-12 Thread Bin.Cheng
On Sat, Jun 10, 2017 at 11:06 AM, Richard Sandiford wrote: > Another one sorry, but: > > Bin Cheng writes: >> diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c >> index af874e7..98caa5e 100644 >> --- a/gcc/tree-vect-loop.c >> +++

Re: [PATCH PR78005]Fix miscompare issue by computing correct guard condition for vectorized loop

2017-06-11 Thread Bin.Cheng
On Sat, Jun 10, 2017 at 10:40 AM, Richard Sandiford wrote: > Sorry to return this old patch, but: > > Bin Cheng writes: >> -/* Calculate the number of iterations under which scalar loop will be >> - preferred than vectorized loop. NITERS_PROLOG

Re: [PATCH GCC][4/5]Improve loop distribution to handle hmmer

2017-06-08 Thread Bin.Cheng
On Thu, Jun 8, 2017 at 3:48 AM, kugan wrote: > Hi Bin, > >> + >> +/* In reduced dependence graph RDG for loop distribution, return true if >> + dependence between references DR1 and DR2 may create dependence cycle >> + and such dependence cycle can't be

Re: [PATCH GCC8][31/33]Set range information for niter bound of vectorized loop

2017-06-07 Thread Bin.Cheng
On Wed, May 24, 2017 at 2:48 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Mon, May 22, 2017 at 7:13 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Fri, May 19, 2017 at 1:51 PM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH GCC8][32/33]Save niter check for vect peeling if loop versioning is required

2017-06-07 Thread Bin.Cheng
On Thu, May 11, 2017 at 12:06 PM, Richard Biener wrote: > On Tue, Apr 18, 2017 at 12:54 PM, Bin Cheng wrote: >> Hi, >> When loop versioning is required in vectorization, we can merge niter check >> for vect >> peeling with the check for loop

Re: [PATCH GCC8][30/33]Fold more type conversion into binary arithmetic operations

2017-06-07 Thread Bin.Cheng
On Wed, May 17, 2017 at 1:27 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Mon, May 15, 2017 at 5:56 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Thu, May 11, 2017 at 11:54 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>> O

Re: [PATCH GCC8][29/33]New register pressure estimation

2017-06-07 Thread Bin.Cheng
On Wed, May 17, 2017 at 1:24 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Mon, May 15, 2017 at 5:50 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Thu, May 11, 2017 at 11:39 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>> O

Re: [PATCH GCC][4/5]Improve loop distribution to handle hmmer

2017-06-07 Thread Bin.Cheng
On Wed, Jun 7, 2017 at 11:03 AM, Richard Biener wrote: > On Fri, Jun 2, 2017 at 1:51 PM, Bin Cheng wrote: >> Hi, >> This is the main patch of the change. It improves loop distribution by >> versioning loop under >> runtime alias check conditions,

Re: [PATCH GCC][5/5]Enable tree loop distribution at -O3 and above optimization levels.

2017-06-07 Thread Bin.Cheng
On Wed, Jun 7, 2017 at 9:33 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Wed, Jun 7, 2017 at 10:07 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Tue, Jun 6, 2017 at 6:47 PM, Jeff Law <l...@redhat.com> wrote: >>> On 06/02/2017 05:52 AM, Bin C

Re: [PATCH GCC][5/5]Enable tree loop distribution at -O3 and above optimization levels.

2017-06-07 Thread Bin.Cheng
On Tue, Jun 6, 2017 at 6:47 PM, Jeff Law wrote: > On 06/02/2017 05:52 AM, Bin Cheng wrote: >> Hi, >> This patch enables -ftree-loop-distribution by default at -O3 and above >> optimization levels. >> Bootstrap and test at O2/O3 on x86_64 and AArch64. is it OK? >> >> Note I

Re: [PATCH GCC][4/5]Improve loop distribution to handle hmmer

2017-06-05 Thread Bin.Cheng
On Mon, Jun 5, 2017 at 5:21 AM, Kugan Vivekanandarajah wrote: > Hi Bin, > > Thanks for posting the patch. I haven't looked in detail yet but have > couple of quick questions. > > 1. Shouldn’t the run time alias check for versioning happen only when >

Re: [PATCH TEST]Rectify test case gcc.dg/tree-ssa/ivopt_mult_4.c

2017-05-31 Thread Bin.Cheng
On Fri, May 26, 2017 at 12:49 PM, Richard Biener wrote: > On Thu, May 25, 2017 at 8:00 PM, Bin Cheng wrote: >> Hi, >> I believe this tests has been wrongly modified previously. It is to test >> that the exit check on >> pointer shouldn't be

Re: [PATCH GCC][4/6]Relax minimal segment length of DR_B for merging alias check

2017-05-30 Thread Bin.Cheng
On Tue, May 30, 2017 at 12:27 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Thu, May 25, 2017 at 5:16 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Tue, May 23, 2017 at 5:23 PM, Bin Cheng <bin.ch...@arm.com> wrote: >>> Hi, >>>

Re: [PATCH GCC][2/6]Factor out code pruning runtime alias checks

2017-05-26 Thread Bin.Cheng
On Fri, May 26, 2017 at 12:15 PM, Richard Biener wrote: > On Tue, May 23, 2017 at 6:22 PM, Bin Cheng wrote: >> Hi, >> This is the second patch in the set, it factors out code pruning runtime >> alias >> checks from file tree-vect-data-refs.c to

Re: [PATCH GCC][1/6]Move compare_tree to tree.c and expose the interface.

2017-05-26 Thread Bin.Cheng
On Fri, May 26, 2017 at 12:50 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Fri, May 26, 2017 at 1:30 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Fri, May 26, 2017 at 12:14 PM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH GCC][3/6]Fix PR80815 by handling negative DR_STEPs in runtime alias check

2017-05-26 Thread Bin.Cheng
On Fri, May 26, 2017 at 12:39 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Thu, May 25, 2017 at 5:15 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Wed, May 24, 2017 at 11:54 AM, Richard Sandiford >> <richard.sandif...@linaro.org> wrote: >&

Re: [PATCH GCC][1/6]Move compare_tree to tree.c and expose the interface.

2017-05-26 Thread Bin.Cheng
On Fri, May 26, 2017 at 12:14 PM, Richard Biener wrote: > On Tue, May 23, 2017 at 6:22 PM, Bin Cheng wrote: >> Hi, >> This patch set factors out runtime alias check code from >> tree-vect-data-refs.c >> and tree-vect-loop-manip.c as general

Re: [PATCH GCC][4/6]Relax minimal segment length of DR_B for merging alias check

2017-05-25 Thread Bin.Cheng
On Tue, May 23, 2017 at 5:23 PM, Bin Cheng wrote: > Hi, > As commented in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80815#c1, > We can relax minimal segment length of DR_B for merging. With this change, > the new test can be improved to only one alias check. Note the >

Re: [PATCH GCC][3/6]Fix PR80815 by handling negative DR_STEPs in runtime alias check

2017-05-25 Thread Bin.Cheng
On Wed, May 24, 2017 at 11:54 AM, Richard Sandiford <richard.sandif...@linaro.org> wrote: > "Bin.Cheng" <amker.ch...@gmail.com> writes: >> On Tue, May 23, 2017 at 6:53 PM, Richard Sandiford >> <richard.sandif...@linaro.org> wrote: >>> AIU

Re: [PATCH GCC][3/6]Fix PR80815 by handling negative DR_STEPs in runtime alias check

2017-05-24 Thread Bin.Cheng
On Tue, May 23, 2017 at 6:53 PM, Richard Sandiford wrote: > AIUI, the reason the old code mishandled negative steps was that the > associated segment lengths were stored as sizetype and so looked like > big unsigned values. Those values therefore satisfied

Re: [PATCH GCC8][31/33]Set range information for niter bound of vectorized loop

2017-05-22 Thread Bin.Cheng
On Fri, May 19, 2017 at 1:51 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Mon, May 15, 2017 at 5:58 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Thu, May 11, 2017 at 12:02 PM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>> O

Re: [PATCH 2/3] Simplify wrapped binops

2017-05-19 Thread Bin.Cheng
On Fri, May 19, 2017 at 11:09 AM, Robin Dapp wrote: >> I can guess what is happening here. It's a 40 bits unsigned long long >> field, (s.b-8) will be like: >> _1 = s.b >> _2 = _1 + 0xf8 >> Also get_range_info returns value range [0, 0xFF] for _1. >>

Re: [PATCH 2/3] Simplify wrapped binops

2017-05-18 Thread Bin.Cheng
On Thu, May 18, 2017 at 5:08 PM, Robin Dapp wrote: >> Any reason to expose tree-vrp.c internal interface here? The function >> looks quite expensive. Overflow check can be done by get_range_info >> and simple wi::cmp calls. Existing code like in >>

Re: [PATCH 2/3] Simplify wrapped binops

2017-05-18 Thread Bin.Cheng
On Thu, May 18, 2017 at 3:47 PM, Robin Dapp wrote: > match.pd part of the patch. > > gcc/ChangeLog: > > 2017-05-18 Robin Dapp > > * match.pd: Simplify wrapped binary operations. > * tree-vrp.c

Re: [PATCH GCC8][29/33]New register pressure estimation

2017-05-18 Thread Bin.Cheng
On Thu, May 18, 2017 at 11:41 AM, Richard Sandiford <richard.sandif...@linaro.org> wrote: > "Bin.Cheng" <amker.ch...@gmail.com> writes: >> On Wed, May 17, 2017 at 1:37 PM, Richard Sandiford >> <richard.sandif...@linaro.org> wrote: >>> "Bin.C

Re: [PATCH GCC8][29/33]New register pressure estimation

2017-05-18 Thread Bin.Cheng
On Wed, May 17, 2017 at 1:37 PM, Richard Sandiford <richard.sandif...@linaro.org> wrote: > "Bin.Cheng" <amker.ch...@gmail.com> writes: >> -/* Calculates cost for having N_REGS registers. This number includes >> - induction variables, invarian

Re: [PATCH GCC8][31/33]Set range information for niter bound of vectorized loop

2017-05-15 Thread Bin.Cheng
On Thu, May 11, 2017 at 12:02 PM, Richard Biener wrote: > On Tue, Apr 18, 2017 at 12:54 PM, Bin Cheng wrote >> Hi, >> Based on vect_peeling algorithm, we know for sure that vectorized loop must >> iterates at least once. >> This patch sets range

Re: [PATCH GCC8][30/33]Fold more type conversion into binary arithmetic operations

2017-05-15 Thread Bin.Cheng
On Thu, May 11, 2017 at 11:54 AM, Richard Biener wrote: > On Tue, Apr 18, 2017 at 12:53 PM, Bin Cheng wrote: >> Hi, >> Simplification of (T1)(X *+- CST) is already implemented in >> aff_combination_expand, >> this patch moves it to

Re: [PATCH GCC8][29/33]New register pressure estimation

2017-05-15 Thread Bin.Cheng
On Thu, May 11, 2017 at 11:39 AM, Richard Biener wrote: > On Tue, Apr 18, 2017 at 12:53 PM, Bin Cheng wrote: >> Hi, >> Currently IVOPTs shares the same register pressure computation with RTL loop >> invariant pass, >> which doesn't work very well.

Re: PR78972, 80283: Extend TER with scheduling

2017-05-15 Thread Bin.Cheng
On Mon, May 15, 2017 at 9:27 AM, Richard Biener wrote: > On Fri, May 12, 2017 at 7:51 PM, Bernd Schmidt wrote: >> If you look at certain testcases like the one for PR78972, you'll find that >> the code generated by TER is maximally pessimal in

Re: [PATCH GCC8][13/33]Rewrite cost computation of ivopts

2017-05-12 Thread Bin.Cheng
On Fri, May 12, 2017 at 10:50 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Fri, May 12, 2017 at 8:39 AM, Christophe Lyon > <christophe.l...@linaro.org> wrote: >> Hi Bin, >> >> >> On 4 May 2017 at 17:25, Bin.Cheng <amker.ch...@gmail.com> wrot

Re: [PATCH GCC8][13/33]Rewrite cost computation of ivopts

2017-05-12 Thread Bin.Cheng
On Fri, May 12, 2017 at 8:39 AM, Christophe Lyon <christophe.l...@linaro.org> wrote: > Hi Bin, > > > On 4 May 2017 at 17:25, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Wed, Apr 26, 2017 at 11:18 AM, Richard Biener >> <richard.guent...@gmail.com> w

Re: [PATCH] Tree-level fix for PR 69526

2017-05-11 Thread Bin.Cheng
On Tue, Jan 17, 2017 at 9:48 AM, Richard Biener wrote: > On Tue, Jan 10, 2017 at 2:32 PM, Robin Dapp wrote: >> Perhaps I'm still missing how some cases are handled or not handled, >> sorry for the noise. >> >>> I'm not sure there is anything

Re: [PATCH GCC8][29/33]New register pressure estimation

2017-05-11 Thread Bin.Cheng
On Thu, May 11, 2017 at 11:39 AM, Richard Biener wrote: > On Tue, Apr 18, 2017 at 12:53 PM, Bin Cheng wrote: >> Hi, >> Currently IVOPTs shares the same register pressure computation with RTL loop >> invariant pass, >> which doesn't work very well.

Re: [PATCH GCC8][01/33]Handle TRUNCATE between tieable modes in rtx_cost

2017-05-10 Thread Bin.Cheng
On Wed, May 3, 2017 at 11:09 AM, Kyrill Tkachov <kyrylo.tkac...@foss.arm.com> wrote: > Hi Bin, > > > On 03/05/17 11:02, Bin.Cheng wrote: >> >> On Wed, May 3, 2017 at 9:38 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >>> >>> On Wed, May 3,

Re: [PATCH GCC8][17/33]Treat complex cand step as invriant expression

2017-05-04 Thread Bin.Cheng
On Wed, May 3, 2017 at 2:43 PM, Richard Biener wrote: > On Tue, Apr 18, 2017 at 12:46 PM, Bin Cheng wrote: >> Hi, >> We generally need to compute cand step in loop preheader and use it in loop >> body. >> Unless it's an SSA_NAME of constant

Re: [PATCH GCC8][25/33]New loop constraint flags

2017-05-04 Thread Bin.Cheng
On Wed, Apr 26, 2017 at 3:01 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Wed, Apr 26, 2017 at 2:27 PM, Richard Biener > <richard.guent...@gmail.com> wrote: >> On Tue, Apr 18, 2017 at 12:51 PM, Bin Cheng <bin.ch...@arm.com> wrote: >>> Hi, >>> T

Re: [PATCH GCC8][28/33]Don't count non-interger PHIs for register pressure

2017-05-04 Thread Bin.Cheng
On Wed, Apr 26, 2017 at 3:32 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Wed, Apr 26, 2017 at 3:23 PM, Richard Biener > <richard.guent...@gmail.com> wrote: >> On Wed, Apr 26, 2017 at 3:37 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >>> On Wed,

Re: [PATCH GCC8][13/33]Rewrite cost computation of ivopts

2017-05-04 Thread Bin.Cheng
On Wed, Apr 26, 2017 at 11:18 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Wed, Apr 26, 2017 at 12:12 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Wed, Apr 26, 2017 at 10:50 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>

Re: [PATCH GCC8][11/33]New interfaces for tree affine

2017-05-04 Thread Bin.Cheng
On Mon, Apr 24, 2017 at 11:43 AM, Richard Biener wrote: > On Tue, Apr 18, 2017 at 12:43 PM, Bin Cheng wrote: >> Hi, >> This patch adds three simple interfaces for tree affine which will be used in >> cost computation later. >> >> Is it OK? > > >

Re: [PATCH GCC8][07/33]Offset validity check in address expression

2017-05-04 Thread Bin.Cheng
On Wed, May 3, 2017 at 10:49 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Tue, May 2, 2017 at 7:06 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Mon, Apr 24, 2017 at 11:34 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>> O

Re: Handle data dependence relations with different bases

2017-05-04 Thread Bin.Cheng
On Thu, May 4, 2017 at 11:06 AM, Richard Sandiford <richard.sandif...@linaro.org> wrote: > "Bin.Cheng" <amker.ch...@gmail.com> writes: >> On Wed, May 3, 2017 at 9:00 AM, Richard Sandiford >> <richard.sandif...@linaro.or

Re: Handle data dependence relations with different bases

2017-05-04 Thread Bin.Cheng
On Wed, May 3, 2017 at 9:00 AM, Richard Sandiford wrote: > This patch tries to calculate conservatively-correct distance > vectors for two references whose base addresses are not the same. > It sets a new flag DDR_COULD_BE_INDEPENDENT_P if the dependence > isn't

Re: [PATCH 1/4][PR tree-optimization/78496] Don't simplify conditionals too early in VRP

2017-05-03 Thread Bin.Cheng
On Wed, May 3, 2017 at 5:32 PM, Jeff Law wrote: > [ With the patch attached... ] > > > On 05/03/2017 10:31 AM, Jeff Law wrote: >> >> This is the first of 3-5 patches to address pr78496. >> >> The goal of these patches is to catch jump threads earlier in the pipeline >> to avoid

Re: [PATCH GCC8][03/33]Refactor invariant variable/expression handling

2017-05-03 Thread Bin.Cheng
On Wed, May 3, 2017 at 3:41 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Wed, May 3, 2017 at 3:38 PM, Christophe Lyon > <christophe.l...@linaro.org> wrote: >> Hi Bin, >> >> >> On 24 April 2017 at 12:26, Richard Biener <richard.guent...@gmail.com

Re: [PATCH GCC8][03/33]Refactor invariant variable/expression handling

2017-05-03 Thread Bin.Cheng
On Wed, May 3, 2017 at 3:38 PM, Christophe Lyon wrote: > Hi Bin, > > > On 24 April 2017 at 12:26, Richard Biener wrote: >> On Tue, Apr 18, 2017 at 12:38 PM, Bin Cheng wrote: >>> Hi, >>> This patch refactors how invariant

Re: Alternative check for vector refs with same alignment

2017-05-03 Thread Bin.Cheng
On Wed, May 3, 2017 at 11:07 AM, Richard Biener wrote: > On Wed, May 3, 2017 at 9:54 AM, Richard Sandiford > wrote: >> vect_find_same_alignment_drs uses the ddr dependence distance >> to tell whether two references have the same

Re: [PATCH GCC8][01/33]Handle TRUNCATE between tieable modes in rtx_cost

2017-05-03 Thread Bin.Cheng
On Wed, May 3, 2017 at 11:09 AM, Kyrill Tkachov <kyrylo.tkac...@foss.arm.com> wrote: > Hi Bin, > > > On 03/05/17 11:02, Bin.Cheng wrote: >> >> On Wed, May 3, 2017 at 9:38 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >>> >>> On Wed, May 3,

Re: [PATCH GCC8][01/33]Handle TRUNCATE between tieable modes in rtx_cost

2017-05-03 Thread Bin.Cheng
On Wed, May 3, 2017 at 9:38 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Wed, May 3, 2017 at 7:17 AM, Eric Botcazou <ebotca...@adacore.com> wrote: >>> 2017-04-11 Bin Cheng <bin.ch...@arm.com> >>> >>> * rtlanal.c (rtx_cost): Handle T

Re: [PATCH GCC8][01/33]Handle TRUNCATE between tieable modes in rtx_cost

2017-05-03 Thread Bin.Cheng
On Wed, May 3, 2017 at 7:17 AM, Eric Botcazou wrote: >> 2017-04-11 Bin Cheng >> >> * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes. > > This breaks bootstrap with RTL checking: > > /home/eric/build/gcc/native/./gcc/xgcc

Re: [PATCH GCC8][07/33]Offset validity check in address expression

2017-05-02 Thread Bin.Cheng
On Mon, Apr 24, 2017 at 11:34 AM, Richard Biener wrote: > On Tue, Apr 18, 2017 at 12:41 PM, Bin Cheng wrote: >> Hi, >> For now, we check validity of offset by computing the maximum offset then >> checking if >> offset is smaller than the max

Re: [PATCH GCC8][22/33]Generate TMR in new reassociation order

2017-05-02 Thread Bin.Cheng
On Tue, May 2, 2017 at 3:09 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Wed, Apr 26, 2017 at 12:20 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> This is another one where context diff might help. No code change >> from previous version. > >

Re: [PATCH GCC8][14/33]Handle more cheap operations in force_expr_to_var_cost

2017-04-27 Thread Bin.Cheng
On Thu, Apr 27, 2017 at 4:30 PM, Jeff Law wrote: > On 04/26/2017 06:58 AM, Richard Biener wrote: >> >> On Tue, Apr 18, 2017 at 12:44 PM, Bin Cheng >> wrote: >>> >>> Hi, This patch handles more cheap cases in function >>> force_expr_to_var_cost, specifically,

Re: [PATCH] Improve VRP range intersection for partly symbolic ranges

2017-04-27 Thread Bin.Cheng
On Thu, Apr 27, 2017 at 2:49 PM, Richard Biener wrote: > > The following makes intersecting [-INF, +10] and [a + -1, +INF] > to [10, a + -1] possible with the chance that for a <= 10 the > resulting range will be empty (but not trivially visible as so). Hi, I noticed

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