[PATCH] D18164: [tsan] Do not instrument reads/writes to instruction profile counters.

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 15 10:44:09 PDT 2016

dvyukov added a comment.

> What is the right way to teach tsan to be quiet about benign races?

There is no such thing as benign data races in llvm, so there is nothing to teach tsan about.

> No -- tsan warning should not be the right motivation for this kind of change.

You seem to assume that marking the profiler memory accesses as monotonically atomic will degrade performance. Why? If that's the case then there is a bug in llvm optimizer, and we need to fix it.
There is no difference between the compiler-emitted instrumentation and similar hand-written instrumentation. And we definitely don't want users to write racy code. But we don't want users to be penalized for writing correct code as well.


More information about the llvm-commits mailing list