volatile read and writes
Thomas Wuerthinger
thomas.wuerthinger at oracle.com
Tue Oct 1 12:51:30 PDT 2013
Daniel,
You can consider customising the code in HotSpotRuntime for Aarch64 that creates the memory barrier pattern for volatile loads/stores. Currently we create pre- and post-barriers for both volatile loads and stores. We could consider making the kind of nodes introduced dependent on the platform.
- thomas
On Sep 29, 2013, at 12:55 AM, D.Sturm <D.Sturm42 at gmail.com> wrote:
> The Aarch64 ISA allows to fold most memory barriers into special load and
> store instructions - similar to IA64. That means we can get away with only
> explicitly generating StoreLoad barriers and use load-acquire/store-release
> for volatile read/writes and when publishing newly constructed objects with
> final fields.
>
> What is the best approach for getting this information when generating
> load/stores or maybe during a peephole optimization?
>
> There's a lastLocationAccess for the FloatingReadNode which should point to
> a MembarNode if it's a volatile read (and there's a next field for
> storenodes which should do the same), but that seems rather fragile.
>
>
> - Daniel
More information about the graal-dev
mailing list