[PATCH] D58612: Use std::atomic<> for static counters.

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 25 06:08:11 PST 2019


riccibruno added a comment.

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.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D58612





More information about the cfe-commits mailing list