This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PR tree-optimization/52558]: RFC: questions on store data race
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: Andrew MacLeod <amacleod at redhat dot com>, "Boehm, Hans" <hans dot boehm at hp dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Torvald Riegel <triegel at redhat dot com>
- Date: Mon, 21 May 2012 21:31:37 -0500
- Subject: Re: [PR tree-optimization/52558]: RFC: questions on store data race
- References: <4F875324.7060908@redhat.com> <CAFiYyc2Cc2AgL75miwrENHZVywCVuxtUrE1RdO_A4VsiDJg3=A@mail.gmail.com> <4F96E635.2040808@redhat.com> <CAFiYyc1dP_vqBmxKBJ+o45_GAnhkoD++20HTYNbT_V_HspypAw@mail.gmail.com> <4F9880C9.2070704@redhat.com> <Pine.LNX.4.64.1204261136110.23071@jbgna.fhfr.qr> <4FA85518.4070106@redhat.com> <Pine.LNX.4.64.1205161438100.11924@jbgna.fhfr.qr>
On 05/16/12 07:53, Richard Guenther wrote:
On Mon, 7 May 2012, Aldy Hernandez wrote:
[Sorry for the delay; I was on vacation.]
I am forgoing the load avoidance code altogether to simplify things.
Thanks.
+ /* Emit the load code into the latch, so that we are sure it will
+ be processed after all dependencies. */
+ latch_edge = loop_latch_edge (loop);
inserting code into the latch block is bad - the vectorizer will
be confused by non-empty latches.
The code as is on trunk inserts the load on the latch. That's why I
also inserted the supporting flag checking code there. Do you want me
to put the supporting code somewhere else?
Your ChangeLog mentions changes that are no longer necessary
(the target hook).
Whoops. Fixed.
I didn't quite get the store order issue - we _do_ preserve store
ordering right now, do we? So how come introducing the flags
change that?
The current scheme on trunk works because it inserts one load with
gsi_insert_on_edge() and subsequent ones get appended correctly, whereas
my patch has to split the edge (which happens at the top of the block),
so subsequent code inserts happen in reverse order (at the top). If I
remember correctly, that is... I can look again and report if it's still
unclear.
New patch attached. Tested on x86-64 Linux. No regressions.
Thanks.
Aldy
Attachment:
curr
Description: Text document