Re: [PATCH]Fix computation of offset in ivopt

2013-11-13 Thread Bin.Cheng
On Wed, Nov 13, 2013 at 7:26 PM, Richard Biener wrote: > On Wed, Nov 13, 2013 at 12:18 PM, Bin.Cheng wrote: >> On Thu, Nov 7, 2013 at 6:47 PM, Richard Biener >> wrote: >>> On Wed, Nov 6, 2013 at 6:06 PM, Richard Sandiford >>> wrote: Hi, "bin.cheng" writes: > Index: gcc/tree-

Re: [PATCH]Fix computation of offset in ivopt

2013-11-13 Thread Richard Biener
On Wed, Nov 13, 2013 at 12:18 PM, Bin.Cheng wrote: > On Thu, Nov 7, 2013 at 6:47 PM, Richard Biener > wrote: >> On Wed, Nov 6, 2013 at 6:06 PM, Richard Sandiford >> wrote: >>> Hi, >>> >>> "bin.cheng" writes: Index: gcc/tree-ssa-loop-ivopts.c ===

Re: [PATCH]Fix computation of offset in ivopt

2013-11-13 Thread Bin.Cheng
On Thu, Nov 7, 2013 at 6:47 PM, Richard Biener wrote: > On Wed, Nov 6, 2013 at 6:06 PM, Richard Sandiford > wrote: >> Hi, >> >> "bin.cheng" writes: >>> Index: gcc/tree-ssa-loop-ivopts.c >>> === >>> --- gcc/tree-ssa-loop-ivopts.c

Re: [PATCH]Fix computation of offset in ivopt

