[PATCH] D79750: [Inlining] Make shouldBeDeferred static (NFC)

Kazu Hirata via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 11 17:51:12 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0205fabe5dfb: [Inlining] Make shouldBeDeferred static (NFC) (authored by kazu).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79750/new/

https://reviews.llvm.org/D79750

Files:
  llvm/include/llvm/Analysis/InlineAdvisor.h
  llvm/lib/Analysis/InlineAdvisor.cpp


Index: llvm/lib/Analysis/InlineAdvisor.cpp
===================================================================
--- llvm/lib/Analysis/InlineAdvisor.cpp
+++ llvm/lib/Analysis/InlineAdvisor.cpp
@@ -51,9 +51,9 @@
 /// estimated inline cost associated with callsite \p CB.
 /// \p TotalSecondaryCost will be set to the estimated cost of inlining the
 /// caller if \p CB is suppressed for inlining.
-bool llvm::shouldBeDeferred(
-    Function *Caller, InlineCost IC, int &TotalSecondaryCost,
-    function_ref<InlineCost(CallBase &CB)> GetInlineCost) {
+static bool
+shouldBeDeferred(Function *Caller, InlineCost IC, int &TotalSecondaryCost,
+                 function_ref<InlineCost(CallBase &CB)> GetInlineCost) {
   // For now we only handle local or inline functions.
   if (!Caller->hasLocalLinkage() && !Caller->hasLinkOnceODRLinkage())
     return false;
Index: llvm/include/llvm/Analysis/InlineAdvisor.h
===================================================================
--- llvm/include/llvm/Analysis/InlineAdvisor.h
+++ llvm/include/llvm/Analysis/InlineAdvisor.h
@@ -25,14 +25,6 @@
 // Default (manual policy) decision making helper APIs. Shared with the legacy
 // pass manager inliner.
 
-/// Return true if inlining of CB can block the caller from being
-/// inlined which is proved to be more beneficial. \p IC is the
-/// estimated inline cost associated with callsite \p CB.
-/// \p TotalSecondaryCost will be set to the estimated cost of inlining the
-/// caller if \p CB is suppressed for inlining.
-bool shouldBeDeferred(Function *Caller, InlineCost IC, int &TotalSecondaryCost,
-                      function_ref<InlineCost(CallBase &CB)> GetInlineCost);
-
 /// Return the cost only if the inliner should attempt to inline at the given
 /// CallSite. If we return the cost, we will emit an optimisation remark later
 /// using that cost, so we won't do so from this function. Return None if


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79750.263325.patch
Type: text/x-patch
Size: 1908 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200512/eb038a55/attachment.bin>


More information about the llvm-commits mailing list