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

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 10 11:13:59 PDT 2023


wlei added a comment.

In D147545#4255928 <https://reviews.llvm.org/D147545#4255928>, @wenlei wrote:

>> I wonder if there is a need to do two way anchoring to handle this.
>
> @davidxl can you elaborate on two way anchoring? is that also consider location of non-call site as anchor?  It's trickier to use non-callsite as anchor since we would need a "signature" for block that is unique enough.
>
> Also since this is all in the territory of heuristic and tuning, maybe we can get the initial version in while keep improving it. We got to this version after fair amount of internal evaluation, and it showed good results already. We still plan to keep tuning it though it will take some time to experiment.

I guess what @davidxl meant for two way matching is to spilt the non-anchor range. some matches are based on the start anchor, some are based on the end anchor.

  foo()
  inst1
  inst2
  inst3
  inst4
  bar()

if foo is mismatched and bar is matched, the current version, all inst1-4 will be mismatched.
and if matching in two way, say split evenly,  inst3, inst4 will be matched based on bar().


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