[LLVMdev] AnalysisUsage & Call Graph SCC Pass Manager

Devang Patel dpatel at apple.com
Tue Mar 3 11:13:22 PST 2009


On Feb 26, 2009, at 6:01 PM, Julien Lerouge wrote:

> Hello,
>
> I have the following sequence of passes (using --debug- 
> pass=Structure):
>
> ...
>  ModulePass Manager
>    FunctionPass Manager
>      Preliminary module verification
>      Dominator Tree Construction
>      Module Verifier
>    MyModulePass0
>    MyAnalysis
>    Basic CallGraph Construction
>    MyModulePass1
>    MyAnalysis
>    MyModulePass2
>    Basic CallGraph Construction
>    Call Graph SCC Pass Manager
>      MyCallGraphSCCPass
>    MyModulePass3
>    ...
>
> I have the following analysis usages:
>
> MyModulePass0 does not require anything and does not preserve  
> anything.
> MyModulePass1 requires MyAnalysis & Callgraph but does not preserve  
> them.
> MyModulePass2 requires MyAnalysis and preserves it.
> MyCallGraphSCCPass requires MyAnalysis but does not preserve it.
> MyModulePass3 requires MyAnalysis and preserves it.
>
> I am expecting MyAnalysis to be re-scheduled between  
> MyCallGraphSCCPass and
> MyModulePass3 but it's not happening.
>
> If I set MyModulePass3 to not preserve MyAnalysis, then I see  
> MyAnalysis
> re-scheduled after MyModulePass3.
>
> It seems like the fact that MyAnalysis is not preserved by  
> MyCallGraphSCCPass
> is somehow not propagated outside the Call Graph SCC Pass Manager.
>
> Is there something wrong with that sequence ?

It is a bug. CGPassManager is  incorrectly claiming that it is  
preserving all analysis info.
-
Devang
>
>
> Thanks,
> Julien
>
> -- 
> Julien Lerouge
> PGP Key Id: 0xB1964A62
> PGP Fingerprint: 392D 4BAD DB8B CE7F 4E5F FA3C 62DB 4AA7 B196 4A62
> PGP Public Key from: keyserver.pgp.com
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-
Devang






More information about the llvm-dev mailing list