[llvm-dev] TableGen -time-regions option

Paul C. Anagnostopoulos via llvm-dev llvm-dev at lists.llvm.org
Sat Nov 14 04:29:16 PST 2020


The new timing feature lets you insert timers anywhere you want. Each timer stops the previous one. If there are no timers in the backend, then TableGen times the overall backend. 

I've used the new feature to locate the bottleneck in the -emit-dag-isel backend.

At 11/13/2020 10:52 PM, Daniel Sanders wrote:
>Hi Paul,
>
>I'm rather late to the thread but I added the existing -time-regions option when I was debugging a particularly nasty perf problem in TableGen. I really only use it when we have a perf problem downstream.
>
>The main thing I was getting out of it was the ability to annotate periods of time in Xcode Instruments just by adding a NamedRegionTimer to the right function/block (see https://reviews.llvm.org/rGe1414d176048c1f24fc3f54bb923fb48a2b985a3). That helped me track down the work that was taking the time and let me filter out the noise from elsewhere so I could look at the relevant memory allocations+churn. Feel free to change it but I'd like to keep that Instruments integration if we can as I'm sure we'll hit another perf problem sooner or later.


----------------------------------------------------------------
Windfall               Paul C. Anagnostopoulos 
      ----------------------------------------------------------
   Software            978 369-0839
                             www.windfall.com
----------------------------------------------------------------
My life has been filled with calamities,
some of which actually happened.
---Mark Twain 

Guga 'mzimba, sala 'nhliziyo  



More information about the llvm-dev mailing list