Re: [PATCH 2/3]Improve induction variable elimination

2014-08-14 Thread Bin.Cheng
On Thu, Aug 14, 2014 at 11:29 PM, Sebastian Pop wrote: > Bin.Cheng wrote: >> >> The overflow check can be improved by using deeper inspection to prove the >> >> equality. This patch deals with that by making below two improvements: >> >> a) Handles constant cases. >> >> b) Uses affine expansi

Re: [PATCH 2/3]Improve induction variable elimination

2014-08-14 Thread Sebastian Pop
Bin.Cheng wrote: > >> The overflow check can be improved by using deeper inspection to prove the > >> equality. This patch deals with that by making below two improvements: > >> a) Handles constant cases. > >> b) Uses affine expansion as deeper inspection to check the equality. Looks good to

Re: [PATCH 2/3]Improve induction variable elimination

2014-08-14 Thread Bin.Cheng
On Fri, Jul 25, 2014 at 8:35 PM, Richard Biener wrote: > On Thu, Jul 17, 2014 at 11:08 AM, Bin Cheng wrote: >> Hi, >> As quoted from the function difference_cannot_overflow_p, >> >> /* TODO: deeper inspection may be necessary to prove the equality. */ >> switch (code) >> { >> case PL

Re: [PATCH 2/3]Improve induction variable elimination

2014-08-06 Thread Bin.Cheng
Forgot the patch~ On Wed, Aug 6, 2014 at 10:32 AM, Bin.Cheng wrote: > On Fri, Jul 25, 2014 at 8:35 PM, Richard Biener > wrote: >> On Thu, Jul 17, 2014 at 11:08 AM, Bin Cheng wrote: >>> Hi, >>> As quoted from the function difference_cannot_overflow_p, >>> >>> /* TODO: deeper inspection may be

Re: [PATCH 2/3]Improve induction variable elimination

2014-08-05 Thread Bin.Cheng
On Fri, Jul 25, 2014 at 8:35 PM, Richard Biener wrote: > On Thu, Jul 17, 2014 at 11:08 AM, Bin Cheng wrote: >> Hi, >> As quoted from the function difference_cannot_overflow_p, >> >> /* TODO: deeper inspection may be necessary to prove the equality. */ >> switch (code) >> { >> case PL

Re: [PATCH 2/3]Improve induction variable elimination

2014-07-25 Thread Bin.Cheng
On Fri, Jul 25, 2014 at 1:35 PM, Richard Biener wrote: > On Thu, Jul 17, 2014 at 11:08 AM, Bin Cheng wrote: >> Hi, >> As quoted from the function difference_cannot_overflow_p, >> >> /* TODO: deeper inspection may be necessary to prove the equality. */ >> switch (code) >> { >> case PL

Re: [PATCH 2/3]Improve induction variable elimination

2014-07-25 Thread Richard Biener
On Thu, Jul 17, 2014 at 11:08 AM, Bin Cheng wrote: > Hi, > As quoted from the function difference_cannot_overflow_p, > > /* TODO: deeper inspection may be necessary to prove the equality. */ > switch (code) > { > case PLUS_EXPR: > return expr_equal_p (e1, offset) || expr_equal_p

[PATCH 2/3]Improve induction variable elimination

2014-07-17 Thread Bin Cheng
Hi, As quoted from the function difference_cannot_overflow_p, /* TODO: deeper inspection may be necessary to prove the equality. */ switch (code) { case PLUS_EXPR: return expr_equal_p (e1, offset) || expr_equal_p (e2, offset); case POINTER_PLUS_EXPR: return expr_equal_