2013-11-07 Thread Richard Biener
On Wed, Nov 6, 2013 at 6:06 PM, Richard Sandiford wrote: > Hi, > > "bin.cheng" writes: >> Index: gcc/tree-ssa-loop-ivopts.c >> === >> --- gcc/tree-ssa-loop-ivopts.c(revision 203267) >> +++ gcc/tree-ssa-loop-ivopts.c(w

Re: [PATCH]Fix computation of offset in ivopt

2013-11-06 Thread Bin.Cheng
On Thu, Nov 7, 2013 at 1:06 AM, Richard Sandiford wrote: > Hi, > > "bin.cheng" writes: >> Index: gcc/tree-ssa-loop-ivopts.c >> === >> --- gcc/tree-ssa-loop-ivopts.c(revision 203267) >> +++ gcc/tree-ssa-loop-ivopts.c(w

Re: [PATCH]Fix computation of offset in ivopt

2013-11-06 Thread Richard Sandiford
Hi, "bin.cheng" writes: > Index: gcc/tree-ssa-loop-ivopts.c > === > --- gcc/tree-ssa-loop-ivopts.c(revision 203267) > +++ gcc/tree-ssa-loop-ivopts.c(working copy) > @@ -2037,12 +2037,12 @@ find_interesting_uses (struc

Re: [PATCH]Fix computation of offset in ivopt

2013-10-27 Thread Bin.Cheng
t;> >>>> Patch a: >>>> 2013-10-17 Bin Cheng >>>> >>>> * tree-ssa-loop-ivopts.c (strip_offset_1): Change parameter type. >>>> Count DECL_FIELD_BIT_OFFSET when computing offset for >>>> COMPONENT_REF. >>>&g

Re: [PATCH]Fix computation of offset in ivopt

2013-10-21 Thread Richard Biener
t;>> >>> Patch b: >>> 2013-10-17 Bin Cheng >>> >>> * fold-const.c (fold_plusminus_mult_expr): Use int_cst_value instead >>> of TREE_INT_CST_LOW. >>> >>> gcc/testsuite/ChangeLog >&g

Re: [PATCH]Fix computation of offset in ivopt

2013-10-20 Thread Bin.Cheng
t_cst_value instead >> of TREE_INT_CST_LOW. >> >> gcc/testsuite/ChangeLog >> 2013-10-17 Bin Cheng >> >> * gcc.dg/tree-ssa/ivopts-outside-loop-use-1.c: New test. >> >>> -Original Message- >>> From: Richard Biene

Re: [PATCH]Fix computation of offset in ivopt

2013-10-18 Thread Bin.Cheng
Bin Cheng >> >> * fold-const.c (fold_plusminus_mult_expr): Use int_cst_value instead >> of TREE_INT_CST_LOW. >> >> gcc/testsuite/ChangeLog >> 2013-10-17 Bin Cheng >> >> * gcc.dg/tree-ssa/ivopts-outside-loop-use-1.c: New test.

Re: [PATCH]Fix computation of offset in ivopt

2013-10-18 Thread Richard Biener
On Fri, Oct 18, 2013 at 2:26 PM, Bernd Schmidt wrote: > On 10/18/2013 02:10 PM, Richard Biener wrote: >> On Fri, Oct 18, 2013 at 2:02 PM, Bernd Schmidt >> wrote: >>> On 10/18/2013 01:18 PM, Richard Biener wrote: >>> Index: gcc/fold-const.c ==

Re: [PATCH]Fix computation of offset in ivopt

2013-10-18 Thread Bernd Schmidt
On 10/18/2013 02:10 PM, Richard Biener wrote: > On Fri, Oct 18, 2013 at 2:02 PM, Bernd Schmidt > wrote: >> On 10/18/2013 01:18 PM, Richard Biener wrote: >> >>> Index: gcc/fold-const.c >>> === >>> --- gcc/fold-const.c (revision 203267

Re: [PATCH]Fix computation of offset in ivopt

2013-10-18 Thread Richard Biener
On Fri, Oct 18, 2013 at 2:02 PM, Bernd Schmidt wrote: > On 10/18/2013 01:18 PM, Richard Biener wrote: > >> Index: gcc/fold-const.c >> === >> --- gcc/fold-const.c (revision 203267) >> +++ gcc/fold-const.c (working copy) >> @@ -7270,8 +

Re: [PATCH]Fix computation of offset in ivopt

2013-10-18 Thread Bernd Schmidt
On 10/18/2013 01:18 PM, Richard Biener wrote: > Index: gcc/fold-const.c > === > --- gcc/fold-const.c (revision 203267) > +++ gcc/fold-const.c (working copy) > @@ -7270,8 +7270,8 @@ fold_plusminus_mult_expr (location_t loc, enum tre >

Re: [PATCH]Fix computation of offset in ivopt

2013-10-18 Thread Richard Biener
0-17 Bin Cheng > > * gcc.dg/tree-ssa/ivopts-outside-loop-use-1.c: New test. > >> -Original Message- >> From: Richard Biener [mailto:richard.guent...@gmail.com] >> Sent: Wednesday, October 02, 2013 4:32 PM >> To: Bin.Cheng >> Cc: Bin Cheng; GCC Patch

RE: [PATCH]Fix computation of offset in ivopt

2013-10-16 Thread bin.cheng
s > Subject: Re: [PATCH]Fix computation of offset in ivopt > > On Tue, Oct 1, 2013 at 6:13 PM, Bin.Cheng wrote: > > On Tue, Oct 1, 2013 at 6:50 PM, Richard Biener > > wrote: > >> On Mon, Sep 30, 2013 at 7:39 AM, bin.cheng > wrote: > >>> > >>>

Re: [PATCH]Fix computation of offset in ivopt

2013-10-07 Thread Bin.Cheng
On Tue, Oct 1, 2013 at 6:50 PM, Richard Biener wrote: > On Mon, Sep 30, 2013 at 7:39 AM, bin.cheng wrote: >> > > I don't think you need > > + /* Sign extend off if expr is in type which has lower precision > + than HOST_WIDE_INT. */ > + if (TYPE_PRECISION (TREE_TYPE (expr)) <= HOST_BITS_P

Re: [PATCH]Fix computation of offset in ivopt

2013-10-02 Thread Bin.Cheng
Sorry that I don't understand tree type system well, so here are two more questions, could you please explain little bit more? Thanks very much. On Tue, Oct 1, 2013 at 6:50 PM, Richard Biener wrote: > On Mon, Sep 30, 2013 at 7:39 AM, bin.cheng wrote: > > I don't think you need > > + /* Sign ex

Re: [PATCH]Fix computation of offset in ivopt

2013-10-02 Thread Richard Biener
On Tue, Oct 1, 2013 at 6:13 PM, Bin.Cheng wrote: > On Tue, Oct 1, 2013 at 6:50 PM, Richard Biener > wrote: >> On Mon, Sep 30, 2013 at 7:39 AM, bin.cheng wrote: >>> >>> >> >> I don't think you need >> >> + /* Sign extend off if expr is in type which has lower precision >> + than HOST_WIDE_IN

Re: [PATCH]Fix computation of offset in ivopt

2013-10-01 Thread Bin.Cheng
On Tue, Oct 1, 2013 at 6:50 PM, Richard Biener wrote: > On Mon, Sep 30, 2013 at 7:39 AM, bin.cheng wrote: >> >> > > I don't think you need > > + /* Sign extend off if expr is in type which has lower precision > + than HOST_WIDE_INT. */ > + if (TYPE_PRECISION (TREE_TYPE (expr)) <= HOST_BITS

Re: [PATCH]Fix computation of offset in ivopt

2013-10-01 Thread Richard Biener
On Mon, Sep 30, 2013 at 7:39 AM, bin.cheng wrote: > > >> -Original Message- >> From: Richard Biener [mailto:richard.guent...@gmail.com] >> Sent: Friday, September 27, 2013 4:30 PM >> To: Bin Cheng >> Cc: GCC Patches >> Subject: Re: [PATCH]Fix c

RE: [PATCH]Fix computation of offset in ivopt

2013-09-29 Thread bin.cheng
> -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Oleg Endo > Sent: Wednesday, September 25, 2013 1:41 AM > To: Richard Biener > Cc: Bin Cheng; GCC Patches > Subject: Re: [PATCH]Fix computati

RE: [PATCH]Fix computation of offset in ivopt

2013-09-29 Thread bin.cheng
> -Original Message- > From: Richard Biener [mailto:richard.guent...@gmail.com] > Sent: Friday, September 27, 2013 4:30 PM > To: Bin Cheng > Cc: GCC Patches > Subject: Re: [PATCH]Fix computation of offset in ivopt > > On Fri, Sep 27, 2013 at 7:07 AM, bin.cheng w

Re: [PATCH]Fix computation of offset in ivopt

2013-09-27 Thread Richard Biener
On Fri, Sep 27, 2013 at 7:07 AM, bin.cheng wrote: > > >> -Original Message- >> From: Richard Biener [mailto:richard.guent...@gmail.com] >> Sent: Tuesday, September 24, 2013 6:31 PM >> To: Bin Cheng >> Cc: GCC Patches >> Subject: Re: [PATCH]Fix c

RE: [PATCH]Fix computation of offset in ivopt

2013-09-27 Thread bin.cheng
> -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of bin.cheng > Sent: Friday, September 27, 2013 1:07 PM > To: 'Richard Biener' > Cc: GCC Patches > Subject: RE: [PATCH]Fix

RE: [PATCH]Fix computation of offset in ivopt

2013-09-26 Thread bin.cheng
> -Original Message- > From: Richard Biener [mailto:richard.guent...@gmail.com] > Sent: Tuesday, September 24, 2013 6:31 PM > To: Bin Cheng > Cc: GCC Patches > Subject: Re: [PATCH]Fix computation of offset in ivopt > > On Tue, Sep 24, 2013 at 11

Re: [PATCH]Fix computation of offset in ivopt

2013-09-24 Thread Oleg Endo
On Tue, 2013-09-24 at 12:31 +0200, Richard Biener wrote: > On Tue, Sep 24, 2013 at 11:13 AM, bin.cheng wrote: > > Hi, > > This patch fix two minor bugs when computing offset in IVOPT. > > 1) Considering below example: > > #define MAX 100 > > struct tag > > { > > int i; > > int j; > > } > > str

Re: [PATCH]Fix computation of offset in ivopt

2013-09-24 Thread Richard Biener
On Tue, Sep 24, 2013 at 11:13 AM, bin.cheng wrote: > Hi, > This patch fix two minor bugs when computing offset in IVOPT. > 1) Considering below example: > #define MAX 100 > struct tag > { > int i; > int j; > } > struct tag arr[MAX] > > int foo (int len) > { > int i = 0; > for (; i < len; i

[PATCH]Fix computation of offset in ivopt

2013-09-24 Thread bin.cheng
Hi, This patch fix two minor bugs when computing offset in IVOPT. 1) Considering below example: #define MAX 100 struct tag { int i; int j; } struct tag arr[MAX] int foo (int len) { int i = 0; for (; i < len; i++) { access arr[i].j; } } Without this patch, the offset computed by st