Make callIsSmall accessible as a utility function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101463 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2010-04-16 15:14:50 +00:00
parent a5145c8d5a
commit 52d55bd224
2 changed files with 8 additions and 4 deletions

View File

@ -189,6 +189,10 @@ namespace llvm {
/// eliminated.
void growCachedCostInfo(Function* Caller, Function* Callee);
};
/// callIsSmall - If a call is likely to lower to a single target instruction,
/// or is otherwise deemed small return true.
bool callIsSmall(const Function *Callee);
}
#endif

View File

@ -108,10 +108,10 @@ unsigned InlineCostAnalyzer::FunctionInfo::
return Reduction;
}
// callIsSmall - If a call is likely to lower to a single target instruction, or
// is otherwise deemed small return true.
// TODO: Perhaps calls like memcpy, strcpy, etc?
static bool callIsSmall(const Function *F) {
/// callIsSmall - If a call is likely to lower to a single target instruction,
/// or is otherwise deemed small return true.
/// TODO: Perhaps calls like memcpy, strcpy, etc?
bool llvm::callIsSmall(const Function *F) {
if (!F) return false;
if (F->hasLocalLinkage()) return false;