[LLVMdev] PassManager Dependence Question

David Greene dag at cray.com
Fri Sep 19 15:11:43 PDT 2008


Let's say I have an analysis pass that's dependent on another analysis pass 
(getAnalysisUsage does the appropraite things).

So Pass Y depends on Pass X.

If some transformation pass depends on Pass Y and Pass Y has not been 
invalidated by another other pass BUT Pass X _has_ been invalidated by some 
other pass, what happens?

I can imagine two likely paths in the current implementation of PassManager:

1. Pass Y is not re-run because it is considered up-to-date

2. Pass Y is re-run after Pass X because Pass X is out-of-date

Which one of these happens?

What I'd really like to do is have Pass X re-run but not Pass Y.  Pass Y only
uses some bookkeeping from Pass X to speed itself up.  Having Pass X
not re-run could cause Pass Y to give wrong answers, but once Pass X is
up-to-date, Pass Y will be fine.

Is this at all possible?

                                              -Dave



More information about the llvm-dev mailing list