Profiling llc

Hey guys, I am trying to speed up some of my LLVM/llc passes. Is there a way to use something like gprof on llc? If not, do you guys know anything that I can use to discover which routines of my passes are taking most of the time?



If you have access to a system running OS X, shark is a very good profiling tool. You'd use it like this:

shark -i -1 llc -normal-options-here

This'll produce a .mshark file that you can open with to view all of your profiling goodness!