[PATCH] D124397: [Test + comment] Add a regression test to guard the 0 hot-caller threshold, and add comment near the threshold definition.

Mingming Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 11:02:29 PDT 2022


mingmingl marked 3 inline comments as done.
mingmingl added a comment.

thanks!



================
Comment at: llvm/lib/Passes/PassBuilderPipelines.cpp:721
+  // Note the cost of a function could be below zero
+  // (see test/Other/new-pm-thinlto-prelink-samplepgo-inline-threshold.ll).
   if (Phase == ThinOrFullLTOPhase::ThinLTOPreLink && PGOOpt &&
----------------
tejohnson wrote:
> Not sure the test reference is needed or wanted here. I would remove that and if anything point to the place in the inline cost handling that shows how we can end up with a negative cost. But probably not necessary - in which case I would combine this with your earlier note "as much as possible" since I think this is the explanation for that aside? I.e. something like "as much as possible as the cost of a function could be negative". Or "as much as possible [1]" and later "[1] Note the cost of a function could be below zero."
Done by revising to  `"as much as possible [1]" and later "[1] Note the cost of a function could be below zero."` (here and below)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124397



More information about the llvm-commits mailing list