[LLVMdev] loop passes vs call graph
Jay Foad
jay.foad at gmail.com
Fri Feb 13 04:45:46 PST 2009
I'm looking at bug 3367.
If I run:
$ opt b.bc -inline -loop-rotate -loop-unswitch -debug-pass=Executions
... it eventually crashes in the inliner, because the call graph isn't
up to date. (NB if you want to reproduce this you'll have to apply my
patch from bug 3367 first.)
The reason the call graph isn't up to date is that -loop-unswitch has
changed a function and not updated the call graph. But that seems OK,
because -loop-unswitch's getAnalysisUsage() method doesn't claim to
preserve the call graph.
So are loop passed *required* to preserved the call graph, in the same
way that CallGraphSCC passes are?
Or should the pass manager take care of rebuilding the call graph
before calling the inliner on an SCC whose functions have been
changed? I don't see any evidence of this happening.
I've attached the full output from -debug-pass=Executions
-debug-only=inline. You can see that the loop pass manager modifies
function readClause(), and then the inliner decides to inline
readClause() into parse_DIMACS_main(), but I don't think the call
graph is being rebuilt in between those two points.
Any ideas?
Thanks,
Jay.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: executions
Type: application/octet-stream
Size: 34890 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090213/785ae7f8/attachment.obj>
More information about the llvm-dev
mailing list