Make callIsSmall accessible as a utility function.

llvm-svn: 101463
This commit is contained in:
Dan Gohman 2010-04-16 15:14:50 +00:00
parent 5efc56e36b
commit b3862ecd48
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;