Skip to content

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

Merged
merged 1 commit into from
Jan 13, 2017

Conversation

CodaFi
Copy link
Member

@CodaFi CodaFi commented Jan 13, 2017

The next instructions I'm going to focus on will be the extract* family because atomic cmpxchg is pretty useless without it.

@CodaFi CodaFi force-pushed the finger-on-the-button branch from 6f82a5b to e545ab0 Compare January 13, 2017 01:08
@CodaFi
Copy link
Member Author

CodaFi commented Jan 13, 2017

With this patch the builder is quickly approaching 1500 LoC. It's gonna need to be broken up soon.

@CodaFi CodaFi force-pushed the finger-on-the-button branch from e545ab0 to edbc3bf Compare January 13, 2017 02:53
/// `memory_order_seq_cst` and Java volatile.
case sequentiallyConsistent = 6

static let orderingMapping: [AtomicOrdering: LLVMAtomicOrdering] = [
Copy link
Member

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 {
Copy link
Member

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 {
Copy link
Member

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?

@CodaFi CodaFi force-pushed the finger-on-the-button branch from edbc3bf to cb1346f Compare January 13, 2017 03:39
@CodaFi CodaFi force-pushed the finger-on-the-button branch from cb1346f to 88156c6 Compare January 13, 2017 03:40
@CodaFi
Copy link
Member Author

CodaFi commented Jan 13, 2017

@harlanhaskins ping

Copy link
Member

@harlanhaskins harlanhaskins left a comment

Choose a reason for hiding this comment

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

:shipit:

@harlanhaskins harlanhaskins merged commit 2b59ed0 into llvm-swift:master Jan 13, 2017
@CodaFi CodaFi deleted the finger-on-the-button branch January 13, 2017 05:43
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