[PATCH] D134287: [llvm-profgen] Remove CommaSeparated option from perf file cl
Lei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 21 09:46:52 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc136d8582b3d: [llvm-profgen] Remove CommaSeparated option from perf file cl (authored by wlei).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134287/new/
https://reviews.llvm.org/D134287
Files:
llvm/tools/llvm-profgen/llvm-profgen.cpp
Index: llvm/tools/llvm-profgen/llvm-profgen.cpp
===================================================================
--- llvm/tools/llvm-profgen/llvm-profgen.cpp
+++ llvm/tools/llvm-profgen/llvm-profgen.cpp
@@ -24,7 +24,6 @@
static cl::opt<std::string> PerfScriptFilename(
"perfscript", cl::value_desc("perfscript"),
- llvm::cl::MiscFlags::CommaSeparated,
cl::desc("Path of perf-script trace created by Linux perf tool with "
"`script` command(the raw perf.data should be profiled with -b)"),
cl::cat(ProfGenCategory));
@@ -32,7 +31,7 @@
cl::aliasopt(PerfScriptFilename));
static cl::opt<std::string> PerfDataFilename(
- "perfdata", cl::value_desc("perfdata"), llvm::cl::MiscFlags::CommaSeparated,
+ "perfdata", cl::value_desc("perfdata"),
cl::desc("Path of raw perf data created by Linux perf tool (it should be "
"profiled with -b)"),
cl::cat(ProfGenCategory));
@@ -41,7 +40,6 @@
static cl::opt<std::string> UnsymbolizedProfFilename(
"unsymbolized-profile", cl::value_desc("unsymbolized profile"),
- llvm::cl::MiscFlags::CommaSeparated,
cl::desc("Path of the unsymbolized profile created by "
"`llvm-profgen` with `--skip-symbolization`"),
cl::cat(ProfGenCategory));
@@ -80,11 +78,11 @@
// Allow the missing perfscript if we only use to show binary disassembly.
if (!ShowDisassemblyOnly) {
// Validate input profile is provided only once
- uint16_t HasPerfData = PerfDataFilename.getNumOccurrences();
- uint16_t HasPerfScript = PerfScriptFilename.getNumOccurrences();
- uint16_t HasUnsymbolizedProfile =
- UnsymbolizedProfFilename.getNumOccurrences();
- uint16_t HasSampleProfile = SampleProfFilename.getNumOccurrences();
+ bool HasPerfData = PerfDataFilename.getNumOccurrences() > 0;
+ bool HasPerfScript = PerfScriptFilename.getNumOccurrences() > 0;
+ bool HasUnsymbolizedProfile =
+ UnsymbolizedProfFilename.getNumOccurrences() > 0;
+ bool HasSampleProfile = SampleProfFilename.getNumOccurrences() > 0;
uint16_t S =
HasPerfData + HasPerfScript + HasUnsymbolizedProfile + HasSampleProfile;
if (S != 1) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134287.461929.patch
Type: text/x-patch
Size: 2200 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220921/b647a08e/attachment.bin>
More information about the llvm-commits
mailing list