[LLVMdev] AnalysisUsage & Call Graph SCC Pass Manager

Julien Lerouge jlerouge at apple.com
Thu Feb 26 18:01:55 PST 2009


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 ?

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



More information about the llvm-dev mailing list