Re: [PATCH][PR tree-optimization/69270] Exploit VRP information in DOM

2016-02-28 Thread H.J. Lu
On Fri, Jan 15, 2016 at 2:32 PM, Jeff Law wrote: > On 01/14/2016 11:14 AM, Jeff Law wrote: >> >> On 01/14/2016 12:49 AM, Jakub Jelinek wrote: >>> >>> On Thu, Jan 14, 2016 at 08:46:43AM +0100, Jakub Jelinek wrote: On Thu, Jan 14, 2016 at 12:38:52AM -0700, Jeff Law wrote: > > + /*

Re: [PATCH][PR tree-optimization/69270] Exploit VRP information in DOM

2016-01-18 Thread Kyrill Tkachov
On 18/01/16 11:49, Jakub Jelinek wrote: On Mon, Jan 18, 2016 at 11:38:37AM +, Kyrill Tkachov wrote: On 18/01/16 11:31, Andreas Schwab wrote: Jeff Law writes: commit 1384b36abcd52a7ac72ca6538afa2aed2e04f8e0 Author: Jeff Law Date: Fri Jan 15 17:15:24 2016 -0500 PR tree-optimiz

Re: [PATCH][PR tree-optimization/69270] Exploit VRP information in DOM

2016-01-18 Thread Jakub Jelinek
On Mon, Jan 18, 2016 at 11:38:37AM +, Kyrill Tkachov wrote: > On 18/01/16 11:31, Andreas Schwab wrote: > >Jeff Law writes: > > > >>commit 1384b36abcd52a7ac72ca6538afa2aed2e04f8e0 > >>Author: Jeff Law > >>Date: Fri Jan 15 17:15:24 2016 -0500 > >> > >>PR tree-optimization/69270 >

Re: [PATCH][PR tree-optimization/69270] Exploit VRP information in DOM

2016-01-18 Thread Kyrill Tkachov
On 18/01/16 11:31, Andreas Schwab wrote: Jeff Law writes: commit 1384b36abcd52a7ac72ca6538afa2aed2e04f8e0 Author: Jeff Law Date: Fri Jan 15 17:15:24 2016 -0500 PR tree-optimization/69270 * tree-ssanames.c (ssa_name_has_boolean_range): Moved here from tree-ssa-dom.c

Re: [PATCH][PR tree-optimization/69270] Exploit VRP information in DOM

2016-01-18 Thread Andreas Schwab
Jeff Law writes: > commit 1384b36abcd52a7ac72ca6538afa2aed2e04f8e0 > Author: Jeff Law > Date: Fri Jan 15 17:15:24 2016 -0500 > > PR tree-optimization/69270 > * tree-ssanames.c (ssa_name_has_boolean_range): Moved here from > tree-ssa-dom.c. Improve test for [0..1] ranve from

Re: [PATCH][PR tree-optimization/69270] Exploit VRP information in DOM

2016-01-15 Thread Jakub Jelinek
On Fri, Jan 15, 2016 at 03:32:33PM -0700, Jeff Law wrote: > +bool > +ssa_name_has_boolean_range (tree op) > +{ > + gcc_assert (TREE_CODE (op) == SSA_NAME); > + > + /* Boolean types always have a range [0..1]. */ > + if (TREE_CODE (TREE_TYPE (op)) == BOOLEAN_TYPE) > +return true; > + > + /*

Re: [PATCH][PR tree-optimization/69270] Exploit VRP information in DOM

2016-01-15 Thread Jeff Law
On 01/14/2016 11:14 AM, Jeff Law wrote: On 01/14/2016 12:49 AM, Jakub Jelinek wrote: On Thu, Jan 14, 2016 at 08:46:43AM +0100, Jakub Jelinek wrote: On Thu, Jan 14, 2016 at 12:38:52AM -0700, Jeff Law wrote: + /* An integral type with more precision, but the object + only takes on values [0

Re: [PATCH][PR tree-optimization/69270] Exploit VRP information in DOM

2016-01-14 Thread Jeff Law
On 01/14/2016 11:27 AM, Jeff Law wrote: Apart from what Jakub said we have constant_boolean_node for this, true_val = constant_boolean_node (true, TREE_TYPE (op0)); Will update. Thanks. Here's the patch which uses constant_boolean_node and verifies the type is unsigned when it has a sing

Re: [PATCH][PR tree-optimization/69270] Exploit VRP information in DOM

2016-01-14 Thread Jeff Law
On 01/14/2016 02:47 AM, Richard Biener wrote: On Thu, Jan 14, 2016 at 8:38 AM, Jeff Law wrote: As noted in the BZ, DOM does not exploit VRP information to create additional equivalences in the arms of conditionals. This can cause DOM to miss relatively simple optimizations that show up in the

Re: [PATCH][PR tree-optimization/69270] Exploit VRP information in DOM

2016-01-14 Thread Jeff Law
On 01/14/2016 12:49 AM, Jakub Jelinek wrote: On Thu, Jan 14, 2016 at 08:46:43AM +0100, Jakub Jelinek wrote: On Thu, Jan 14, 2016 at 12:38:52AM -0700, Jeff Law wrote: + /* An integral type with more precision, but the object + only takes on values [0..1] as determined by VRP + analysis.

Re: [PATCH][PR tree-optimization/69270] Exploit VRP information in DOM

2016-01-14 Thread Richard Biener
On Thu, Jan 14, 2016 at 8:38 AM, Jeff Law wrote: > > As noted in the BZ, DOM does not exploit VRP information to create > additional equivalences in the arms of conditionals. > > This can cause DOM to miss relatively simple optimizations that show up in > the adpcm benchmark as well as within GCC

Re: [PATCH][PR tree-optimization/69270] Exploit VRP information in DOM

2016-01-13 Thread Jakub Jelinek
On Thu, Jan 14, 2016 at 08:46:43AM +0100, Jakub Jelinek wrote: > On Thu, Jan 14, 2016 at 12:38:52AM -0700, Jeff Law wrote: > > + /* An integral type with more precision, but the object > > + only takes on values [0..1] as determined by VRP > > + analysis. */ > > + wide_int min, max; > >

Re: [PATCH][PR tree-optimization/69270] Exploit VRP information in DOM

2016-01-13 Thread Jakub Jelinek
On Thu, Jan 14, 2016 at 12:38:52AM -0700, Jeff Law wrote: > + /* An integral type with more precision, but the object > + only takes on values [0..1] as determined by VRP > + analysis. */ > + wide_int min, max; > + if (INTEGRAL_TYPE_P (TREE_TYPE (op)) > + && get_range_info (op, &mi