From: Razya Ladelsky <RAZYA@il.ibm.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
Richard Guenther <richard.guenther@gmail.com>
Subject: Re: [PATCH, take 2] Fix PR tree-optimization/49960 ,Fix self data dependence
Date: Thu, 24 Nov 2011 15:48:00 -0000 [thread overview]
Message-ID: <OF40CD4C0B.22310E4B-ONC2257952.0044D957-C2257952.0044EEF9@il.ibm.com> (raw)
In-Reply-To: <20111121172510.GK27242@tyan-ft48-01.lab.bos.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1799 bytes --]
Jakub Jelinek <jakub@redhat.com> wrote on 21/11/2011 07:25:10 PM:
> From: Jakub Jelinek <jakub@redhat.com>
> To: Razya Ladelsky/Haifa/IBM@IBMIL
> Cc: GCC Patches <gcc-patches@gcc.gnu.org>, Richard Guenther
> <richard.guenther@gmail.com>
> Date: 21/11/2011 07:25 PM
> Subject: Re: [PATCH, take 2] Fix PR tree-optimization/49960 ,Fix
> self data dependence
>
> On Mon, Nov 21, 2011 at 06:56:55PM +0200, Razya Ladelsky wrote:
> > I have some non-affine cases for which compute_affine_dependence is
called
> > (as it is called for
> > ALL dependences from compte_all_depepndences()), and no harm is done.
> > I looked a little bit closer into the code, and this is what happens
for
> > non affine accesses:
> >
> > initialize_data_dependence_relation() assigns
> > DDR_ARE_DEPENDENT (res) = chrec_dont_know for the dr.
>
> It can be chrec_known too (that's actually the only interesting case for
us
> unless it is a read-read ddr), but you're right that likely
> object_address_invariant_in_loop_p should be false.
>
> > Then, compute_affine_depepndence()
> > tests if (DDR_ARE_DEPENDENT (ddr) == NULL_TREE), and does nothing
> > otherwise.
> > Since the dr was initialized with chrec_dont_know, no harm is done.
> >
> > Anyway, since it is useless for your gather case, I'll just remove it,
> > along with compute_self_dependence().
> >
> > OK?
>
> Yes, patch preapproved.
>
> Jakub
>
Hi,
Going to commit this patch today.
I bootstrapped and regtested on ppc64-suse-linux.
ChangeLog:
* tree-data-ref.c (initialize_data_dependence_relation): Update
comment for the
self dependence case.
(compute_self_dependence): Remove.
* tree-vect-data-refs.c (vect_analyze_data_refs): Remove call to
compute_self_dependenc.
Thanks,
Razya
[-- Attachment #2: self_dependence_2.txt --]
[-- Type: text/plain, Size: 1834 bytes --]
Index: tree-data-ref.c
===================================================================
--- tree-data-ref.c (revision 181675)
+++ tree-data-ref.c (working copy)
@@ -1385,8 +1385,7 @@ initialize_data_dependence_relation (struct data_r
return res;
}
- /* When the references are exactly the same, don't spend time doing
- the data dependence tests, just initialize the ddr and return. */
+ /* The case where the references are exactly the same. */
if (operand_equal_p (DR_REF (a), DR_REF (b), 0))
{
if (loop_nest
@@ -4132,19 +4131,6 @@ compute_affine_dependence (struct data_dependence_
fprintf (dump_file, ")\n");
}
-/* This computes the dependence relation for the same data
- reference into DDR. */
-
-void
-compute_self_dependence (struct data_dependence_relation *ddr)
-{
- if (DDR_ARE_DEPENDENT (ddr) != NULL_TREE)
- return;
-
- if (DDR_LOOP_NEST (ddr))
- compute_affine_dependence (ddr, VEC_index (loop_p, DDR_LOOP_NEST (ddr), 0));
-}
-
/* Compute in DEPENDENCE_RELATIONS the data dependence graph for all
the data references in DATAREFS, in the LOOP_NEST. When
COMPUTE_SELF_AND_RR is FALSE, don't compute read-read and self
Index: tree-vect-data-refs.c
===================================================================
--- tree-vect-data-refs.c (revision 181675)
+++ tree-vect-data-refs.c (working copy)
@@ -3122,7 +3122,6 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo,
ddr = VEC_index (ddr_p, ddrs, k);
gcc_assert (DDR_A (ddr) == olddr && DDR_B (ddr) == olddr);
newddr = initialize_data_dependence_relation (dr, dr, nest);
- compute_self_dependence (newddr);
VEC_replace (ddr_p, ddrs, k, newddr);
free_dependence_relation (ddr);
VEC_replace (data_reference_p, datarefs, i, dr);
=
prev parent reply other threads:[~2011-11-24 12:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 7:21 [patch] " Razya Ladelsky
2011-10-17 8:53 ` Richard Guenther
[not found] ` <OF746BCB18.CF82809F-ONC225792E.0051CE3F-C225792E.00564975@il.ibm.com>
[not found] ` <CAFiYyc2ykFPCW8A8vW=f5UbNa7zFRQObwL13D9ioXjCd_em9pQ@mail.gmail.com>
2011-10-21 9:26 ` Fwd: " Richard Guenther
2011-11-15 15:13 ` [PATCH, take 2] " Razya Ladelsky
2011-11-15 18:54 ` Richard Guenther
2011-11-21 13:32 ` Jakub Jelinek
2011-11-21 14:24 ` Razya Ladelsky
2011-11-21 14:54 ` Jakub Jelinek
2011-11-21 15:43 ` Razya Ladelsky
2011-11-21 16:13 ` Jakub Jelinek
2011-11-21 17:25 ` Razya Ladelsky
2011-11-21 18:26 ` Jakub Jelinek
2011-11-24 15:48 ` Razya Ladelsky [this message]
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=OF40CD4C0B.22310E4B-ONC2257952.0044D957-C2257952.0044EEF9@il.ibm.com \
--to=razya@il.ibm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--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).