LLVM has merged a very useful feature for the Clang 9.0 release this autumn: the -ftime-trace feature allows producing time trace profiling data in a friendly format that is useful for developers to better understand where the compiler is spending most of its time and other areas for improvement…
Source: Phoronix – LLVM Clang 9.0 Adds “-ftime-trace” To Produce Useful Time Trace Profiling Data