Make the inline cost a proper analysis pass. This remains essentially
authorChandler Carruth <chandlerc@gmail.com>
Mon, 21 Jan 2013 11:39:18 +0000 (11:39 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 21 Jan 2013 11:39:18 +0000 (11:39 +0000)
commit86953b5795007eaa98838297360a6987e33e92e7
tree8958a38475e5e185639a31da6b9ec61400e67826
parent0378e3916a3d568ee161803d4f0107512e595af8
Make the inline cost a proper analysis pass. This remains essentially
a dynamic analysis done on each call to the routine. However, now it can
use the standard pass infrastructure to reference other analyses,
instead of a silly setter method. This will become more interesting as
I teach it about more analysis passes.

This updates the two inliner passes to use the inline cost analysis.
Doing so highlights how utterly redundant these two passes are. Either
we should find a cheaper way to do always inlining, or we should merge
the two and just fiddle with the thresholds to get the desired behavior.
I'm leaning increasingly toward the latter as it would also remove the
Inliner sub-class split.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173030 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/InlineCost.h
include/llvm/InitializePasses.h
lib/Analysis/InlineCost.cpp
lib/Transforms/IPO/InlineAlways.cpp
lib/Transforms/IPO/InlineSimple.cpp