When analysing a function "fn", my FunctionPass needs some PostDominanceFrontier
information of functions which are called by function "fn".
getAnalysis<PostDominanceFrontier>() cannot give the information, because it only
gives the PostDominanceFrontier information of "fn", not the PostDominanceFrontier
information of functions called by "fn".
How to get the PostDominanceFrontier information of functions which are called by "fn"?
Xia
When analysing a function "fn", my FunctionPass needs some
PostDominanceFrontier information of functions which are called by
function "fn".
Okay, first problem is that your algorithm does not qualify as a
FunctionPass: it should be a general Pass, because it looks at more than
one function at a time.
getAnalysis<PostDominanceFrontier>() cannot give the information,
because it only gives the PostDominanceFrontier information of "fn", not
the PostDominanceFrontier information of functions called by "fn".
Yes.
How to get the PostDominanceFrontier information of functions which are
called by "fn"?
Unfortunately, there is no way to do this currently. The problem is that
Pass instances cannot "require" FunctionPass instances. This is a
long-standing deficiency (e.g., see:
http://llvm.cs.uiuc.edu/docs/WritingAnLLVMPass.html#PassFunctionPass, and
http://llvm.cs.uiuc.edu/PR36), and has been annoying in many different
cases. However, until it bothers someone enough to fix it, it probably
won't be addressed.
Sorry!
-Chris