[PATCH] D150466: profilie inference changes for stale profile matching

Sergey Pupyrev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 12 11:19:12 PDT 2023


spupyrev marked an inline comment as done.
spupyrev added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SampleProfileInference.cpp:1339
+  // Quit early for functions with a single block or ones w/o samples
+  if (Func.Blocks.size() <= 1 || !HasSamples)
+    return;
----------------
hoy wrote:
> Wondering in what cases a function doesn't come in with samples? Thought we should have bailed out on a higher level in the sample loader.
This is going to be called from BOLT in addition to sample loader. One scenario when a function doesn't have samples is when its profile data is so stale that we couldn't match a single block/jump/call.
(I agree that check could be verified earlier but i don't see a big advantage.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150466



More information about the llvm-commits mailing list