refactor the interface to InlineFunction so that most of the in/out

arguments are handled with a new InlineFunctionInfo class.  This 
makes it easier to extend InlineFunction to return more info in the
future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102137 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-04-22 23:07:58 +00:00
parent 9517144f53
commit 60915146f4
6 changed files with 64 additions and 47 deletions

View File

@ -129,7 +129,8 @@ void BasicInlinerImpl::inlineFunctions() {
}
// Inline
if (InlineFunction(CS, NULL, TD)) {
InlineFunctionInfo IFI(0, TD);
if (InlineFunction(CS, IFI)) {
if (Callee->use_empty() && (Callee->hasLocalLinkage() ||
Callee->hasAvailableExternallyLinkage()))
DeadFunctions.insert(Callee);