diff options
author | Eric Christopher <echristo@apple.com> | 2010-01-14 21:48:00 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-01-14 21:48:00 +0000 |
commit | 35dd9e8e1d46483933954343837ebfbc95b40bc0 (patch) | |
tree | b4763793e6dcde359470a87c70959ec2e4e7705b /llvm/lib/Analysis | |
parent | 2d63010a9c64536ad27d982151f0de8ad7ce843b (diff) | |
download | bcm5719-llvm-35dd9e8e1d46483933954343837ebfbc95b40bc0.tar.gz bcm5719-llvm-35dd9e8e1d46483933954343837ebfbc95b40bc0.zip |
Few minor changes that were requested. No functional change.
llvm-svn: 93462
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/InlineCost.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index 87b2361db6a..578b2b6946f 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -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. |