[LLVMdev] Using Profile Information

Andreas Neustifter astifter-llvm at gmx.at
Thu Feb 25 13:20:43 PST 2010

Ah BTW...

On 25.02.2010, at 17:33, ambika wrote:

>     ProfileInfo *PI;
>     PI = &getAnalysis<ProfileInfo>();

If this _in_ your pass, then you have to register the usage of this in  
the getAnalysisUsage() method:

void getAnalysisUsage(AnalysisUsage &AU) const {

Also you have to ensure that the pass you are using is executed right  
after the ProfileInfoLoader, currently not all passes are preserving  
the profile information.

If you need intermediate passes I already have a patch that preserves  
(most) of the information, I'm waiting for after 2.7 to put this in...


More information about the llvm-dev mailing list