[LLVMdev] Preserving Analysis in ALL Passes

Andreas Neustifter astifter-llvm at gmx.at
Tue Sep 22 09:16:08 PDT 2009


I'm fighting with this quite some time now: Is there a way to mark an 
Analysis (in my case ProfileInfo) as perserved by _all_ passes?

I have tried to add ProfileInfo directly in Pass.h:getAnalysisUsage() 
but that produces nasty circular library dependecies.

I also tried to simply store a pointer to the ProfileInfo in Module but 
then the PassManager gets confused resulting in double freed memory.

The only thing that helps is adding addPreserved<ProfileInfo>() to each 
pass, but thats quite tedious to do...

Any suggestions?

Thanks, Andi

More information about the llvm-dev mailing list