[PATCH] D31630: [tsan] Detect races on modifying accesses in Swift code

Dmitry Vyukov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 05:23:52 PDT 2017


dvyukov added a comment.

In https://reviews.llvm.org/D31630#734474, @kubamracek wrote:

> > Also, could swift runtime register a tag at startup? Or performance overhead is a concern?
>
> It's quite hard to make the runtime call the registration at process startup, because it would need to dynamically figure out whether we're running with TSan or not, plus we'd need to add an indirection to each access (to read the value of the tag).  I'd really prefer to keep the value as a well-defined constant in TSan.


Agree, I think, a constant is the right way to do it.
Any other uses that I think of will also be much simpler/faster with a constant.


https://reviews.llvm.org/D31630





More information about the llvm-commits mailing list