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

LLVM AtomicRMW Instruction #12

Closed
hudson-ayers opened this issue Oct 1, 2020 · 3 comments
Closed

LLVM AtomicRMW Instruction #12

hudson-ayers opened this issue Oct 1, 2020 · 3 comments

Comments

@hudson-ayers
Copy link
Contributor

Would it be possible to support the LLVm AtomicRMW Instruction? I am running into the following error:

UnsupportedInstruction: encountered an LLVM instruction which is not currently supported: instruction AtomicRMW.

Or does handling atomic instructions add significant complexity?

@cdisselkoen
Copy link
Collaborator

Oh for sure, we can support this now.

The original reason Haybale didn't support AtomicRMW was because the C API in LLVM 9 and earlier is missing a getter for the opcode of an AtomicRMW. (See the Limitations section of the llvm-ir README.) But now that we have LLVM 10 we can easily support it. It'll have to be supported only with llvm-10 feature, of course.

Under the hood, if you're curious, since Haybale doesn't model threading at all, we don't have to do anything about the "atomic" part of the instruction, we just have to implement the component operations of each opcode: read, modify, write.

@cdisselkoen
Copy link
Collaborator

Added AtomicRMW support (and tests)

@hudson-ayers
Copy link
Contributor Author

Thank you! Excited to try it out.

cdisselkoen added a commit that referenced this issue Oct 20, 2020
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

No branches or pull requests

2 participants