Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-25 Thread Eric Botcazou
Sorry for missing this problem when committing Kugan's patch. I have just committed the attached patch, which I hope fixes all the spaces/indentation issues introduced. Thanks a lot! -- Eric Botcazou

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-24 Thread Richard Biener
On Mon, Sep 23, 2013 at 10:34 PM, Eric Botcazou ebotca...@adacore.com wrote: I have committed it for you (rev 202831), with a few modifications (ChangeLog formatting, typos). Here is what I have committed: 2013-09-23 Kugan Vivekanandarajah kug...@linaro.org * gimple-pretty-print.c

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-24 Thread Kugan
On 24/09/13 19:23, Richard Biener wrote: On Mon, Sep 23, 2013 at 10:34 PM, Eric Botcazou ebotca...@adacore.com wrote: I have committed it for you (rev 202831), with a few modifications (ChangeLog formatting, typos). Here is what I have committed: 2013-09-23 Kugan Vivekanandarajah

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-24 Thread Richard Biener
On Tue, 24 Sep 2013, Richard Biener wrote: On Mon, Sep 23, 2013 at 10:34 PM, Eric Botcazou ebotca...@adacore.com wrote: I have committed it for you (rev 202831), with a few modifications (ChangeLog formatting, typos). Here is what I have committed: 2013-09-23 Kugan Vivekanandarajah

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-24 Thread Christophe Lyon
On 23 September 2013 22:34, Eric Botcazou ebotca...@adacore.com wrote: Nice patch, but the formatting is totally wrong wrt spaces, please reformat using 2-space indentation and 8-space TABs, as already used in the files. Sorry for missing this problem when committing Kugan's patch. I have

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-23 Thread Richard Biener
On Thu, Sep 19, 2013 at 7:07 AM, Kugan kugan.vivekanandara...@linaro.org wrote: Thanks Richard for the review. On 18/09/13 18:55, Richard Biener wrote: On Wed, 18 Sep 2013, Kugan wrote: Thanks Richard for the review. On 16/09/13 23:43, Richard Biener wrote: On Mon, 16 Sep 2013, Kugan

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-23 Thread Christophe Lyon
Kugan, I have changed all of the above in the attached patch and ChangeLog. If this is OK, could someone please commit it for me. I don’t have access to commit it. Bootstrapped and regtested on x86_64-unknown-linux-gnu and arm-none linux-gnueabi. Ok. Thanks and sorry that it took so

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-23 Thread Eric Botcazou
I have committed it for you (rev 202831), with a few modifications (ChangeLog formatting, typos). Here is what I have committed: 2013-09-23 Kugan Vivekanandarajah kug...@linaro.org * gimple-pretty-print.c (dump_ssaname_info): New function. (dump_gimple_phi): Call it.

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-18 Thread Richard Earnshaw
On 16/09/13 15:13, Richard Biener wrote: +void +get_range_info (tree name, double_int min, double_int max, +enum value_range_type range_type) I'm not sure we want to use references. Well - first time. Personally, I don't think we should ever allow non-const references. Use

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-18 Thread Richard Biener
On Wed, 18 Sep 2013, Richard Earnshaw wrote: On 16/09/13 15:13, Richard Biener wrote: +void +get_range_info (tree name, double_int min, double_int max, +enum value_range_type range_type) I'm not sure we want to use references. Well - first time. Personally, I don't

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-18 Thread Jakub Jelinek
On Wed, Sep 18, 2013 at 10:57:57AM +0200, Richard Biener wrote: On Wed, 18 Sep 2013, Richard Earnshaw wrote: On 16/09/13 15:13, Richard Biener wrote: +void +get_range_info (tree name, double_int min, double_int max, +enum value_range_type range_type) I'm not

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-18 Thread Jan Hubicka
On Wed, Sep 18, 2013 at 10:57:57AM +0200, Richard Biener wrote: On Wed, 18 Sep 2013, Richard Earnshaw wrote: On 16/09/13 15:13, Richard Biener wrote: +void +get_range_info (tree name, double_int min, double_int max, +enum value_range_type range_type)

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-18 Thread Richard Biener
On Wed, 18 Sep 2013, Kugan wrote: Thanks Richard for the review. On 16/09/13 23:43, Richard Biener wrote: On Mon, 16 Sep 2013, Kugan wrote: Hi, Updated the patch to the latest changes in trunk that splits tree.h. I also noticed an error in printing double_int and fixed

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-18 Thread Richard Biener
On Wed, 18 Sep 2013, Jan Hubicka wrote: On Wed, Sep 18, 2013 at 10:57:57AM +0200, Richard Biener wrote: On Wed, 18 Sep 2013, Richard Earnshaw wrote: On 16/09/13 15:13, Richard Biener wrote: +void +get_range_info (tree name, double_int min, double_int max, +

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-18 Thread Kugan
Thanks Richard for the review. On 18/09/13 18:55, Richard Biener wrote: On Wed, 18 Sep 2013, Kugan wrote: Thanks Richard for the review. On 16/09/13 23:43, Richard Biener wrote: On Mon, 16 Sep 2013, Kugan wrote: [Snip] +2013-09-17 Kugan Vivekanandarajah kug...@linaro.org + + *

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-17 Thread Kugan
Thanks Richard for the review. On 16/09/13 23:43, Richard Biener wrote: On Mon, 16 Sep 2013, Kugan wrote: Hi, Updated the patch to the latest changes in trunk that splits tree.h. I also noticed an error in printing double_int and fixed it. Is this OK? print_gimple_stmt (dump_file,

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-16 Thread Richard Biener
On Mon, 16 Sep 2013, Kugan wrote: Hi, Updated the patch to the latest changes in trunk that splits tree.h. I also noticed an error in printing double_int and fixed it. Is this OK? print_gimple_stmt (dump_file, stmt, 0, -TDF_SLIM | (dump_flags TDF_LINENO));

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-15 Thread Kugan
Hi, Updated the patch to the latest changes in trunk that splits tree.h. I also noticed an error in printing double_int and fixed it. Is this OK? Thanks, Kugan +2013-09-12 Kugan Vivekanandarajah kug...@linaro.org + + * cfgexpand.c (maybe_dump_rtl_for_gimple_stmt) : Add range to

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-12 Thread Kugan
Here is the modified patch that addresses the comments form Richard and Jakub. This also includes: 1. Added TDF_RANGE to dump range_info 2. Moved enum value_range_type to tree.h (Is this the right place?) Bootstrapped and regtested for x86_64-unknown-linux-gnu and arm-none linux-gnueabi.

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-11 Thread Richard Biener
On Wed, 11 Sep 2013, Kugan wrote: Thanks Jakub for the review. On 10/09/13 23:10, Jakub Jelinek wrote: On Tue, Sep 10, 2013 at 03:17:50PM +0200, Richard Biener wrote: unsigned short s; s.1_3 = (short unsigned int) l.0_2; l.0_2: VARYING s.1_3: [0, +INF] Note that [0,

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-11 Thread Jakub Jelinek
On Wed, Sep 11, 2013 at 11:02:30AM +0200, Richard Biener wrote: Make sure to add a predicate that can tell whether its an anti-range then. Or perhaps extraction routine, that given an SSA_NAME will give you a triplet, { enum value_range_type vr_type; double_int min, max; } For non-integral

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-11 Thread Richard Biener
On Wed, 11 Sep 2013, Jakub Jelinek wrote: On Wed, Sep 11, 2013 at 11:02:30AM +0200, Richard Biener wrote: Make sure to add a predicate that can tell whether its an anti-range then. Or perhaps extraction routine, that given an SSA_NAME will give you a triplet, { enum value_range_type

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-10 Thread Richard Biener
On Tue, 10 Sep 2013, Kugan wrote: On 09/09/13 19:01, Richard Biener wrote: On Mon, Sep 9, 2013 at 1:09 AM, Kugan kugan.vivekanandara...@linaro.org wrote: On 06/09/13 16:16, Richard Biener wrote: On 9/3/13 2:15 PM, Kugan wrote: Thanks Richard for reviewing.

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-10 Thread Jakub Jelinek
On Tue, Sep 10, 2013 at 03:17:50PM +0200, Richard Biener wrote: unsigned short s; s.1_3 = (short unsigned int) l.0_2; l.0_2: VARYING s.1_3: [0, +INF] Note that [0, +INF] is the same as VARYING and [-INF, +INF] and VARYING for l.0_2 is the same as [-INF, +INF]. Yeah, I don't see much

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-10 Thread Kugan
On 10/09/13 22:47, Richard Biener wrote: On Tue, 10 Sep 2013, Kugan wrote: On 09/09/13 19:01, Richard Biener wrote: On Mon, Sep 9, 2013 at 1:09 AM, Kugan kugan.vivekanandara...@linaro.org wrote: On 06/09/13 16:16, Richard Biener wrote: On 9/3/13 2:15 PM, Kugan wrote: Thanks Richard for

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-09 Thread Richard Biener
On Mon, Sep 9, 2013 at 1:09 AM, Kugan kugan.vivekanandara...@linaro.org wrote: On 06/09/13 16:16, Richard Biener wrote: On 9/3/13 2:15 PM, Kugan wrote: Thanks Richard for reviewing. On 02/09/13 22:15, Richard Biener wrote: On Wed, Jul 3, 2013 at 2:25 PM, Kugan

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-09 Thread Kugan
On 09/09/13 19:01, Richard Biener wrote: On Mon, Sep 9, 2013 at 1:09 AM, Kugan kugan.vivekanandara...@linaro.org wrote: On 06/09/13 16:16, Richard Biener wrote: On 9/3/13 2:15 PM, Kugan wrote: Thanks Richard for reviewing. On 02/09/13 22:15, Richard Biener wrote: On Wed, Jul 3, 2013 at

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-08 Thread Kugan
On 06/09/13 16:16, Richard Biener wrote: On 9/3/13 2:15 PM, Kugan wrote: Thanks Richard for reviewing. On 02/09/13 22:15, Richard Biener wrote: On Wed, Jul 3, 2013 at 2:25 PM, Kugan kugan.vivekanandara...@linaro.org wrote: On 17/06/13 18:33, Richard Biener wrote: On Mon, 17 Jun 2013,

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-06 Thread Richard Biener
On 9/3/13 2:15 PM, Kugan wrote: Thanks Richard for reviewing. On 02/09/13 22:15, Richard Biener wrote: On Wed, Jul 3, 2013 at 2:25 PM, Kugan kugan.vivekanandara...@linaro.org wrote: On 17/06/13 18:33, Richard Biener wrote: On Mon, 17 Jun 2013, Kugan wrote: +/* Extract the value range of

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-03 Thread Kugan
Thanks Richard for reviewing. On 02/09/13 22:15, Richard Biener wrote: On Wed, Jul 3, 2013 at 2:25 PM, Kugan kugan.vivekanandara...@linaro.org wrote: On 17/06/13 18:33, Richard Biener wrote: On Mon, 17 Jun 2013, Kugan wrote: +/* Extract the value range of assigned exprassion for

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-02 Thread Kugan
I'd like to ping this patch 1 of 2 that removes redundant zero/sign extension using value range information. Bootstrapped and no new regression for x86_64-unknown-linux-gnu and arm-none-linux-gnueabi. Thanks you for your time. Kugan n 14/08/13 16:49, Kugan wrote: Hi Richard, Here is an

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-09-02 Thread Richard Biener
On Wed, Jul 3, 2013 at 2:25 PM, Kugan kugan.vivekanandara...@linaro.org wrote: On 17/06/13 18:33, Richard Biener wrote: On Mon, 17 Jun 2013, Kugan wrote: +/* Extract the value range of assigned exprassion for GIMPLE_ASSIGN stmt. + If the extracted value range is valid, return true else

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-08-14 Thread Kugan
Hi Richard, Here is an attempt to address your earlier review comments. Bootstrapped and there is no new regression for X86_64 and arm. Thank you very much for your time. Thanks, Kugan --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,25 @@ +2013-08-14 Kugan Vivekanandarajah

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-07-03 Thread Kugan
On 17/06/13 18:33, Richard Biener wrote: On Mon, 17 Jun 2013, Kugan wrote: +/* Extract the value range of assigned exprassion for GIMPLE_ASSIGN stmt. + If the extracted value range is valid, return true else return + false. */ +static bool +extract_exp_value_range (gimple stmt,

Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-06-17 Thread Richard Biener
On Mon, 17 Jun 2013, Kugan wrote: Can you please help to review this patch? Richard reviewed the original patch and asked it to be split into two parts. Also, he wanted a review from RTL maintainer for the RTL changes. Thanks, Kugan On 03/06/13 11:43, Kugan wrote: Hi, This patch

[ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL

2013-06-16 Thread Kugan
Can you please help to review this patch? Richard reviewed the original patch and asked it to be split into two parts. Also, he wanted a review from RTL maintainer for the RTL changes. Thanks, Kugan On 03/06/13 11:43, Kugan wrote: Hi, This patch adds value range information to tree SSA_NAME