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.
> Andrew
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.):
Requirements:
- several conflicting passes before myPass
- call runOnFunction in reverse topological order
- have DominatorTree, ETForest, LoopInfo and some other analyses
available
- 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) {
doStuff();
}
}
- 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)
Thx.
Domagoj
--
___________________________________________________
Play 100s of games for FREE! http://games.mail.com/