[llvm-commits] [llvm] r169039 - /llvm/trunk/lib/VMCore/PassManager.cpp

Nick Lewycky nicholas at mxc.ca
Sat Dec 1 18:41:29 PST 2012


Jakob Stoklund Olesen wrote:
> Author: stoklund
> Date: Fri Nov 30 15:42:45 2012
> New Revision: 169039
>
> URL: http://llvm.org/viewvc/llvm-project?rev=169039&view=rev
> Log:
> 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.

Please don't do this. It's useful to see how much time each run of a 
pass took. I understand that it's also useful to see how expensive they 
all are, but you can compute that from the former. With this patch in, 
the data for each run is gone and I can't compute it from what I get.

Why is it useful? I can see that a run of instcombine is faster than a 
run of GVN, and I can see that all the runs of instcombine are slower 
than GVN. I can see that we run instcombine three times. I'd like to see 
the impact that a change to the pass pipeline might have. I'd like to 
see how moving passes around affects the relative time each of them takes.

Nick

>
> Modified:
>      llvm/trunk/lib/VMCore/PassManager.cpp
>
> Modified: llvm/trunk/lib/VMCore/PassManager.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassManager.cpp?rev=169039&r1=169038&r2=169039&view=diff
> ==============================================================================
> --- llvm/trunk/lib/VMCore/PassManager.cpp (original)
> +++ llvm/trunk/lib/VMCore/PassManager.cpp Fri Nov 30 15:42:45 2012
> @@ -444,7 +444,7 @@
>   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 @@
>     ~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 @@
>         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;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>




More information about the llvm-commits mailing list