[LLVMdev] Preserving Analysis in ALL Passes
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...
More information about the llvm-dev