Introduce atomic loads in Cmm and Mach IRs#10943
Conversation
|
Note that even with this change, the Cmm to Mach translation ignores the atomicity. Lines 449 to 451 in 488a28a Further work is needed to incorporate the atomicity argument into the definition of Line 55 in 488a28a It is useful to incorporate this change into this PR. Best to change On a related note, the atomic store, fetch-and-add and compare-and-swap are also converted early into an external calls in cmmgen. This may also need to be lowered for efficient codegen. Lines 1056 to 1061 in 488a28a Lines 1115 to 1117 in 488a28a |
937bce2 to
1e21aaf
Compare
This is the case in the new version. |
|
The changes look good to me. |
kayceesrk
left a comment
There was a problem hiding this comment.
LGTM.
I've left a few comments that clarify the API.
47df191 to
9154d97
Compare
|
I integrated your comments. |
|
Thanks! This looks good, so I merged. |
The
Patomic_loadprimitive gives lieu to a non-atomic load (i.e.Cload { is_atomic = false; _ }) in Cmm. This is correct in x86 but needs to be lowered down the pipeline to ease support of other architectures.In addition, this PR proposes to add an
~is_atomicargument to themk_load_muthelper to make the atomicity of loads explicit during Cmm generation.