* Fw: Getting an early start on C++ standards issues...
@ 2016-02-26 14:50 Paul E. McKenney
2016-02-26 15:22 ` Will Deacon
0 siblings, 1 reply; 3+ messages in thread
From: Paul E. McKenney @ 2016-02-26 14:50 UTC (permalink / raw)
To: will.deacon, ralf, tony.luck, fenghua.yu; +Cc: linux-arch
Hello!
Do ARM, MIPS, and IA64 data/address/control dependencies apply to loads
and stores from vector instructions? The use case appears to be that the
dependency chain is headed by a normal load instruction, and a dependency
to a later vector load/store is desired.
Any other weakly ordered architectures with vector instructions?
Thanx, Paul
Original query from Torvald Riegel and Richard Biener:
> > I'm not sure I understand you correctly. Do you have a brief example,
> > perhaps? For mo_consume and its data dependencies, if there might be a
> > dependence, the compiler would have to preserve it; but I guess that
> > both a vectorized loop an one that accessses each element separately
> > would preserve dependences because it's doing those accesses, and they
> > depend on the input data.
> > OTOH, peraps HW vector instructions don't get the ordering guarantees
> > from data dependences -- Paul, do you know of any such cases?
>
> A brief example would be for
>
> void foo (int *a, int *b, int n)
> {
> for (int i = 0; i < n; ++i)
> a[i] = b[i];
> }
>
> which we can vectorize like
>
> if (a + n < b || b + n < a)
> {
> vectorized loop
> }
> else
> {
> not vectorized loop
> }
>
> note how we're not establishing equivalences between pointers but
> non-dependence vs. possible dependence.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fw: Getting an early start on C++ standards issues...
2016-02-26 14:50 Fw: Getting an early start on C++ standards issues Paul E. McKenney
@ 2016-02-26 15:22 ` Will Deacon
2016-02-26 21:33 ` Paul E. McKenney
0 siblings, 1 reply; 3+ messages in thread
From: Will Deacon @ 2016-02-26 15:22 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: ralf, tony.luck, fenghua.yu, linux-arch
On Fri, Feb 26, 2016 at 06:50:57AM -0800, Paul E. McKenney wrote:
> Hello!
Hi Paul,
> Do ARM, MIPS, and IA64 data/address/control dependencies apply to loads
> and stores from vector instructions? The use case appears to be that the
> dependency chain is headed by a normal load instruction, and a dependency
> to a later vector load/store is desired.
>
> Any other weakly ordered architectures with vector instructions?
We certainly have instructions that don't honour address dependencies,
for example LDNP (load non-temporal pair), and these could be used by
variants of memcpy. x86 has something similar with MOVNTDQA[1].
It's highly likely that we'd consider similar relaxations for extensions
to our vector instructions in future revisions of the ARM architecture,
so I don't think we should generally rely on address dependencies
providing order for vectorised code.
Will
[1] http://www.felixcloutier.com/x86/MOVNTDQA.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fw: Getting an early start on C++ standards issues...
2016-02-26 15:22 ` Will Deacon
@ 2016-02-26 21:33 ` Paul E. McKenney
0 siblings, 0 replies; 3+ messages in thread
From: Paul E. McKenney @ 2016-02-26 21:33 UTC (permalink / raw)
To: Will Deacon; +Cc: ralf, tony.luck, fenghua.yu, linux-arch
On Fri, Feb 26, 2016 at 03:22:38PM +0000, Will Deacon wrote:
> On Fri, Feb 26, 2016 at 06:50:57AM -0800, Paul E. McKenney wrote:
> > Hello!
>
> Hi Paul,
>
> > Do ARM, MIPS, and IA64 data/address/control dependencies apply to loads
> > and stores from vector instructions? The use case appears to be that the
> > dependency chain is headed by a normal load instruction, and a dependency
> > to a later vector load/store is desired.
> >
> > Any other weakly ordered architectures with vector instructions?
>
> We certainly have instructions that don't honour address dependencies,
> for example LDNP (load non-temporal pair), and these could be used by
> variants of memcpy. x86 has something similar with MOVNTDQA[1].
>
> It's highly likely that we'd consider similar relaxations for extensions
> to our vector instructions in future revisions of the ARM architecture,
> so I don't think we should generally rely on address dependencies
> providing order for vectorised code.
Thank you for the information, Will!
Thanx, Paul
> Will
>
> [1] http://www.felixcloutier.com/x86/MOVNTDQA.html
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-26 21:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-26 14:50 Fw: Getting an early start on C++ standards issues Paul E. McKenney
2016-02-26 15:22 ` Will Deacon
2016-02-26 21:33 ` Paul E. McKenney
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.