Richard Guenther wrote:
On Thu, May 6, 2010 at 5:50 PM, Richard Guenther
<richard.guent...@gmail.com> wrote:
First let me say that the C++ memory model is crap when it
forces data-races to be avoided for unannotated data like
the examples for packed data.

And it isn't consistent across the board, since neighbouring bits normally don't qualify and can introduce data races. I don't like it when a solution has exceptions like that. It is what it is however, and last I heard the plan was for C to adopt the changes as well.
Well, I hope that instead of just disabling optimizations you
will help to improve their implementation to be able to optimize
in a conformant manner.
I don't want to disable any more than required. SSA names aren't affected since they are local variables only, its only operations on shared memory, and I am hopeful that I can minimize the restrictions placed on them. Some will be more interesting than others... like CSE... you can still perform CSE on a global as long as you don't introduce a NEW load on some execution path that didn't have before. What fun.

And btw, if you are thinking on how to represent the extra
data-dependencies required for the consistency models think
of how to extend whatever you need in infrastructure for that
to also allow FENV dependencies - it's a quite similar problem
(FENV query/set are the atomic operations, usual arithmetic
is what the dependency is to).  It's completely non-trivial
(because it's scalar code, not memory accesses).  For
atomics you should be able to just massage the alias-oracle
data-dependence routines (maybe).

That's what I'm hoping actually..

Andrew.

Reply via email to