From: "Alexander Monakov" <monoid@ispras.ru>
To: "Daniel Berlin" <dberlin@dberlin.org>
Cc: "gcc.gcc.gnu.org" <gcc@gcc.gnu.org>,
"Revital1 Eres" <ERES@il.ibm.com>,
"Andrey Belevantsev" <abel@ispras.ru>,
"Ayal Zaks" <zaks@il.ibm.com>
Subject: Re: [RFC/RFT] Improving SMS by data dependence export
Date: Mon, 10 Dec 2007 17:16:00 -0000 [thread overview]
Message-ID: <op.t24ppsi4qmwd4b@endeed2.ispras.ru> (raw)
In-Reply-To: <4aca3dc20712071249u2cc5242age0fc1a3b62d6c00@mail.gmail.com>
Hi. Sorry for the previous empty reply.
> also, i see
> + /* We do not use operand_equal_p for ORIG_EXPRs because we need to
> + distinguish memory references at different points of the loop
> (which
> + would have different indices in SSA form, like a[i_1] and a[i_2],
> but
> + were later rewritten to same a[i]). */
> + && (p->orig_expr == q->orig_expr));
>
> This doesn't do enough to distinguish memory references at different
> points of the loop, while also eliminating from consideration that
> *are* the same.
>
> What if they are regular old VAR_DECL?
> This will still return true, but they may be different accesses at
> different points in the loop.
Sorry, I don't really follow. The comment is somewhat badly worded
indeed. The purpose of making handling of MEM_ORIG_EXPRs (introduced by
this patch) different from MEM_EXPRs in ignoring operand_equal'ity of
trees pointed to by this field is enforcing that MEMs corresponding to
accesses to objects of the same type but with (potentially) different
addresses will not share MEM_ATTRS structure. So, if both are VAR_DECLs,
returning true is OK, since different accesses still correspond to the
same memory location.
The first sentence also implies that potentially different accesses could
be merged here, but I don't see any reason for that except for NULL
MEM_ORIG_EXPRs. Could you please elaborate on this?
> In any case, this doesn't belong in mem_attrs_htab_eq, because if they
> are operand_equal_p, for purposes of memory attributes, they *are*
> equal. They may still be different accesses, which is something you
> have to discover later on.
I don't follow this either. Since I add a new field to MEM_ATTRS struct,
which in some cases allows better disambiguation, why should I enforce
MEM_EXPR's rules on it? If I, similarly to MEM_EXPRs, apply
operand_equal_p also to MEM_ORIG_EXPRs, this will give me incorrect
results, since different MEMs will be annotated with same MEM_ORIG_EXPR,
which is wrong, since the latter is flow-sensitive, and operand_equal_p
will discard that (since trees will look the same after out-of-SSA). I do
not see a better way to provide flow-sensitive annotations for MEMs.
> DDR will mark them as data refs
Come again? :)
Thanks.
--
Alexander Monakov
next prev parent reply other threads:[~2007-12-10 17:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-07 14:04 Alexander Monakov
2007-12-07 20:52 ` Daniel Berlin
2007-12-10 16:11 ` Alexander Monakov
2007-12-10 17:16 ` Alexander Monakov [this message]
2007-12-10 18:32 ` Daniel Berlin
2007-12-09 8:55 ` Revital1 Eres
2008-01-03 7:58 ` Revital1 Eres
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=op.t24ppsi4qmwd4b@endeed2.ispras.ru \
--to=monoid@ispras.ru \
--cc=ERES@il.ibm.com \
--cc=abel@ispras.ru \
--cc=dberlin@dberlin.org \
--cc=gcc@gcc.gnu.org \
--cc=zaks@il.ibm.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).