[cfe-dev] Adding more fine-grained -ftime_report diagnostic info to clang front end

Mark Pauley pauley at unsaturated.net
Sat Aug 1 12:15:40 PDT 2015


Hi List,
	I just found -ftime_report flag, and attempted to use it in order to diagnose why a particular c++ file in my source base is taking many seconds to compile.  Unfortunately, it looks like all of the time is spent in the front end, where there are no fine-grained diagnostic metrics.  I’m guessing #includes and template instantiation (I’m looking at you, boost) but I want to know for sure.

So to that end, I am thinking of using the llvm::TimePassesIsEnabled flag, and adding timers (llvm::Timer) to each of the different subclasses of clang::FrontEndAction to try and get a bead on where all of the time is going.  Does this sound like a good idea?  I am afraid that -ftime_report is aiming at the back end (because of the -f prefix), but it would really be great to allow the front ends to contribute to that view.


Thanks in advance for the help!

-Mark Pauley


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150801/c5c90567/attachment.sig>


More information about the cfe-dev mailing list