[llvm-dev] Interpreting DSCallGraph results
Christian Convey via llvm-dev
llvm-dev at lists.llvm.org
Mon Dec 28 11:02:08 PST 2015
Any suggestions for how to interpret DSCallGraph's output for the following?
I'm trying to use DSCallGraph to get a conservative estimate of a
whole-program SCC call graph. I wanted to see how it handles real
call-graph cycles involving functions both internal and external to the
module. So I made a test program with the following actual call graph,
using the standard library's "qsort" function:
main --> DoSorting
DoSorting --> qsort(..., QsortCallback)
qsort --> QsortCallback (via callback)
QsortCallback --> DoSorting
There were two things in DSCallGraph's results which surprised me:
- "qsort" was placed into its own SCC (according to
DSCallGraph::scc_begin/end).
- "qsort" 's SCC did not have any callees (according to
DSCallGraph::flat_callee_begin/end).
I'm not sure that DSCallGraph's output is *wrong*, because it does report
these caveats:
- DSCallGraph::called_from_incomplete_site( @QsortCallback ) returns
true.
- For all three callsites in the Module,
DSCallGraph::callee_is_complete(...) returns false.
Must I assume that the entire Module could be a single SCC whenever
"called_from_incomplete_site" returns true "callee_is_complete" returns
false?
And if I *do* need to be that pessimistic, anyone know why DSCallGraph
doesn't apply that pessimism itself and return a single-SCC call graph in
such cases?
Thanks,
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151228/0fa94950/attachment.html>
More information about the llvm-dev
mailing list