[llvm] [SampleFDO] Stale profile call-graph matching (PR #92151)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 1 16:56:28 PDT 2024


================
@@ -160,6 +186,48 @@ class SampleProfileMatcher {
   void runStaleProfileMatching(const Function &F, const AnchorMap &IRAnchors,
                                const AnchorMap &ProfileAnchors,
                                LocToLocMap &IRToProfileLocationMap);
+  /// Find the existing or new matched function using the profile name.
+  ///
+  /// \returns The function and a match state.
+  std::pair<Function *, MatchState>
+  findFunction(const FunctionId &ProfFunc,
----------------
WenleiHe wrote:

maybe more clear if we name it `findFuncByProfileName`

https://github.com/llvm/llvm-project/pull/92151


More information about the llvm-commits mailing list