[PATCH] D25582: Timer: Remove group-less NamedRegionTimer constructor

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 10 15:46:26 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL286524: Timer: Remove group-less NamedRegionTimer constructor. (authored by matze).

Changed prior to commit:
  https://reviews.llvm.org/D25582?vs=74593&id=77564#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D25582

Files:
  llvm/trunk/include/llvm/Support/Timer.h
  llvm/trunk/lib/Support/Timer.cpp
  llvm/trunk/lib/Target/Hexagon/HexagonGenInsert.cpp


Index: llvm/trunk/include/llvm/Support/Timer.h
===================================================================
--- llvm/trunk/include/llvm/Support/Timer.h
+++ llvm/trunk/include/llvm/Support/Timer.h
@@ -152,8 +152,6 @@
 /// statement.  All timers with the same name are merged.  This is primarily
 /// used for debugging and for hunting performance problems.
 struct NamedRegionTimer : public TimeRegion {
-  explicit NamedRegionTimer(StringRef Name,
-                            bool Enabled = true);
   explicit NamedRegionTimer(StringRef Name, StringRef GroupName,
                             bool Enabled = true);
 };
Index: llvm/trunk/lib/Target/Hexagon/HexagonGenInsert.cpp
===================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonGenInsert.cpp
+++ llvm/trunk/lib/Target/Hexagon/HexagonGenInsert.cpp
@@ -1474,8 +1474,6 @@
 
   bool Timing = OptTiming, TimingDetail = Timing && OptTimingDetail;
   bool Changed = false;
-  TimerGroup __G("hexinsert");
-  NamedRegionTimer __T("hexinsert", Timing && !TimingDetail);
 
   // Sanity check: one, but not both.
   assert(!OptSelectAll0 || !OptSelectHas0);
Index: llvm/trunk/lib/Support/Timer.cpp
===================================================================
--- llvm/trunk/lib/Support/Timer.cpp
+++ llvm/trunk/lib/Support/Timer.cpp
@@ -210,22 +210,8 @@
 
 }
 
-static ManagedStatic<Name2TimerMap> NamedTimers;
 static ManagedStatic<Name2PairMap> NamedGroupedTimers;
 
-static Timer &getNamedRegionTimer(StringRef Name) {
-  sys::SmartScopedLock<true> L(*TimerLock);
-
-  Timer &T = (*NamedTimers)[Name];
-  if (!T.isInitialized())
-    T.init(Name);
-  return T;
-}
-
-NamedRegionTimer::NamedRegionTimer(StringRef Name,
-                                   bool Enabled)
-  : TimeRegion(!Enabled ? nullptr : &getNamedRegionTimer(Name)) {}
-
 NamedRegionTimer::NamedRegionTimer(StringRef Name, StringRef GroupName,
                                    bool Enabled)
   : TimeRegion(!Enabled ? nullptr : &NamedGroupedTimers->get(Name, GroupName)){}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25582.77564.patch
Type: text/x-patch
Size: 2058 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161110/b87c82dd/attachment.bin>


More information about the llvm-commits mailing list