Pranav Bhandarkar
2011-Oct-25 21:14 UTC
[LLVMdev] Using a FunctionPass inside a CallGraphSCCPass
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.
Pranav Bhandarkar
2011-Oct-27 21:00 UTC
[LLVMdev] Using a FunctionPass inside a CallGraphSCCPass
Hi, Is there any guiding principle that has been used to structure the Pass Manager infrastructure related header files. I ask because I see a number of pass managers documented in PassManagers.h but most, except FPPassManager and a couple others, reside in PassManagers.cpp. I want to move FunctionPassManagerImpl into PassManagers.h so that it can be used inside CGPassManager. I want to be able to run function passes on the fly in a CallGraphSCCPass and I think FunctionPassManagerImpl is the only way to do it. Or am I wrong in this conclusion ? Pranav Qualcomm Innovation Center, Inc is a member of the Code Aurora Forum. -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Pranav Bhandarkar Sent: Tuesday, October 25, 2011 4:14 PM To: llvmdev at cs.uiuc.edu Subject: [LLVMdev] Using a FunctionPass inside a CallGraphSCCPass 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. _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Seemingly Similar Threads
- [LLVMdev] Function::getName in CallGraphSCCPass causes bus error
- [LLVMdev] FunctionPass question
- [LLVMdev] Function::getName in CallGraphSCCPass causes bus error
- [LLVMdev] Segmentation fault 'cause of accessing function arguments
- [LLVMdev] Processing functions in call graph SCC "order" with function-level analyses