-
Notifications
You must be signed in to change notification settings - Fork 57
Add fence
, cmpxchg
and atomicRMW
to the builder
#24
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
Conversation
6f82a5b
to
e545ab0
Compare
With this patch the builder is quickly approaching 1500 LoC. It's gonna need to be broken up soon. |
e545ab0
to
edbc3bf
Compare
/// `memory_order_seq_cst` and Java volatile. | ||
case sequentiallyConsistent = 6 | ||
|
||
static let orderingMapping: [AtomicOrdering: LLVMAtomicOrdering] = [ |
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.
Private?
|
||
/// `AtomicRMWOperation` enumerates the kinds of supported atomic | ||
/// read-write-modify operations. | ||
public enum AtomicRMWOperation { |
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.
Maybe spell this out.
singleThreaded: Bool = false | ||
) -> IRValue { | ||
|
||
if failureOrdering.rawValue < AtomicOrdering.monotonic.rawValue { |
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.
Maybe just make a conformance to Comparable?
edbc3bf
to
cb1346f
Compare
cb1346f
to
88156c6
Compare
@harlanhaskins ping |
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.
The next instructions I'm going to focus on will be the
extract*
family becauseatomic cmpxchg
is pretty useless without it.