[PATCH] D64414: Do not set ReadNone attribute on intrinsics with side effects

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 02:23:12 PDT 2019


chill added a comment.

In D64414#1576955 <https://reviews.llvm.org/D64414#1576955>, @jdoerfert wrote:

> What if a different thread causes an abort before the commit? store-load forwarding would then cause an inconsistent view, wouldn't it?
>  I find this is like atomic loads that also "write" memory if the synchronization is strong enough to make other modifications visible at that point.


If the transaction is aborted before or by the `tcommit`, it'll be automatically rolled back to the `tstart`, which initiated it, discarding
any register and memory writes, and won't reach the instruction after the `tcommit`.

Anyway, I think we are drifting towards discussion of the correct way to implement transactional memory and its interactions with the memory model, which
is a very valuable discussion, that I suggest we continue here: https://reviews.llvm.org/D64416

As for the function attributes, etc, maybe a simpler use case would be this one: https://reviews.llvm.org/D64447 (A little bit of background, I suggested that might be a correct change in a comment here:  https://reviews.llvm.org/D60486#inline-574695)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64414/new/

https://reviews.llvm.org/D64414





More information about the llvm-commits mailing list