[PATCH] D123361: [llvm-profgen] Filter out oversized LBR ranges.
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 8 10:31:44 PDT 2022
wenlei added inline comments.
================
Comment at: llvm/tools/llvm-profgen/PerfReader.h:225
+ // Larger LBR ranges are also assumed invalid.
+ return Start <= End && End <= Start + (1 << 20);
+}
----------------
While it has value to have such defensive checks in the tool, I'm wondering what has caused such bad input.
The range check seems hacky. If we have to go with it, we at least need some explanation why it's needed, and call out in comment that this is a workaround.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123361/new/
https://reviews.llvm.org/D123361
More information about the llvm-commits
mailing list