Implement (but don't enable) PR6724 and rdar://6295824. In short,
authorChris Lattner <sabre@nondot.org>
Wed, 21 Apr 2010 00:47:40 +0000 (00:47 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 21 Apr 2010 00:47:40 +0000 (00:47 +0000)
commit08e322db8a544d100f7518cfbd39ef8c13067698
treedf2db3f5271f3107a90cbac7c24a705820d8e0a2
parent30fdb5c2ac35b8af818ee62bfd184357f20eca34
Implement (but don't enable) PR6724 and rdar://6295824.  In short,
we have RefreshCallGraph detect when a function pass devirtualizes
a call, and have CGSCCPassMgr iterate (up to a count) when this
happens.  This allows (in the example) GVN to devirtualize the
call in foo, then the inliner to inline it away.

This is not currently enabled because I haven't done any analysis
on the (potentially substantial) code size or performance impact of
doing this, and guess what, it exposes callgraph updating bugs in
various passes.  This is progress though, and you can play with it
by passing -max-cg-scc-iterations=5 to opt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101973 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/IPA/CallGraphSCCPass.cpp
test/Transforms/Inline/gvn-inline-iteration.ll [new file with mode: 0644]