From 52d55bd224ac08dfef959527ca8257f82a80dbb0 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 16 Apr 2010 15:14:50 +0000 Subject: [PATCH] Make callIsSmall accessible as a utility function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101463 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/InlineCost.h | 4 ++++ lib/Analysis/InlineCost.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/llvm/Analysis/InlineCost.h b/include/llvm/Analysis/InlineCost.h index a0c521d7ed3..066b9439689 100644 --- a/include/llvm/Analysis/InlineCost.h +++ b/include/llvm/Analysis/InlineCost.h @@ -189,6 +189,10 @@ namespace llvm { /// 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 diff --git a/lib/Analysis/InlineCost.cpp b/lib/Analysis/InlineCost.cpp index da1238685bc..6650a680f15 100644 --- a/lib/Analysis/InlineCost.cpp +++ b/lib/Analysis/InlineCost.cpp @@ -108,10 +108,10 @@ unsigned InlineCostAnalyzer::FunctionInfo:: 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;