From: Richard Biener <rguenther@suse.de>
To: Sebastian Pop <sebpop@gmail.com>,Tom de Vries <Tom_deVries@mentor.com>
Cc: "gcc-patches@gnu.org" <gcc-patches@gnu.org>
Subject: Re: [PATCH, PR69110] Don't return NULL access_fns in dr_analyze_indices
Date: Sun, 24 Jan 2016 08:05:00 -0000 [thread overview]
Message-ID: <A4CB99CC-FB58-4A68-8820-4537B57477DC@suse.de> (raw)
In-Reply-To: <CAFk3UF_w3e2SSdzQy6+FQJ3j_28oSt=BHGpFyB2=HRsc=-KALg@mail.gmail.com>
On January 23, 2016 7:44:23 PM GMT+01:00, Sebastian Pop <sebpop@gmail.com> wrote:
>On Sat, Jan 23, 2016 at 12:28 PM, Tom de Vries <Tom_deVries@mentor.com>
>wrote:
>> That was my original patch, and Richard commented: 'I think avoiding
>a NULL
>> access_fns is ok but it should be done unconditionally, not only for
>the
>> DECL_P case'. In order words, he asked me to do the exact opposite of
>the
>> change you now propose.
>>
>
>In the case of a DECL_P it is correct to say that it has an access
>function of 0.
>In the graphite testcase it is not correct to say that the access
>function for a given data reference is zero:
>we only initialize access_fns in the case of a polynomial chrec:
>
> if (TREE_CODE (ref) == MEM_REF)
> {
> op = TREE_OPERAND (ref, 0);
> access_fn = analyze_scalar_evolution (loop, op);
> access_fn = instantiate_scev (before_loop, loop, access_fn);
> if (TREE_CODE (access_fn) == POLYNOMIAL_CHREC)
> {
>[...]
> access_fns.safe_push (access_fn);
> }
> }
>
>In all other cases we may not have a representation of the access
>functions.
>It is incorrect to initialize to "A[0]" all those data references that
>cannot be analyzed.
But does it matter as the base will not be equal with one that can be analyzed?
>If needed, instead of returning vNULL, one could initialize the vector
>to empty:
>
>if (access_fns == vNULL)
> access_fns.create (0);
>
>and that would be correct, though it would not teach the dependence
>analysis
>how to deal with the global variable access function in pr69110.
>I think the fix is to add the zero subscript only for DECL_P (ref).
>
>Sebastian
next prev parent reply other threads:[~2016-01-24 8:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-12 10:04 Tom de Vries
2016-01-12 11:22 ` Richard Biener
2016-01-12 12:51 ` Tom de Vries
2016-01-12 13:05 ` Richard Biener
2016-01-12 18:18 ` Tom de Vries
2016-01-13 8:42 ` Richard Biener
2016-01-15 10:16 ` Tom de Vries
2016-01-15 10:18 ` Richard Biener
2016-01-21 23:48 ` Tom de Vries
[not found] ` <CAFk3UF9uMs4i4S5S9GdhMOBr-PY-E5PESJUVpCPDEQ2shDCE9Q@mail.gmail.com>
2016-01-23 18:28 ` Tom de Vries
2016-01-23 18:45 ` Sebastian Pop
2016-01-24 8:05 ` Richard Biener [this message]
2016-01-26 12:13 ` Tom de Vries
2016-01-26 16:59 ` Sebastian Pop
2016-01-27 11:34 ` Tom de Vries
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=A4CB99CC-FB58-4A68-8820-4537B57477DC@suse.de \
--to=rguenther@suse.de \
--cc=Tom_deVries@mentor.com \
--cc=gcc-patches@gnu.org \
--cc=sebpop@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).