Conflicting passes?

Hi Andrew,

This should really be in the FAQ. But sufice to say if you make
your pass a function pass, you will be fine.

Thx for you reply.

I think I can squeeze everything into a function pass, but I'd
like to run this by you, just in the case I mixed-up something:
(Chris, I'd also appreciate you wise thoughts on this. I'm sure
that other users are banging into this wall too.):

- several conflicting passes before myPass
- call runOnFunction in reverse topological order
- have DominatorTree, ETForest, LoopInfo and some other analyses
- possibly, I'll need access to DSAA

Possible solution:
- batch the conflicting transforms
- write myPass as a subclass of FunctionPass
- write myPass.runOnFunction like:
runOnFunction() {
  if (!calledFromPassManager) {
- use CallGraph within myPass.runOnModule, set
  calledFromPassManager=false, call runOnFunction
  in reverse topological order. This bullet relies
  on the assumption that FunctionPass.runOnModule can
  be freely used without any limitations.
- If I understood correctly, FunctionPasses can use
  ModulePasses (and therefore also DSAA)