[PATCH] D95024: [NFC] Factor out common part for CSSPGO inline and AFDO inline

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 21 13:23:34 PST 2021


wmi accepted this revision.
wmi added a comment.
This revision is now accepted and ready to land.

That is a very helpful refactoring. Thanks!



================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:420
   const FunctionSamples *findFunctionSamples(const Instruction &I) const;
-  CallBase *tryPromoteIndirectCall(Function &F, StringRef CalleeName,
-                                   uint64_t &Sum, uint64_t Count, CallBase *I,
-                                   const char *&Reason);
-  bool inlineCallInstruction(CallBase &CB,
-                             const FunctionSamples *CalleeSamples);
+  bool tryPromoteAndInlineCandidate(
+      Function &F, InlineCandidate &Candidate, uint64_t &Sum,
----------------
Maybe have a comment explaining the params, especially showing some of them are input and some are output.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95024



More information about the llvm-commits mailing list