[llvm-commits] [llvm] r93462 - /llvm/trunk/lib/Analysis/InlineCost.cpp

Eric Christopher echristo at apple.com
Thu Jan 14 13:48:00 PST 2010


Author: echristo
Date: Thu Jan 14 15:48:00 2010
New Revision: 93462

URL: http://llvm.org/viewvc/llvm-project?rev=93462&view=rev
Log:
Few minor changes that were requested. No functional change.

Modified:
    llvm/trunk/lib/Analysis/InlineCost.cpp

Modified: llvm/trunk/lib/Analysis/InlineCost.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InlineCost.cpp?rev=93462&r1=93461&r2=93462&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/InlineCost.cpp (original)
+++ llvm/trunk/lib/Analysis/InlineCost.cpp Thu Jan 14 15:48:00 2010
@@ -102,11 +102,15 @@
   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.





More information about the llvm-commits mailing list