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 <a href="http://llvm.org">llvm.org</a> website says that :<br>
<br>
"Currently it is illegal for a <a href="http://llvm.org/docs/WritingAnLLVMPass.html#ModulePass"><tt>ModulePass</tt></a>
to require a <a href="http://llvm.org/docs/WritingAnLLVMPass.html#FunctionPass"><tt>FunctionPass</tt></a>.  This is because
there is only one instance of the <a href="http://llvm.org/docs/WritingAnLLVMPass.html#FunctionPass"><tt>FunctionPass</tt></a> object ever created, thus nowhere
to store information for all of the functions in the program at the same time.
Although this has come up a couple of times before, this has always been worked
around by factoring one big complicated pass into a global and an
interprocedural part, both of which are distinct.  In the future, it would be
nice to have this though."<br>
<br>
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 ?<br>
<br>
Thanks,<br>
-Balpreet<br>