From d0901aa7933ac31b0bf7648a31ec5c13de864457 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 11 Jul 2023 09:29:27 -0700 Subject: Add perf benchmark utility. (#2977) * Add perf benchmark utility. * Update documentation. * Fix. * Fix doc. --------- Co-authored-by: Yong He --- source/slang/slang-options.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/slang/slang-options.cpp') 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 ", "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; -- cgit v1.2.3