Few minor changes that were requested. No functional change.
authorEric Christopher <echristo@apple.com>
Thu, 14 Jan 2010 21:48:00 +0000 (21:48 +0000)
committerEric Christopher <echristo@apple.com>
Thu, 14 Jan 2010 21:48:00 +0000 (21:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93462 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/InlineCost.cpp

index 87b2361db6a76c375e298fde02fa657fc69a1cfe..578b2b6946f53b088cd8ad4bcc2d12986292be30 100644 (file)
@@ -102,11 +102,15 @@ unsigned InlineCostAnalyzer::FunctionInfo::
   return Reduction;
 }
 
-// callIsSmall - If a call will lower to a single selection DAG node, or
+// 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) {
-  if (F && !F->hasLocalLinkage() && F->hasName()) {
+  if (!F) return false;
+  
+  if (F->hasLocalLinkage()) return false;
+  
+  if (F->hasName()) {
     StringRef Name = F->getName();
     
     // These will all likely lower to a single selection DAG node.