aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Timer.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2025-03-13 10:29:15 -0700
committerGitHub <noreply@github.com>2025-03-13 10:29:15 -0700
commit31ebe6647b7f1fc7f6778a5438175b12f82357ae (patch)
tree8aec26188601e067f0745fdf0bca407e3d08e4af /llvm/lib/Support/Timer.cpp
parentaa612f3ade66b5dd3e95d028c0345a94c38e1ff8 (diff)
downloadllvm-31ebe6647b7f1fc7f6778a5438175b12f82357ae.zip
llvm-31ebe6647b7f1fc7f6778a5438175b12f82357ae.tar.gz
llvm-31ebe6647b7f1fc7f6778a5438175b12f82357ae.tar.bz2
Revert "Use global TimerGroups for both new pass manager and old pass manager timers" (#131173)
Reverts llvm/llvm-project#130375 Causes breakages, e.g. https://lab.llvm.org/buildbot/#/builders/160/builds/14607
Diffstat (limited to 'llvm/lib/Support/Timer.cpp')
-rw-r--r--llvm/lib/Support/Timer.cpp26
1 files changed, 5 insertions, 21 deletions
diff --git a/llvm/lib/Support/Timer.cpp b/llvm/lib/Support/Timer.cpp
index 4d3b4f7..eca7268 100644
--- a/llvm/lib/Support/Timer.cpp
+++ b/llvm/lib/Support/Timer.cpp
@@ -222,26 +222,15 @@ public:
StringRef GroupDescription) {
sys::SmartScopedLock<true> L(timerLock());
- std::pair<TimerGroup *, Name2TimerMap> &GroupEntry =
- getGroupEntry(GroupName, GroupDescription);
- Timer &T = GroupEntry.second[Name];
- if (!T.isInitialized())
- T.init(Name, Description, *GroupEntry.first);
- return T;
- }
-
- TimerGroup &getTimerGroup(StringRef GroupName, StringRef GroupDescription) {
- return *getGroupEntry(GroupName, GroupDescription).first;
- }
+ std::pair<TimerGroup*, Name2TimerMap> &GroupEntry = Map[GroupName];
-private:
- std::pair<TimerGroup *, Name2TimerMap> &
- getGroupEntry(StringRef GroupName, StringRef GroupDescription) {
- std::pair<TimerGroup *, Name2TimerMap> &GroupEntry = Map[GroupName];
if (!GroupEntry.first)
GroupEntry.first = new TimerGroup(GroupName, GroupDescription);
- return GroupEntry;
+ Timer &T = GroupEntry.second[Name];
+ if (!T.isInitialized())
+ T.init(Name, Description, *GroupEntry.first);
+ return T;
}
};
@@ -255,11 +244,6 @@ NamedRegionTimer::NamedRegionTimer(StringRef Name, StringRef Description,
: &namedGroupedTimers().get(Name, Description, GroupName,
GroupDescription)) {}
-TimerGroup &NamedRegionTimer::getNamedTimerGroup(StringRef GroupName,
- StringRef GroupDescription) {
- return namedGroupedTimers().getTimerGroup(GroupName, GroupDescription);
-}
-
//===----------------------------------------------------------------------===//
// TimerGroup Implementation
//===----------------------------------------------------------------------===//