[PATCH] D91756: [CSSPGO] Pseudo probes for function calls.
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 1 21:16:02 PST 2020
wmi added inline comments.
================
Comment at: llvm/include/llvm/IR/PseudoProbe.h:33-34
+ static uint32_t packProbeData(uint32_t Index, uint32_t Type) {
+ assert(Index <= 0xFFFF);
+ assert(Type <= 0x7);
+ return (Index << 3) | (Type << 26) | 0x7;
----------------
Add assertion messages here and the other places.
================
Comment at: llvm/lib/Transforms/IPO/SampleProfileProbe.cpp:136-138
+ for (auto &I : CallProbeIds) {
+ auto Call = I.first;
+ uint32_t Index = I.second;
----------------
hoy wrote:
> wmi wrote:
> > for (auto &[Call, Index] : CallProbeIds) {
> Thanks for the suggestion. This is a C++17 usage and may cause a warning with the current build setup which defaults to C++14 (due to -Wc++17)
Ah, right. I mistakenly remember I saw that somewhere in llvm codebase. llvm coding standard says we should use c++14.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91756/new/
https://reviews.llvm.org/D91756
More information about the llvm-commits
mailing list