[PATCH] D79983: [TSAN] Add option to allow instrumenting reads of reads-before-writes

Dmitry Vyukov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 15 03:02:42 PDT 2020


dvyukov added a comment.

In D79983#2038041 <https://reviews.llvm.org/D79983#2038041>, @melver wrote:

> In D79983#2037942 <https://reviews.llvm.org/D79983#2037942>, @dvyukov wrote:
>
> > Maybe this flag should turn off instrumentation of the "atomic" writes? Then the "reads-before-write" are not before writes anymore and will be naturally instrumented. And we also get faster execution. What do you think?
>
>
> Do you mean putting some of KCSAN's logic to determine what are "atomic" writes here? For one, I don't think it's reliable because the logic in KCSAN may change again and we shouldn't make any code here be KCSAN-specific.
>
> The other thing is that conflicts between "atomic write" and "plain read" will be missed.
>
> Or did I misunderstand what you meant?


Based on offline discussion my comment is withdrawn.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79983





More information about the llvm-commits mailing list