Make callIsSmall accessible as a utility function.
authorDan Gohman <gohman@apple.com>
Fri, 16 Apr 2010 15:14:50 +0000 (15:14 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 16 Apr 2010 15:14:50 +0000 (15:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101463 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/InlineCost.h
lib/Analysis/InlineCost.cpp

index a0c521d7ed3b9755830c852400c99c616e3ae906..066b94396890972e7d8408872164cde053d2e788 100644 (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
index da1238685bcc5a0c565257405261d87f81930854..6650a680f15eaa497e3ac89a4c1cabf22da6da02 100644 (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;