aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/LegacyPassManager.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-11-18 19:43:18 +0000
committerMatthias Braun <matze@braunis.de>2016-11-18 19:43:18 +0000
commit9f15a79e5d89a814480eb2e0e53ff0e13d56fc8f (patch)
tree9ac5e562dd11f972a05a4878d32dfc27588fe34c /llvm/lib/IR/LegacyPassManager.cpp
parentb51774ac8ca27bb4705a61754781382fadbd1f22 (diff)
downloadllvm-9f15a79e5d89a814480eb2e0e53ff0e13d56fc8f.zip
llvm-9f15a79e5d89a814480eb2e0e53ff0e13d56fc8f.tar.gz
llvm-9f15a79e5d89a814480eb2e0e53ff0e13d56fc8f.tar.bz2
Timer: Track name and description.
The previously used "names" are rather descriptions (they use multiple words and contain spaces), use short programming language identifier like strings for the "names" which should be used when exporting to machine parseable formats. Also removed a unused TimerGroup from Hexxagon. Differential Revision: https://reviews.llvm.org/D25583 llvm-svn: 287369
Diffstat (limited to 'llvm/lib/IR/LegacyPassManager.cpp')
-rw-r--r--llvm/lib/IR/LegacyPassManager.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp
index 458aeb8..628a67b 100644
--- a/llvm/lib/IR/LegacyPassManager.cpp
+++ b/llvm/lib/IR/LegacyPassManager.cpp
@@ -449,7 +449,7 @@ class TimingInfo {
TimerGroup TG;
public:
// Use 'create' member to get this.
- TimingInfo() : TG("... Pass execution timing report ...") {}
+ TimingInfo() : TG("pass", "... Pass execution timing report ...") {}
// TimingDtor - Print out information about timing information
~TimingInfo() {
@@ -472,8 +472,10 @@ public:
sys::SmartScopedLock<true> Lock(*TimingInfoMutex);
Timer *&T = TimingData[P];
- if (!T)
- T = new Timer(P->getPassName(), TG);
+ if (!T) {
+ StringRef PassName = P->getPassName();
+ T = new Timer(PassName, PassName, TG);
+ }
return T;
}
};