[PATCH] D36847: [Support] Add "reference-counted" Timer

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 21 10:28:33 PDT 2017


MatzeB added a comment.

For something as simple as a timer, having two std::string, 3 pointers and now a vtable feels like too much. Of course that's not the fault of this patch.

That said you are adding 1 pointer (for the vtable) to the timer class and the start/stop calls become virtual. May just as well add the counter to the baseclass instead and have it always refcount to avoid the virtual methods.

Or alternatively just add startReentrant()/stopReentrant() methods to the baseclass. So the default startTimer()/stopTimer() methods remain the same?

In https://reviews.llvm.org/D36847#847700, @modocache wrote:

> Friendly ping -- does anyone have any thoughts here?



https://reviews.llvm.org/D36847





More information about the llvm-commits mailing list