[PATCH] D58612: Use std::atomic<> for static counters.
Alexander Kornienko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 25 06:56:27 PST 2019
alexfh added a comment.
In D58612#1408845 <https://reviews.llvm.org/D58612#1408845>, @riccibruno wrote:
> In D58612#1408843 <https://reviews.llvm.org/D58612#1408843>, @ilya-biryukov wrote:
> > In D58612#1408839 <https://reviews.llvm.org/D58612#1408839>, @riccibruno wrote:
> > > I don't know how hard it would be to do this, but I would like to argue that this should be done even if it require some refactoring. These static variables used for stats are kind of ugly imho; they conceptually belong to the AST context.
> > I agree, OTOH if refactoring would take more time than one can spare, moving them to atomics is better than what we have now.
> > For example, AFAIK that's the only thing that keeps clang from being tsan-clean.
> Fair enough. Is that urgent ? I actually would be willing to look at this since I wanted to add some stats to track the space used for trailing objects anyway.
It turned out to be a trivial change. Thanks for the idea, btw ;)
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits