Skip to content

Supporting changes to add fences after volatile field stores #5689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 25, 2020

Conversation

r30shah
Copy link
Contributor

@r30shah r30shah commented Nov 24, 2020

Changes in PR adds supporting changes to add fences after volatile field stores made in eclipse-openj9/openj9#11262.

Signed-off-by: Rahil Shah [email protected]

This helper will be consumed in the OpenJ9 downstream project.

Signed-off-by: Filip Jeremic <[email protected]>
The `astoreEvaluator`, more precisely the `astoreHelper` has a path in
which it is trying to identify the following tree pattern:

```
astore <x>
  aload <y>
```

and tries to generate an `MVC` instruction to perform the store. The
problem with this is that it seems to generate a memory reference from
the `node` only for the purposes of testing whether it has an index
register (which it by the way cannot know until the memory reference is
used within an instruction). The act of generating a memory reference
is not side-effect free as the symref could have been unresolved and as
such various metadata can be generated.

The `astoreHelper` then goes ahead and creates another memory reference
from the node and uses that for the `MVC` instruction. This means the
metadata for handling unresolved symrefs could have been generated
twice.

Similarly to `directMemoryStoreHelper` we simply prevent this `MVC`
reduction if the symref is unresolved.

Signed-off-by: Filip Jeremic <[email protected]>
@r30shah r30shah changed the title WIP: Supporting changes to add fences after volatile field stores Supporting changes to add fences after volatile field stores Nov 24, 2020
@fjeremic fjeremic self-assigned this Nov 25, 2020
@fjeremic
Copy link
Contributor

@genie-omr build zlinux,zos

@fjeremic fjeremic merged commit dfb4800 into eclipse-omr:master Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants