================ @@ -115,22 +92,12 @@ std::unique_ptr<raw_ostream> llvm::CreateInfoOutputFile() { return std::make_unique<raw_fd_ostream>(2, false); // stderr. } -namespace { -struct CreateDefaultTimerGroup { - static void *call() { - return new TimerGroup("misc", "Miscellaneous Ungrouped Timers"); - } -}; -} // namespace -static ManagedStatic<TimerGroup, CreateDefaultTimerGroup> DefaultTimerGroup; -static TimerGroup *getDefaultTimerGroup() { return &*DefaultTimerGroup; } - //===----------------------------------------------------------------------===// // Timer Implementation //===----------------------------------------------------------------------===// void Timer::init(StringRef TimerName, StringRef TimerDescription) { - init(TimerName, TimerDescription, *getDefaultTimerGroup()); ---------------- macurtis-amd wrote:
> Does the new mtg::DefaultTimerGroup() introduce extra overhead? I didn't measure it, but i think at most it is the overhead of is a one or two function calls. > I presume that the new code retains this mechanism Yes. https://github.com/llvm/llvm-project/pull/121663 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits