[LLVMdev] FunctionPass Analysis is not saved after ModulePasses run?
Devang Patel
devang.patel at gmail.com
Wed Sep 16 10:18:36 PDT 2009
On Wed, Sep 16, 2009 at 8:07 AM, Andreas Neustifter
<e0325716 at student.tuwien.ac.at> wrote:
> 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).
>
I have not studied Profile* passes in detail but, if you have function
F1 and F2 in your module then execution sequence is
No Profile Information
ModulePass Manager
FunctionPass Manager
Dominator Tree Construction - F1
Natural Loop Information - F1
Profiling information estimator - F1
Profiling information verifier - F1
Dominator Tree Construction - F2
Natural Loop Information - F2
Profiling information estimator - F2
Profiling information verifier - F2
Lower Set Jump - F1 & F2
At this point, last run of profile information estimator operated on
F2 and it was released at then end of FunctionPass manager before
Lower Set Jump pass run.
FunctionPass Manager
Profiling information verifier - F1
Preliminary module verification - F1
Use -debug-pass=Details command line option to understand pass
execution sequence.
-
Devang
More information about the llvm-dev
mailing list