Skip to content
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

[NFC] Make MemoryOrder parameters non-optional #7171

Merged
merged 5 commits into from
Dec 21, 2024
Merged

Conversation

tlively
Copy link
Member

@tlively tlively commented Dec 20, 2024

Update Builder and IRBuilder makeStructGet and makeStructSet functions
to require the memory order to be explicitly supplied. This is slightly
more verbose, but will reduce the chances that we forget to properly
consider synchronization when implementing new features in the future.

GlobalStructInference optimizes gets of immutable fields of structs that
are only ever instantiated to initialize immutable globals. Due to all
the immutability, it's not possible for the optimized reads to
synchronize with any writes via the accessed memory, so we just need to
be careful to replace removed seqcst gets with seqcst fences.

As a drive-by, fix some stale comments in gsi.wast.
Update Builder and IRBuilder makeStructGet and makeStructSet functions
to require the memory order to be explicitly supplied. This is slightly
more verbose, but will reduce the chances that we forget to properly
consider synchronization when implementing new features in the future.
@tlively tlively requested a review from kripken December 20, 2024 17:51
Base automatically changed from gsi-atomics to main December 20, 2024 20:08
@tlively tlively enabled auto-merge (squash) December 20, 2024 20:20
@tlively tlively merged commit 6ddacde into main Dec 21, 2024
13 checks passed
@tlively tlively deleted the explicit-memory-order branch December 21, 2024 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants