[PATCH] D147545: [CSSPGO] Stale profile matching(part 2)

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 7 13:23:48 PDT 2023


davidxl added a comment.

consider this scenario:

{

  S1
  foo();
  S2

}

{

  S3
  bar();
  S2

}

The first block including foo() call is shifted in source code, but the bar() block does not.

With this remapping algorithm, A won't find sample, bar() and S2 is fine; but C's location will be wrongly remapped.

I wonder if there is a need to do two way anchoring to handle this.



================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:2220
+      StringRef CalleeName = CallIter->second;
+      auto RA = CalleeToCallsitesMap.find(CalleeName);
+      if (RA != CalleeToCallsitesMap.end()) {
----------------
What does RA stand for?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147545



More information about the llvm-commits mailing list