[LLVMdev] Using a FunctionPass inside a CallGraphSCCPass

Pranav Bhandarkar pranavb at codeaurora.org
Tue Oct 25 14:14:17 PDT 2011


Hi,

I am writing a CallGraphSCCPass that uses LoopInfo which is a FunctionPass.
However, doing so results in the following error.
****
Unable to schedule 'Natural Loop Information' required by '......'
****

Google led me to this page, where Devang Patel suggests implementing the
addLowerLevelRequiredPasses in CGPassManager in a manner similar to
MPPassManager.
http://old.nabble.com/DominatorTree-Information-required-in-CallGraphPass-td
21968640.html

I tried this but to get analysis passes on the fly I need to use
FunctionPassManagerImpl in CallGraphSCCPass.cpp which I cannot because it is
not part of any header file.
I tried  using FunctionPassManager but it does not implement
getOnTheFlyPass() required by getAnalysis(). I also tried putting
CGPassManager in PassManager.cpp (and therefore in libLLVMCore.a ?) but the
build failed due to a cyclic dependency between libLLVMCore.a,
libLLVMAnalysis.a and libLLVMipa.a.

Any pointers to resolving this would be greatly appreciated.

Thanks in advance,
Pranav
Qualcomm Innovation Center, Inc is a member of the Code Aurora Forum.




More information about the llvm-dev mailing list