[PATCH] D97998: [CSSPGO] llvm-profdata support for CS profile.

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 5 09:40:42 PST 2021


hoy added inline comments.


================
Comment at: llvm/tools/llvm-profdata/llvm-profdata.cpp:701
     ProfileIsProbeBased = FunctionSamples::ProfileIsProbeBased;
+    if (ProfileIsCS && ProfileIsCS != FunctionSamples::ProfileIsCS)
+      exitWithError("cannot merge CS profile with non-CS profile");
----------------
wenlei wrote:
> I see explicit hasValue() call used all over the place for Optional values, and I also feel it's more readable to spell it out instead of relying on operator(). Not sure if it's an established convention though.
Not sure about the convention. There are also usages like this (using operator()) in LLVM. But agreed it's more clear with `hasValue()`. Will change to that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97998



More information about the llvm-commits mailing list