[LLVMdev] modulepass requiring a functionpass
sabre at nondot.org
Sun Oct 8 16:59:24 PDT 2006
On Sun, 8 Oct 2006, Ryan M. Lefever wrote:
> I have a ModulePass, which we'll call MP, that generates a dependency
> graph for an entire program. I want MP to require the
> UnifyFunctionExitNodes pass, which is a FunctionPass. Since its not
> possible to make a ModulePass depend on a FunctionPass, is my only
> choice to make MP a FunctionPass in which the runOnFunction() routine
> does nothing, and the doFinalization routine does all the work that the
> runOnModule() pass did when MP was a ModulePass?
Yes. Alternatively, you could arrange for the unifyfunctionexitnodes pass
to always be run before yours through other ways: i.e. always pass the
option to opt or something.
More information about the llvm-dev