[llvm-commits] [llvm] r101463 - in /llvm/trunk: include/llvm/Analysis/InlineCost.h lib/Analysis/InlineCost.cpp
Chris Lattner
clattner at apple.com
Fri Apr 16 11:21:19 PDT 2010
On Apr 16, 2010, at 8:14 AM, Dan Gohman wrote:
> Author: djg
> Date: Fri Apr 16 10:14:50 2010
> New Revision: 101463
>
> URL: http://llvm.org/viewvc/llvm-project?rev=101463&view=rev
> Log:
> Make callIsSmall accessible as a utility function.
Should this become a method on CallInst?
-Chris
>
> Modified:
> llvm/trunk/include/llvm/Analysis/InlineCost.h
> llvm/trunk/lib/Analysis/InlineCost.cpp
>
> Modified: llvm/trunk/include/llvm/Analysis/InlineCost.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/InlineCost.h?rev=101463&r1=101462&r2=101463&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Analysis/InlineCost.h (original)
> +++ llvm/trunk/include/llvm/Analysis/InlineCost.h Fri Apr 16 10:14:50 2010
> @@ -189,6 +189,10 @@
> /// 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
>
> Modified: llvm/trunk/lib/Analysis/InlineCost.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InlineCost.cpp?rev=101463&r1=101462&r2=101463&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/InlineCost.cpp (original)
> +++ llvm/trunk/lib/Analysis/InlineCost.cpp Fri Apr 16 10:14:50 2010
> @@ -108,10 +108,10 @@
> 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;
>
>
> _______________________________________________
> 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