summaryrefslogtreecommitdiff
path: root/source/slang/slang-options.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-07-11 09:29:27 -0700
committerGitHub <noreply@github.com>2023-07-11 09:29:27 -0700
commitd0901aa7933ac31b0bf7648a31ec5c13de864457 (patch)
tree298db796f1200013e841ed03db7ca24e2890c00a /source/slang/slang-options.cpp
parentd9c57e613f2dacd221d9c46c10395cf373a8fcaf (diff)
Add perf benchmark utility. (#2977)
* Add perf benchmark utility. * Update documentation. * Fix. * Fix doc. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-options.cpp')
-rw-r--r--source/slang/slang-options.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp
index 09c46b7ef..ad061a4e5 100644
--- a/source/slang/slang-options.cpp
+++ b/source/slang/slang-options.cpp
@@ -72,6 +72,7 @@ enum class OptionKind
InputFilesRemain,
EmitIr,
ReportDownstreamTime,
+ ReportPerfBenchmark,
SourceEmbedStyle,
SourceEmbedName,
@@ -427,6 +428,7 @@ void initCommandOptions(CommandOptions& options)
{ OptionKind::DumpWarningDiagnostics, "-dump-warning-diagnostics", nullptr, "Dump to output list of warning diagnostic numeric and name ids." },
{ OptionKind::InputFilesRemain, "--", nullptr, "Treat the rest of the command line as input files."},
{ OptionKind::ReportDownstreamTime, "-report-downstream-time", nullptr, "Reports the time spent in the downstream compiler." },
+ { OptionKind::ReportPerfBenchmark, "-report-perf-benchmark", nullptr, "Reports compiler performance benchmark results." },
{ OptionKind::SourceEmbedStyle, "-source-embed-style", "-source-embed-style <source-embed-style>",
"If source embedding is enabled, defines the style used. When enabled (with any style other than `none`), "
"will write compile results into embeddable source for the target language. "
@@ -1867,6 +1869,11 @@ SlangResult OptionsParser::_parse(
m_compileRequest->setReportDownstreamTime(true);
break;
}
+ case OptionKind::ReportPerfBenchmark:
+ {
+ m_compileRequest->setReportPerfBenchmark(true);
+ break;
+ }
case OptionKind::ModuleName:
{
CommandLineArg moduleName;