[llvm-dev] Enable STATISTIC all the time again?

Joerg Sonnenberger via llvm-dev llvm-dev at lists.llvm.org
Wed May 31 15:15:06 PDT 2017


On Wed, May 31, 2017 at 10:44:01AM -0700, Tim Northover via llvm-dev wrote:
> On 31 May 2017 at 08:17, Daniel Berlin via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > If your concern is the atomic increments, then is there a reason to not have
> > it do the counting as a runtime option instead of a compile time one?
> 
> Or increment into TLS variables and sum those at the end. Looking at a
> statistic before the end of execution is dodgy territory anyway, but I
> can't think of a case where it would be saner if other threads are
> poking at it simultaneously.

Access to TLS variables can easily be more expensive than any atomics...

Joerg


More information about the llvm-dev mailing list