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

Chris Lattner clattner at apple.com
Thu Jan 14 14:48:23 PST 2010


On Jan 14, 2010, at 1:48 PM, Eric Christopher wrote:

> 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.

Ok, now invert the "if (F->hasName())" branch too please :)

-Chris

>
> 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.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list