-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add intrinsic support for atomic operations. #1628
Conversation
Also add `void` intrinsic type.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1628 +/- ##
==========================================
- Coverage 88.44% 88.34% -0.11%
==========================================
Files 381 381
Lines 30359 31503 +1144
==========================================
+ Hits 26851 27830 +979
- Misses 3508 3673 +165 ☔ View full report in Codecov by Sentry. |
This is dependent on a Swifty-LLVM change to add support for atomic ordering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I strongly suspect that we can find a simpler way to represent the types of non-returning instructions. What if we say that the return type of a built-in instruction is an enum:
enum BuiltinReturnType {
case builtin(BuiltinType)
case void
}
I'll try to propose another implementation ASAP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good mostly. Would be nice if we had more tests covering code generation.
Thank you very much, will add more tests in a follow-up PR. |
Add intrinsic support for atomic store and load, atomic Read-Modify-Write, CompareExchange and fence operations.