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

2017-07-26 Thread Richard Biener
On Wed, Jul 26, 2017 at 9:48 AM, Richard Biener wrote: > On Tue, Jul 25, 2017 at 7:45 PM, Marc Glisse wrote: >> On Tue, 25 Jul 2017, Richard Biener wrote: >> I think we need Richard to say what the intent is for the valueization

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

2017-07-26 Thread Richard Biener
On Wed, Jul 26, 2017 at 11:57 AM, Marc Glisse wrote: > On Wed, 26 Jul 2017, Richard Sandiford wrote: > >> Marc Glisse writes: >>> >>> On Wed, 26 Jul 2017, Richard Sandiford wrote: Richard Biener writes: >

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

2017-07-26 Thread Marc Glisse
On Wed, 26 Jul 2017, Richard Sandiford wrote: Marc Glisse writes: On Wed, 26 Jul 2017, Richard Sandiford wrote: Richard Biener writes: On Tue, Jul 25, 2017 at 7:45 PM, Marc Glisse wrote: On Tue, 25 Jul 2017, Richard

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

2017-07-26 Thread Richard Sandiford
Marc Glisse writes: > On Wed, 26 Jul 2017, Richard Sandiford wrote: >> Richard Biener writes: >>> On Tue, Jul 25, 2017 at 7:45 PM, Marc Glisse wrote: On Tue, 25 Jul 2017, Richard Biener wrote: >> I think we

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

2017-07-26 Thread Marc Glisse
On Wed, 26 Jul 2017, Richard Sandiford wrote: Richard Biener writes: On Tue, Jul 25, 2017 at 7:45 PM, Marc Glisse wrote: On Tue, 25 Jul 2017, Richard Biener wrote: I think we need Richard to say what the intent is for the valueization

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

2017-07-26 Thread Richard Sandiford
Richard Biener writes: > On Tue, Jul 25, 2017 at 7:45 PM, Marc Glisse wrote: >> On Tue, 25 Jul 2017, Richard Biener wrote: >> I think we need Richard to say what the intent is for the valueization function. It is used both to stop

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

2017-07-26 Thread Richard Biener
On Tue, Jul 25, 2017 at 7:45 PM, Marc Glisse wrote: > On Tue, 25 Jul 2017, Richard Biener wrote: > >>> I think we need Richard to say what the intent is for the valueization >>> function. It is used both to stop looking at defining stmt if the return >>> is >>> NULL, and to

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

2017-07-25 Thread Marc Glisse
On Tue, 25 Jul 2017, Richard Biener wrote: I think we need Richard to say what the intent is for the valueization function. It is used both to stop looking at defining stmt if the return is NULL, and to replace/optimize one SSA_NAME with another, but currently it seems hard to prevent looking

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

2017-07-25 Thread Richard Biener
On Mon, Jul 24, 2017 at 4:31 PM, Marc Glisse wrote: > On Mon, 24 Jul 2017, Bin.Cheng wrote: > >> On Mon, Jul 24, 2017 at 2:59 PM, Marc Glisse wrote: >>> >>> On Mon, 24 Jul 2017, Bin.Cheng wrote: >>> But since definition of _197 isn't in current

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

2017-07-24 Thread Marc Glisse
On Mon, 24 Jul 2017, Bin.Cheng wrote: On Mon, Jul 24, 2017 at 3:31 PM, Marc Glisse wrote: On Mon, 24 Jul 2017, Bin.Cheng wrote: On Mon, Jul 24, 2017 at 2:59 PM, Marc Glisse wrote: On Mon, 24 Jul 2017, Bin.Cheng wrote: But since definition of

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

2017-07-24 Thread Bin.Cheng
On Mon, Jul 24, 2017 at 3:31 PM, Marc Glisse wrote: > On Mon, 24 Jul 2017, Bin.Cheng wrote: > >> On Mon, Jul 24, 2017 at 2:59 PM, Marc Glisse wrote: >>> >>> On Mon, 24 Jul 2017, Bin.Cheng wrote: >>> But since definition of _197 isn't in current

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

2017-07-24 Thread Marc Glisse
On Mon, 24 Jul 2017, Bin.Cheng wrote: On Mon, Jul 24, 2017 at 2:59 PM, Marc Glisse wrote: On Mon, 24 Jul 2017, Bin.Cheng wrote: But since definition of _197 isn't in current stmt sequence, call "o31 = do_valueize (valueize, o31)" will return NULL. As a result, it's

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

