[LLVMdev] counting branch frequencies

Alastair Murray alastairmurray42 at gmail.com
Wed Sep 19 09:37:55 PDT 2012

Hi Prashantha,

On 19/09/12 10:27, Rao, Prashantha wrote:
> Can we not run the -insert-edge-profiling and -profile-loader passes
> at the beginning of the opt?  Orthogonal point is, is it worth doing
> any optimizations when -insert-edge-profiling is specified on
> command line?

Yes, we could, and if they were tied into the early pass code it would 
prevent a lot of confusion (though the early pass stuff only happens for 
-O[1-9] or -std-compile-opts, but I'm sure something could be figured out).

Though for Apala's case (using LLVM 3.1) it would be disastrous as 
nothing preserves ProfileInfo.  Branch weight metadata (LLVM 3.2 
-profile-metadata-loader) would do much better as a lot of effort (not 
me, others!) has gone into making sure that the metadata is preserved.


More information about the llvm-dev mailing list