Re: [PATCH 2/5] completely_scalarize arrays as well as records.

2015-09-18 Thread Richard Biener
On Thu, 17 Sep 2015, Alan Lawrence wrote: > On 15/09/15 08:43, Richard Biener wrote: > > > > Sorry for chiming in so late... > > Not at all, TYVM for your help! > > > TREE_CONSTANT isn't the correct thing to test. You should use > > TREE_CODE () == INTEGER_CST instead. > > Done (in some

Re: [PATCH 2/5] completely_scalarize arrays as well as records.

2015-09-17 Thread Alan Lawrence
On 15/09/15 08:43, Richard Biener wrote: > > Sorry for chiming in so late... Not at all, TYVM for your help! > TREE_CONSTANT isn't the correct thing to test. You should use > TREE_CODE () == INTEGER_CST instead. Done (in some cases, via tree_fits_shwi_p). > Also you need to handle > NULL_TREE

Re: [PATCH 2/5] completely_scalarize arrays as well as records.

2015-09-15 Thread Richard Biener
On Mon, 14 Sep 2015, Alan Lawrence wrote: > Ping. (Rerevert with 5 lines extra paranoia in scalarizable_type_p). Sorry for chiming in so late... + if (TYPE_DOMAIN (type) == NULL_TREE + || !TREE_CONSTANT (TYPE_MIN_VALUE (TYPE_DOMAIN (type))) + || !TREE_CONSTANT

Re: [PATCH 2/5] completely_scalarize arrays as well as records.

2015-09-14 Thread Alan Lawrence
Ping. (Rerevert with 5 lines extra paranoia in scalarizable_type_p). Thanks, Alan On 08/09/15 13:43, Martin Jambor wrote: Hi, On Mon, Sep 07, 2015 at 02:15:45PM +0100, Alan Lawrence wrote: In-Reply-To: <55e0697d.2010...@arm.com> On 28/08/15 16:08, Alan Lawrence wrote: Alan Lawrence wrote:

Re: [PATCH 2/5] completely_scalarize arrays as well as records.

2015-09-08 Thread Martin Jambor
Hi, On Mon, Sep 07, 2015 at 02:15:45PM +0100, Alan Lawrence wrote: > In-Reply-To: <55e0697d.2010...@arm.com> > > On 28/08/15 16:08, Alan Lawrence wrote: > > Alan Lawrence wrote: > >> > >> Right. I think VLA's are the problem with pr64312.C also. I'm testing a fix > >> (that declares arrays with

Re: [PATCH 2/5] completely_scalarize arrays as well as records.

2015-09-07 Thread Alan Lawrence
In-Reply-To: <55e0697d.2010...@arm.com> On 28/08/15 16:08, Alan Lawrence wrote: > Alan Lawrence wrote: >> >> Right. I think VLA's are the problem with pr64312.C also. I'm testing a fix >> (that declares arrays with any of these properties as unscalarizable). > ... > In the meantime I've reverted

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-28 Thread Richard Biener
On Fri, 28 Aug 2015, Christophe Lyon wrote: On 27 August 2015 at 17:43, Alan Lawrence alan.lawre...@arm.com wrote: Martin Jambor wrote: First, I would be much happier if you added a proper comment to scalarize_elem function which you forgot completely. The name is not very descriptive

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-28 Thread Christophe Lyon
On 27 August 2015 at 17:43, Alan Lawrence alan.lawre...@arm.com wrote: Martin Jambor wrote: First, I would be much happier if you added a proper comment to scalarize_elem function which you forgot completely. The name is not very descriptive and it has quite few parameters too. Second,

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-28 Thread Richard Biener
On Fri, 28 Aug 2015, Christophe Lyon wrote: On 28 August 2015 at 09:48, Richard Biener rguent...@suse.de wrote: On Fri, 28 Aug 2015, Christophe Lyon wrote: On 27 August 2015 at 17:43, Alan Lawrence alan.lawre...@arm.com wrote: Martin Jambor wrote: First, I would be much happier

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-28 Thread Christophe Lyon
On 28 August 2015 at 09:48, Richard Biener rguent...@suse.de wrote: On Fri, 28 Aug 2015, Christophe Lyon wrote: On 27 August 2015 at 17:43, Alan Lawrence alan.lawre...@arm.com wrote: Martin Jambor wrote: First, I would be much happier if you added a proper comment to scalarize_elem

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-28 Thread Alan Lawrence
Christophe Lyon wrote: I asked because I assumed that Alan saw it pass in his configuration. Bah. No - I now discover a problem in my C++ testsuite setup that was causing a large number of tests to not be executed. I see the problem too now, investigating --Alan

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-28 Thread Alan Lawrence
Richard Biener wrote: On Fri, 28 Aug 2015, Alan Lawrence wrote: Christophe Lyon wrote: I asked because I assumed that Alan saw it pass in his configuration. Bah. No - I now discover a problem in my C++ testsuite setup that was causing a large number of tests to not be executed. I see the

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-28 Thread Richard Biener
On Fri, 28 Aug 2015, Alan Lawrence wrote: Christophe Lyon wrote: I asked because I assumed that Alan saw it pass in his configuration. Bah. No - I now discover a problem in my C++ testsuite setup that was causing a large number of tests to not be executed. I see the problem too now,

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-28 Thread Alan Lawrence
Alan Lawrence wrote: Right. I think VLA's are the problem with pr64312.C also. I'm testing a fix (that declares arrays with any of these properties as unscalarizable). Monday is a bank holiday in UK and so I expect to get back to you on Tuesday. --Alan In the meantime I've reverted the

Fixing sra-12.c (was: Re: [PATCH 2/5] completely_scalarize arrays as well as records)

2015-08-27 Thread Alan Lawrence
Jeff Law wrote: diff --git a/gcc/testsuite/gcc.dg/tree-ssa/sra-15.c b/gcc/testsuite/gcc.dg/tree-ssa/sra-15.c new file mode 100644 index 000..e251058 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/sra-15.c @@ -0,0 +1,38 @@ +/* Verify that SRA total scalarization works on records

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-27 Thread Alan Lawrence
Martin Jambor wrote: First, I would be much happier if you added a proper comment to scalarize_elem function which you forgot completely. The name is not very descriptive and it has quite few parameters too. Second, this patch should also fix PR 67283. It would be great if you could

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-26 Thread Richard Biener
On August 26, 2015 6:08:55 PM GMT+02:00, Alan Lawrence alan.lawre...@arm.com wrote: Richard Biener wrote: One extra question is does the way we limit total scalarization work well for arrays? I suppose we have either sth like the maximum size of an aggregate we scalarize or the maximum

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-26 Thread Richard Biener
On Tue, Aug 25, 2015 at 11:44 PM, Jeff Law l...@redhat.com wrote: On 08/25/2015 03:42 PM, Martin Jambor wrote: Hi, On Tue, Aug 25, 2015 at 12:06:14PM +0100, Alan Lawrence wrote: This changes the completely_scalarize_record path to also work on arrays (thus allowing records containing

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-26 Thread Alan Lawrence
Richard Biener wrote: One extra question is does the way we limit total scalarization work well for arrays? I suppose we have either sth like the maximum size of an aggregate we scalarize or the maximum number of component accesses we create? Only the former and that would be kept intact.

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-26 Thread Richard Biener
On August 26, 2015 11:30:26 AM GMT+02:00, Martin Jambor mjam...@suse.cz wrote: Hi, On Wed, Aug 26, 2015 at 09:07:33AM +0200, Richard Biener wrote: On Tue, Aug 25, 2015 at 11:44 PM, Jeff Law l...@redhat.com wrote: On 08/25/2015 03:42 PM, Martin Jambor wrote: Hi, On Tue, Aug 25, 2015 at

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-26 Thread Martin Jambor
Hi, On Wed, Aug 26, 2015 at 09:07:33AM +0200, Richard Biener wrote: On Tue, Aug 25, 2015 at 11:44 PM, Jeff Law l...@redhat.com wrote: On 08/25/2015 03:42 PM, Martin Jambor wrote: Hi, On Tue, Aug 25, 2015 at 12:06:14PM +0100, Alan Lawrence wrote: This changes the

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-25 Thread Jeff Law
On 08/25/2015 05:06 AM, Alan Lawrence wrote: This changes the completely_scalarize_record path to also work on arrays (thus allowing records containing arrays, etc.). This just required extending the existing type_consists_of_records_p and completely_scalarize_record methods to handle things of

[PATCH 2/5] completely_scalarize arrays as well as records

2015-08-25 Thread Alan Lawrence
This changes the completely_scalarize_record path to also work on arrays (thus allowing records containing arrays, etc.). This just required extending the existing type_consists_of_records_p and completely_scalarize_record methods to handle things of ARRAY_TYPE as well as RECORD_TYPE. Hence, I

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-25 Thread Martin Jambor
Hi, On Tue, Aug 25, 2015 at 12:06:14PM +0100, Alan Lawrence wrote: This changes the completely_scalarize_record path to also work on arrays (thus allowing records containing arrays, etc.). This just required extending the existing type_consists_of_records_p and completely_scalarize_record

Re: [PATCH 2/5] completely_scalarize arrays as well as records

2015-08-25 Thread Jeff Law
On 08/25/2015 03:42 PM, Martin Jambor wrote: Hi, On Tue, Aug 25, 2015 at 12:06:14PM +0100, Alan Lawrence wrote: This changes the completely_scalarize_record path to also work on arrays (thus allowing records containing arrays, etc.). This just required extending the existing