mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-02 00:16:25 +00:00
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. llvm-svn: 169039
This commit is contained in:
parent
4ca39306cc
commit
4d93e09b41
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user