Unnamed pass in on the fly pass manager

I have written a module pass. When I use the debug pass structure
option, the name of my module pass is printed but then I get "Unnamed
pass" when the FunctionPassManagerImpl *FPP calls dumpPassStructure
(in PassManager.cpp). Is this the expected behavior, or should I be
concerned that there is an error in my approach?


Update: the "unnamed pass" is PostDominatorTree. My module pass
requires PDT (specified in its getAnalysisUsage). When it visits a
function, it calls getAnalysis<PostDominatorTree>(), which triggers
the failed assertion "getAnalysis*() called on an analysis that was
not 'required' by pass!"

This issue has been addressed on this mailing list, but it seems the
previous problem had to do with attempting to getAnalysis during
doInitialization, which I do not do.

I am snooping through the PassManager (and related) code. Perhaps
someone could point me in the right direction or suggest that my
approach is wrong.



For the record, there were two issues:
1) I was not passing the Function to getAnalysis for the PDT.
2) I was attempting to getAnalysis on external functions.

Hi Scott,

I tried to clarify this in the WritingAnLLVMPass document a little
while ago, but if you can think of better wording or another place to
put a pointer, let me know.


- Daniel