From: Richard Sandiford <rdsandiford@googlemail.com>
To: ebotcazou@libertysurf.fr
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
Richard Biener <richard.guenther@gmail.com>
Subject: [PING*3, Ada] Re: Handle data dependence relations with different bases
Date: Thu, 29 Jun 2017 17:20:00 -0000 [thread overview]
Message-ID: <87tw2yk8x1.fsf_-_@googlemail.com> (raw)
In-Reply-To: <877f04z25q.fsf_-_@linaro.org> (Richard Sandiford's message of "Thu, 22 Jun 2017 12:34:41 +0100")
Ping*3
Richard Sandiford <richard.sandiford@linaro.org> writes:
> Ping*2
>
> Richard Sandiford <richard.sandiford@linaro.org> writes:
>> Ping for this Ada patch/question.
>>
>> Richard Sandiford <richard.sandiford@linaro.org> writes:
>>> Richard Biener <richard.guenther@gmail.com> writes:
>>>>>> How does this look? Changes since v1:
>>>>>>
>>>>>> - Added access_fn_component_p to check for valid access function
>>>>>> components.
>>>>>>
>>>>>> - Added access_fn_components_comparable_p instead of using
>>>>>> types_compatibloe_p directly.
>>>>>>
>>>>>> - Added more commentary.
>>>>>>
>>>>>> - Added local structures to represent the sequence, so that it's
>>>>>> more obvious which variables are temporaries and which aren't.
>>>>>>
>>>>>> - Added the test above to vect-alias-check-3.c.
>>>>>>
>>>>>> Tested on aarch64-linux-gnu and x86_64-linux-gnu.
>>>>
>>>> This is ok.
>>>
>>> Thanks. Just been retesting, and I think I must have forgotten
>>> to include Ada last time. It turns out that the patch causes a dg-scan
>>> regression in gnat.dg/vect17.adb, because we now think that if the
>>> array RECORD_TYPEs *do* alias in:
>>>
>>> procedure Add (X, Y : aliased Sarray; R : aliased out Sarray) is
>>> begin
>>> for I in Sarray'Range loop
>>> R(I) := X(I) + Y(I);
>>> end loop;
>>> end;
>>>
>>> then the dependence distance must be zero. Eric, does that hold true
>>> for Ada? I.e. if X and R (or Y and R) alias, must it be the case that
>>> X(I) can only alias R(I) and not for example R(I-1) or R(I+1)? Or are
>>> the arrays allowed to overlap by an arbitrary number of indices?
>>>
>>> If the assumption is correct, is the patch below OK?
>>>
>>> Thanks,
>>> Richard
>>>
>>>
>>> 2017-06-07 Richard Sandiford <richard.sandiford@linaro.org>
>>>
>>> gcc/testsuite/
>>> * gnat.dg/vect17.ads (Sarray): Increase range to 1 .. 5.
>>> * gnat.dg/vect17.adb (Add): Create a dependence distance of 1
>>> when X = R or Y = R.
>>>
>>> Index: gcc/testsuite/gnat.dg/vect17.ads
>>> ===================================================================
>>> --- gcc/testsuite/gnat.dg/vect17.ads 2015-10-14 14:58:56.000000000 +0100
>>> +++ gcc/testsuite/gnat.dg/vect17.ads 2017-06-07 22:10:24.796368118 +0100
>>> @@ -1,6 +1,6 @@
>>> package Vect17 is
>>>
>>> - type Sarray is array (1 .. 4) of Long_Float;
>>> + type Sarray is array (1 .. 5) of Long_Float;
>>> for Sarray'Alignment use 16;
>>>
>>> procedure Add (X, Y : aliased Sarray; R : aliased out Sarray);
>>> Index: gcc/testsuite/gnat.dg/vect17.adb
>>> ===================================================================
>>> --- gcc/testsuite/gnat.dg/vect17.adb 2015-10-14 14:58:56.000000000 +0100
>>> +++ gcc/testsuite/gnat.dg/vect17.adb 2017-06-07 22:10:24.796368118 +0100
>>> @@ -5,8 +5,9 @@ package body Vect17 is
>>>
>>> procedure Add (X, Y : aliased Sarray; R : aliased out Sarray) is
>>> begin
>>> - for I in Sarray'Range loop
>>> - R(I) := X(I) + Y(I);
>>> + R(1) := X(5) + Y(5);
>>> + for I in 1 .. 4 loop
>>> + R(I + 1) := X(I) + Y(I);
>>> end loop;
>>> end;
>>>
next prev parent reply other threads:[~2017-06-29 17:20 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-03 8:02 Richard Sandiford
2017-05-04 9:36 ` Bin.Cheng
2017-05-04 10:07 ` Richard Sandiford
2017-05-04 10:59 ` Bin.Cheng
2017-05-04 12:11 ` Richard Sandiford
2017-05-04 12:13 ` Richard Biener
2017-05-04 12:37 ` Richard Biener
2017-05-04 17:23 ` Richard Sandiford
2017-05-09 10:10 ` Richard Biener
2017-05-18 8:35 ` Richard Sandiford
2017-05-31 6:57 ` Richard Sandiford
2017-06-07 10:17 ` Richard Biener
2017-06-07 21:27 ` Richard Sandiford
2017-06-15 13:45 ` [PING, Ada] " Richard Sandiford
2017-06-22 11:34 ` [PING*2, " Richard Sandiford
2017-06-29 17:20 ` Richard Sandiford [this message]
2017-07-04 9:40 ` Eric Botcazou
2017-07-07 14:01 ` Richard Sandiford
2017-07-07 16:03 ` Eric Botcazou
2017-07-27 12:20 ` Richard Sandiford
2017-08-03 20:52 ` Richard Sandiford
2017-08-04 9:06 ` Richard Biener
2017-08-04 9:29 ` Richard Sandiford
2017-08-04 9:35 ` Richard Biener
2017-05-05 22:03 ` Bernhard Reutner-Fischer
2017-05-09 10:21 ` Richard Biener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tw2yk8x1.fsf_-_@googlemail.com \
--to=rdsandiford@googlemail.com \
--cc=ebotcazou@libertysurf.fr \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).