[llvm] [SampleFDO] Improve stale profile matching by diff algorithm (PR #87375)
Lei Wang via llvm-commits
llvm-commits at lists.llvm.org
Wed May 8 18:51:05 PDT 2024
================
@@ -19,6 +19,59 @@
namespace llvm {
+// Callsite location based matching anchor.
+struct Anchor {
+ LineLocation Loc;
+ FunctionId FuncId;
+
+ Anchor(const LineLocation &Loc, const FunctionId &FuncId)
+ : Loc(Loc), FuncId(FuncId) {}
+ Anchor(const LineLocation &Loc, StringRef &FName) : Loc(Loc), FuncId(FName) {}
+ bool operator==(const Anchor &Other) const {
----------------
wlei-llvm wrote:
I see, changed to `using Anchor = std::pair<LineLocation, FunctionId>;` and removed this struct.
https://github.com/llvm/llvm-project/pull/87375
More information about the llvm-commits
mailing list