peilin-ye wrote:

Hi @eddyz87, thanks for the review and context!

> ```
> lock *(u64 *)(r1 + 0x0) = r2 release
> lock r2 = *(u64 *)(r1 + 0x0) acquire
> ```

Appending `acquire` and `release` does sound nice to me since it makes the 
syntax more similar to LLVM IR (e.g. `store atomic i64 %v, ptr %p release, 
align 8`), and it'd also be a bit easier when we support other memory ordering 
types in the future e.g. we can just append `seq_cst` instead of having to say 
`load_seq_cst(...)`.

However, I didn't want to use `lock` because I feel like it's too similar to 
the x86 `LOCK` prefix (implies a full memory barrier, which could be confusing 
here).  WDYT?  Cc: @yonghong-song @4ast

> Also a question regarding 3 commits in one pull request. As far as I 
> understand [current](https://llvm.org/docs/GitHub.html) policy, the idea is 
> to have a separate pull request for each commit (and fork branches from one 
> another to build a stack). Otherwise the commits are squashed. What's the 
> idea with current pull request?

Got it, I'll split this into separate PRs later.

https://github.com/llvm/llvm-project/pull/108636
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to