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

[SandboxIR] Implement AtomicCmpXchgInst #102710

Merged
merged 1 commit into from
Aug 13, 2024
Merged

[SandboxIR] Implement AtomicCmpXchgInst #102710

merged 1 commit into from
Aug 13, 2024

Conversation

vporpo
Copy link
Contributor

@vporpo vporpo commented Aug 10, 2024

This patch implements sandboxir::AtomicCmpXchgInst which mirrors llvm::AtomiCmpXchgInst.

/// so release semantics cannot be provided. So this function drops explicit
/// Release requests from the AtomicOrdering. A SequentiallyConsistent
/// operation would remain SequentiallyConsistent.
static AtomicOrdering
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need this here? this is a copy of the LLVM version that users can just call directly instead since it doesn't use any Value

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not strictly needed, the user could just call the LLVM version. But I feel we should be providing these functions for completeness, so that the user won't have to look for them in the LLVM IR classes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is so rarely used and so specific that I doubt anybody will be using SandboxIR and will be wanting getStrongestFailureOrdering as well. IMO we should only add the APIs people will likely use, not obscure ones, especially if those APIs don't require an llvm::Value. but happy to be overruled if people think otherwise

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it.

This patch implements sandboxir::AtomicCmpXchgInst which mirrors llvm::AtomiCmpXchgInst.
@vporpo vporpo merged commit 00a4042 into llvm:main Aug 13, 2024
5 of 7 checks passed
bwendling pushed a commit to bwendling/llvm-project that referenced this pull request Aug 15, 2024
This patch implements sandboxir::AtomicCmpXchgInst which mirrors
llvm::AtomiCmpXchgInst.
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