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

2014-08-15 Thread Bin.Cheng
On Thu, Aug 14, 2014 at 11:29 PM, Sebastian Pop seb...@gmail.com 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

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 richard.guent...@gmail.com wrote: On Thu, Jul 17, 2014 at 11:08 AM, Bin Cheng bin.ch...@arm.com wrote: Hi, As quoted from the function difference_cannot_overflow_p, /* TODO: deeper inspection may be necessary to prove the equality. */

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 me.

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 amker.ch...@gmail.com wrote: On Fri, Jul 25, 2014 at 8:35 PM, Richard Biener richard.guent...@gmail.com wrote: On Thu, Jul 17, 2014 at 11:08 AM, Bin Cheng bin.ch...@arm.com wrote: Hi, As quoted from the function

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 richard.guent...@gmail.com wrote: On Thu, Jul 17, 2014 at 11:08 AM, Bin Cheng bin.ch...@arm.com wrote: Hi, As quoted from the function difference_cannot_overflow_p, /* TODO: deeper inspection may be necessary to prove the equality. */

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 bin.ch...@arm.com 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) ||

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 richard.guent...@gmail.com wrote: On Thu, Jul 17, 2014 at 11:08 AM, Bin Cheng bin.ch...@arm.com wrote: Hi, As quoted from the function difference_cannot_overflow_p, /* TODO: deeper inspection may be necessary to prove the equality. */

[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