Félix Cloutier
2015-May-19 03:45 UTC
[LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
Hi all, I have one analysis pass that I want to perform on call graph SCCs. However, for each function in the SCC, I need function-level analyses, like the dominator tree and the memory dependency analysis. I’ve been told before <http://stackoverflow.com/questions/30059622/using-dominatortreewrapperpass-in-callgraphsccpass> that these were not available from a CallGraphSCCPass. What would be the best approach for me to access this information? Should I run the passes manually, or is there another, more pass-scheduler-friendly approach? Félix -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150518/eae419ef/attachment.html>
John Criswell
2015-May-19 14:12 UTC
[LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
On 5/18/15 10:45 PM, Félix Cloutier wrote:> Hi all, > > I have one analysis pass that I want to perform on call graph SCCs. > However, for each function in the SCC, I need function-level analyses, > like the dominator tree and the memory dependency analysis. > > I’ve been told before > <http://stackoverflow.com/questions/30059622/using-dominatortreewrapperpass-in-callgraphsccpass> that > these were not available from a CallGraphSCCPass. What would be the > best approach for me to access this information? Should I run the > passes manually, or is there another, more pass-scheduler-friendly > approach?I would write a ModulePass that simply iterates over the call graph. LLVM provides a CallGraph analysis which one can use to find SCCs; DSA has an analysis called CallTargets which does "real" CallGraph analysis (which means that it tries to reason about function pointers, though I cannot guarantee that its reasoning will be as accurate as you want). If you use a ModulePass, can you analyze any part of the program you like, and you can use FunctionPasses. Regards, John Criswell> > Félix > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-- John Criswell Assistant Professor Department of Computer Science, University of Rochester http://www.cs.rochester.edu/u/criswell -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150519/0c072845/attachment.html>
Félix Cloutier
2015-May-19 15:04 UTC
[LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
Thanks John. Does this solve the problem of analysis availability though? If I still have to run the function analyses manually, I might as well keep rolling with the CallGraphSCCPass. (I probably should have mentioned that this is what I’m using right now.) Félix> Le 2015-05-19 à 10:12:32, John Criswell <jtcriswel at gmail.com> a écrit : > > On 5/18/15 10:45 PM, Félix Cloutier wrote: >> Hi all, >> >> I have one analysis pass that I want to perform on call graph SCCs. However, for each function in the SCC, I need function-level analyses, like the dominator tree and the memory dependency analysis. >> >> I’ve been told before <http://stackoverflow.com/questions/30059622/using-dominatortreewrapperpass-in-callgraphsccpass> that these were not available from a CallGraphSCCPass. What would be the best approach for me to access this information? Should I run the passes manually, or is there another, more pass-scheduler-friendly approach? > > I would write a ModulePass that simply iterates over the call graph. LLVM provides a CallGraph analysis which one can use to find SCCs; DSA has an analysis called CallTargets which does "real" CallGraph analysis (which means that it tries to reason about function pointers, though I cannot guarantee that its reasoning will be as accurate as you want). > > If you use a ModulePass, can you analyze any part of the program you like, and you can use FunctionPasses. > > Regards, > > John Criswell > >> >> Félix >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu> http://llvm.cs.uiuc.edu <http://llvm.cs.uiuc.edu/> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev <http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev> > > > -- > John Criswell > Assistant Professor > Department of Computer Science, University of Rochester > http://www.cs.rochester.edu/u/criswell <http://www.cs.rochester.edu/u/criswell>-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150519/3928b0eb/attachment.html>