2017-07-24 Thread Bin.Cheng
On Mon, Jul 24, 2017 at 2:59 PM, Marc Glisse wrote: > On Mon, 24 Jul 2017, Bin.Cheng wrote: > >> But since definition of _197 isn't in current stmt sequence, call "o31 >> = do_valueize (valueize, o31)" will return NULL. As a result, it's >> not matched. > > > Wait,

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

2017-07-24 Thread Marc Glisse
On Mon, 24 Jul 2017, Bin.Cheng wrote: But since definition of _197 isn't in current stmt sequence, call "o31 = do_valueize (valueize, o31)" will return NULL. As a result, it's not matched. Wait, actually, how was your fold_build* version working? Why was the first addition "in the current

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

2017-07-24 Thread Bin.Cheng
On Mon, Jul 24, 2017 at 1:16 PM, Marc Glisse wrote: > On Mon, 24 Jul 2017, Bin.Cheng wrote: > >>> For _123, we have >>> >>> /* (A +- CST1) +- CST2 -> A + CST3 >>> or >>> /* Associate (p +p off1) +p off2 as (p +p (off1 + off2)). */ >>> >>> >>> For _115, we have >>> >>> /*

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

2017-07-24 Thread Marc Glisse
On Mon, 24 Jul 2017, Bin.Cheng wrote: For _123, we have /* (A +- CST1) +- CST2 -> A + CST3 or /* Associate (p +p off1) +p off2 as (p +p (off1 + off2)). */ For _115, we have /* min (a, a + CST) -> a where CST is positive. */ /* min (a, a + CST) -> a + CST where CST is negative. */

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

2017-07-24 Thread Bin.Cheng
On Fri, Jun 16, 2017 at 5:48 PM, Marc Glisse wrote: > On Fri, 16 Jun 2017, Bin.Cheng wrote: > >> On Fri, Jun 16, 2017 at 5:16 PM, Richard Biener >> wrote: >>> >>> >>> That means we miss a pattern in match.PD to handle this case. >> >> I see. I

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

2017-06-16 Thread Andrew Pinski
On Fri, Jun 16, 2017 at 9:48 AM, Marc Glisse wrote: > On Fri, 16 Jun 2017, Bin.Cheng wrote: > >> On Fri, Jun 16, 2017 at 5:16 PM, Richard Biener >> wrote: >>> >>> On June 16, 2017 3:31:32 PM GMT+02:00, "Bin.Cheng" >>>

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 wrote: > On Fri, 16 Jun 2017, Bin.Cheng wrote: > >> On Fri, Jun 16, 2017 at 5:16 PM, Richard Biener >> wrote: >>> >>> On June 16, 2017 3:31:32 PM GMT+02:00, "Bin.Cheng" >>>

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

2017-06-16 Thread Marc Glisse
On Fri, 16 Jun 2017, Bin.Cheng wrote: On Fri, Jun 16, 2017 at 5:16 PM, Richard Biener wrote: On June 16, 2017 3:31:32 PM GMT+02:00, "Bin.Cheng" wrote: On Fri, Jun 16, 2017 at 2:10 PM, Richard Biener wrote: On

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 wrote: > On June 16, 2017 3:31:32 PM GMT+02:00, "Bin.Cheng" > wrote: >>On Fri, Jun 16, 2017 at 2:10 PM, Richard Biener >> wrote: >>> On Fri, Jun 16, 2017 at 3:06 PM,

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

2017-06-16 Thread Richard Biener
On June 16, 2017 3:31:32 PM GMT+02:00, "Bin.Cheng" wrote: >On Fri, Jun 16, 2017 at 2:10 PM, Richard Biener > wrote: >> On Fri, Jun 16, 2017 at 3:06 PM, Bin.Cheng >wrote: >>> On Fri, Jun 16, 2017 at 11:49 AM, Richard

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 wrote: > On Fri, Jun 16, 2017 at 3:06 PM, Bin.Cheng wrote: >> On Fri, Jun 16, 2017 at 11:49 AM, Richard Biener >> wrote: >>> On Wed, Jun 14, 2017 at 3:07 PM, Bin Cheng

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

2017-06-16 Thread Richard Biener
On Fri, Jun 16, 2017 at 3:06 PM, Bin.Cheng wrote: > 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

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][1/2]Feed bound computation to folder in loop split

2017-06-16 Thread Richard Biener
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 good since folding opportunities are > missed. This patch fixes the issue by feeding all

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

2017-06-14 Thread Bin Cheng
Hi, Loop split forces intermediate computation to gimple operands all the time when computing bound information. This is not good since folding opportunities are missed. This patch fixes the issue by feeding all computation to folder and only forcing to gimple operand at last. Bootstrap and