Revert r169039, "Aggregate pass execution time report by pass ID instead of pass instance."

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169134 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2012-12-03 17:31:11 +00:00
parent 255f89faee
commit d30f168616

View File

@@ -444,7 +444,7 @@ namespace {
static ManagedStatic<sys::SmartMutex<true> > TimingInfoMutex; static ManagedStatic<sys::SmartMutex<true> > TimingInfoMutex;
class TimingInfo { class TimingInfo {
DenseMap<AnalysisID, Timer*> TimingData; DenseMap<Pass*, Timer*> TimingData;
TimerGroup TG; TimerGroup TG;
public: public:
// Use 'create' member to get this. // Use 'create' member to get this.
@@ -454,7 +454,7 @@ public:
~TimingInfo() { ~TimingInfo() {
// Delete all of the timers, which accumulate their info into the // Delete all of the timers, which accumulate their info into the
// TimerGroup. // TimerGroup.
for (DenseMap<AnalysisID, Timer*>::iterator I = TimingData.begin(), for (DenseMap<Pass*, Timer*>::iterator I = TimingData.begin(),
E = TimingData.end(); I != E; ++I) E = TimingData.end(); I != E; ++I)
delete I->second; delete I->second;
// TimerGroup is deleted next, printing the report. // TimerGroup is deleted next, printing the report.
@@ -471,7 +471,7 @@ public:
return 0; return 0;
sys::SmartScopedLock<true> Lock(*TimingInfoMutex); sys::SmartScopedLock<true> Lock(*TimingInfoMutex);
Timer *&T = TimingData[P->getPassID()]; Timer *&T = TimingData[P];
if (T == 0) if (T == 0)
T = new Timer(P->getPassName(), TG); T = new Timer(P->getPassName(), TG);
return T; return T;