diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-11-30 21:42:45 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-11-30 21:42:45 +0000 |
commit | 8244121b9c130ff2529f3e3ebb3ef2fa4646ba34 (patch) | |
tree | 4d9c389fe7b602c856540196b024210109498450 /lib/VMCore | |
parent | d7956f1feb27db8f908cab7e029e9f2e3359458e (diff) | |
download | external_llvm-8244121b9c130ff2529f3e3ebb3ef2fa4646ba34.zip external_llvm-8244121b9c130ff2529f3e3ebb3ef2fa4646ba34.tar.gz external_llvm-8244121b9c130ff2529f3e3ebb3ef2fa4646ba34.tar.bz2 |
Aggregate pass execution time report by pass ID instead of pass instance.
This avoids unidentified duplicates in the pass execution time report
when a pass runs more than once in the pass manager pipeline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169039 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/PassManager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 1142392..77e7913 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -444,7 +444,7 @@ namespace { static ManagedStatic<sys::SmartMutex<true> > TimingInfoMutex; class TimingInfo { - DenseMap<Pass*, Timer*> TimingData; + DenseMap<AnalysisID, Timer*> TimingData; TimerGroup TG; public: // Use 'create' member to get this. @@ -454,7 +454,7 @@ public: ~TimingInfo() { // Delete all of the timers, which accumulate their info into the // TimerGroup. - for (DenseMap<Pass*, Timer*>::iterator I = TimingData.begin(), + for (DenseMap<AnalysisID, Timer*>::iterator I = TimingData.begin(), E = TimingData.end(); I != E; ++I) delete I->second; // TimerGroup is deleted next, printing the report. @@ -471,7 +471,7 @@ public: return 0; sys::SmartScopedLock<true> Lock(*TimingInfoMutex); - Timer *&T = TimingData[P]; + Timer *&T = TimingData[P->getPassID()]; if (T == 0) T = new Timer(P->getPassName(), TG); return T; |