From: Li Feng <nemokingdom@gmail.com>
To: Richard Guenther <richard.guenther@gmail.com>
Cc: GCC <gcc@gcc.gnu.org>
Subject: Re: How could I get alias set information from data_reference_p
Date: Tue, 14 Jul 2009 09:12:00 -0000 [thread overview]
Message-ID: <f18356030907140212r5b957adbvd37d82db45e9c673@mail.gmail.com> (raw)
In-Reply-To: <84fc9c000907140154w5db91242q5ac7301bc833676d@mail.gmail.com>
Hi Richard,
On Tue, Jul 14, 2009 at 4:54 PM, Richard
Guenther<richard.guenther@gmail.com> wrote:
> On Tue, Jul 14, 2009 at 8:01 AM, Li Feng<nemokingdom@gmail.com> wrote:
>> Hi,
>>
>> I'm now working on Graphite branch and need to know
>> the alias set information for each data_reference_p, which
>> would be an integer (or alias_set_type) stands for which
>> alias set it is in.
>>
>> I tried to get the alias set information with get_alias_set (tree)
>> (I've no idea how this function works, just a experimental
>> trying), for my testcase, it returns 2 for all the
>> data_reference_p->ref, which I think is unreasonable.
>> So I think I may go wrong somewhere.
>>
>> The question will be: how could I get it's relevant
>> alias set information from data_reference_p?
>>
>> p.s. :
>> In Graphite, the data reference was built for each
>> gimple stmt with:
>> get_references_in_stmt (stmt, &references);
>> then for each ref in references, data reference is created with:
>> dr = create_data_ref (nest, *ref->pos, stmt, ref->is_read);
>
> get_alias_set (dr->ref) is the correct thing. Why do you think it
> is unreasonable to return 2 for all of them? Why do you need
> alias-set information anyway?
The testcase looks like this, where I assume that
p and a in the same alias set, while q and Q in another, and so on.
But between them, the alias set number should be different, otherwise
maybe I misunderstood somewhere about the alias set.
int Q[10];
int foo()
{
int i;
int a[10], b[20];
int *p = a;
int *q = Q;
for (i = 0; i < 10; i++)
{
p[i] = i;
a[i]= i - 5;
b[i] = i*i;
q[i] = 5;
}
return Q[3]*a[2]*b[10];
}
For you question,
We are using this information before dependency checking under
polyhedron, if 2 data references get different dimensions and they
are not in the same alias set, we could conclude that they
takes no dependency.
Li
next prev parent reply other threads:[~2009-07-14 9:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-14 6:01 Li Feng
2009-07-14 8:54 ` Richard Guenther
2009-07-14 9:12 ` Li Feng [this message]
2009-07-14 9:40 ` Richard Guenther
2009-07-14 15:14 ` Sebastian Pop
2009-07-14 15:26 ` Richard Guenther
2009-07-14 16:03 ` Sebastian Pop
2009-07-14 16:09 ` Sebastian Pop
2009-07-14 21:34 ` Richard Guenther
2009-07-15 7:59 ` Li Feng
2009-07-15 11:02 ` Tobias Grosser
2009-07-15 11:26 ` Richard Guenther
2009-07-15 19:16 ` Tobias Grosser
2009-07-15 20:46 ` Richard Guenther
2009-07-15 20:49 ` Richard Guenther
[not found] ` <15137_1247690941_4A5E40BC_15137_586_1_84fc9c000907151348s41395cc5u6cfacb60cde78bfa@mail.gmail.com>
2009-07-15 23:16 ` Tobias Grosser
2009-07-16 8:39 ` Richard Guenther
2009-07-16 9:00 ` Li Feng
2009-07-16 9:16 ` Richard Guenther
2009-07-16 15:45 ` Daniel Berlin
2009-07-16 16:04 ` Sebastian Pop
2009-07-17 1:36 ` Li Feng
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=f18356030907140212r5b957adbvd37d82db45e9c673@mail.gmail.com \
--to=nemokingdom@gmail.com \
--cc=gcc@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).