summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Timer.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-11-10 23:36:44 +0000
committerMatthias Braun <matze@braunis.de>2016-11-10 23:36:44 +0000
commitd67fa9dc6a434c5c1ff2c08a0a006d30d174d295 (patch)
tree1c6b2954b21c97a37011f6112d0907956b7ea9b9 /llvm/lib/Support/Timer.cpp
parent21f9ce1a0d8776e4aeeae4d9b4762a58dd4d2421 (diff)
downloadbcm5719-llvm-d67fa9dc6a434c5c1ff2c08a0a006d30d174d295.tar.gz
bcm5719-llvm-d67fa9dc6a434c5c1ff2c08a0a006d30d174d295.zip
Timer: Remove group-less NamedRegionTimer constructor.
The NamedRegionTimer initializer without a group name puts the Timer into the "Misc" group and is (nearly) unused. Remove it. The only user of this constructor appears to be the HexagonGenInsert pass, which creates a counter without group to count the complete execution time of that pass, however since every pass gets a counter by the PassManager anyway this should be unnecessary. Also removed the pointless TimerGroup there. Differential Revision: https://reviews.llvm.org/D25582 llvm-svn: 286524
Diffstat (limited to 'llvm/lib/Support/Timer.cpp')
-rw-r--r--llvm/lib/Support/Timer.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/llvm/lib/Support/Timer.cpp b/llvm/lib/Support/Timer.cpp
index afb16ca9e0c..548f9da42ee 100644
--- a/llvm/lib/Support/Timer.cpp
+++ b/llvm/lib/Support/Timer.cpp
@@ -210,22 +210,8 @@ public:
}
-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)){}
OpenPOWER on IntegriCloud