[LLVMdev] ModulePasses requiring FunctionPasses

Chris Lattner sabre at nondot.org
Mon May 1 13:40:28 PDT 2006

On Mon, 1 May 2006, Balpreet Pankaj wrote:

> I am trying to write a ModulePass which requires PostDominator sets for
> every function in the module. Now finding post dominators is  a function
> pass. The link on the llvm.org website says that :
> "Currently it is illegal for a
> ModulePass<http://llvm.org/docs/WritingAnLLVMPass.html#ModulePass>to
> require a
> FunctionPass <http://llvm.org/docs/WritingAnLLVMPass.html#FunctionPass>.

Yup :(

> This says that we can work around by factoring the code into a global and
> interprocedural part. If so, is our global pass a Module pass ? And then,
> how do the global and inter-procedural passes interact ? Is there a specific
> example where this has been done before ?

I don't know of any specific examples in the source code. :(



More information about the llvm-dev mailing list