Andreas Neustifter
2009-Sep-16 15:19 UTC
[LLVMdev] FunctionPass Analysis is not saved after ModulePasses run?
Hi, I have a problem with the following scenario: I use the ProfileEstimatorPass to get ProfileInfo and verifiy this info with the ProfileVerifierPass. (Please bear with me, its not about the profiling but about the Pass interaction.) Then the LowerSetJumpPass is executed and I want to verify that the esimtated ProfileInfo survives this pass by calling again the ProfileVerifierPass. This is what it looks like: No Profile Information ModulePass Manager FunctionPass Manager Dominator Tree Construction Natural Loop Information Profiling information estimator Profiling information verifier Lower Set Jump FunctionPass Manager Profiling information verifier Preliminary module verification Dominator Tree Construction Module Verifier Bitcode Writer Unfortunatelly the second execution of the ProfileVerifierPass does not access the ProfileInfo generated by the ProfileEstimator but the one provided by the default ProfileInfo provider (the NoProfileInfo pass). Even telling the PassManager that LowerSetJumpPass preserves the ProfileInfo (AU.addPreserved<ProfileInfo>();) does not change this behavior. Is this intentional? I'm currently modifying passes to preserve ProfileInfo through the whole compilation, to be available in the backend so this is a little counter-productive :-) Is it necessary to add the AU.addPreserved<ProfileInfo>(); to all passes in order for the info to life on? Thanks, Andi