[PATCH] D134114: [Analysis] Introduce isSoleCallToLocalFunction (NFC)
    Kazu Hirata via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Sun Sep 18 09:28:45 PDT 2022
    
    
  
kazu added inline comments.
================
Comment at: llvm/lib/Analysis/InlineCost.cpp:1068
+static bool isSoleCallToLocalFunction(const CallBase &CB,
+                                      const Function &Callee) {
+  return Callee.hasLocalLinkage() && Callee.hasOneLiveUse() &&
----------------
mtrofin wrote:
> Isn't the Callee obtainable from CB?
Yes, `Callee` is obtainable from `CB` on direct calls.  On indirect calls, the callers of this function may specify `Callee` that is not obtainable `CB`.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134114/new/
https://reviews.llvm.org/D134114
    
    
More information about the llvm-commits
mailing list