Trevor Harmon
2010-Jul-20 00:39 UTC
[LLVMdev] Adding required function passes to CallGraphSCCPass
Hi, I have a FunctionPass that needs to process functions in bottom-up order on the call graph (callees before callers). CallGraphSCCPass can provide this ordering, but there's a snag. My pass depends on other passes, such as UnifyFunctionExitNodes and LoopInfo, to process the functions first. With a FunctionPass, I can specify these dependencies in FunctionPass::getAnalysisUsage, but if I convert the pass to a CallGraphSCCPass, I'm not sure what to do. Specifying the same pass dependencies in CallGraphSCCPass::getAnalysisUsage causes "Unable to schedule pass" errors. Any suggestions? Thanks, Trevor