[PATCH] D99351: [CSSPGO] Top-down processing order based on full profile.

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 30 09:07:32 PDT 2021


hoy added inline comments.


================
Comment at: llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h:73
+      // further result in an SCC order incompatible with the purely
+      // context-based one, wchich may in turn block context-based inlining.
       for (auto &Child : Caller->getAllChildContext()) {
----------------
wenlei wrote:
> typo: which
Fixed.


================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:1605
+  if (!ProfileTopDownLoad && UseProfiledCallGraph)
+    errs() << "WARNING: -use-profiled-call-graph ignored, should be used "
+              "together with -sample-profile-top-down-load.\n";
----------------
wenlei wrote:
> Is this the canonical way of emit warning? Or something through diagnostics like `LLVMContext.diagnose(DiagnosticInfoSampleProfile(..., DS_Warning))`?
The usage of `errs()` to display text messages is quite common, I also used that in lld, though it is not a formal way to emit warnings that users can track in documents.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99351



More information about the llvm-commits mailing list