Sujet : Re: Memory ordering
De : monnier (at) *nospam* iro.umontreal.ca (Stefan Monnier)
Groupes : comp.archDate : 04. Dec 2024, 00:37:41
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <jwvser449xz.fsf-monnier+comp.arch@gnu.org>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Gnus/5.13 (Gnus v5.13)
If there are places
in the code it doesn't know this can't happen it won't optimize
across it, more or less.
>
The problem is HOW to TELL the COMPILER that these memory references
are "more special" than normal--when languages give few mechanisms.
We could start with something like
critical_region {
...
}
such that the compiler must refrain from any code motion within
those sections but is free to move things outside of those sections as if
execution was singlethreaded.
Stefan