For debugging PGO performance, it is useful to have a facility to filter out profiles at a function-level granularity while merging. This will help in checking the impact of a set of function profiles on performance.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Added error reporting for options that are not yet supported with -exclude-function option
| llvm/test/tools/llvm-profdata/merge-filtering.test | ||
|---|---|---|
| 58 | I'd expect the regular expression here to be something like foo.*, not foo? | |
| llvm/tools/llvm-profdata/llvm-profdata.cpp | ||
| 339 | To me, this looks like it's matching a substring, not a regex. /// Return true if the given string is a substring of *this, and false
/// otherwise.
[[nodiscard]] bool contains(StringRef Other) const {
return find(Other) != npos;
}I'd expect this to use the utilities from llvm/include/llvm/Support/Regex.h | |
| 346 | clang-format should remove these braces | |
| 1281 | I think you can de Morgan this: "Exclude functions whose names match any regex in a semicolon-separated list" | |
Removed redundant feature of semicolon-separated exclude patterns, since regex can handle that
| llvm/tools/llvm-profdata/llvm-profdata.cpp | ||
|---|---|---|
| 1314 | The check above is for !SuppInstrWithSample, so this code could issue a wrong error message. | |
| llvm/tools/llvm-profdata/llvm-profdata.cpp | ||
|---|---|---|
| 1314 | The check above is for !SupplInstrWithSample.empty(). I don't see how this is a wrong error message, since exclude-function functionality is not supported with the -supplement-instr-with-sample option. | |
I'd expect the regular expression here to be something like foo.*, not foo?