Revert "Performance experiment: Disable SkSL optimization in nanobench/skpbench"

This reverts commit b34a896c12.

Reason for revert: experiment is complete

Original change's description:
> Performance experiment: Disable SkSL optimization in nanobench/skpbench
>
> Cloned from http://review.skia.org/369716
> Re-running the experiment now that @switch is supported when
> optimizations are disabled.
>
> Change-Id: I428051d9c679a8084589fba428a637f36587be16
> Bug: skia:11341
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/374516
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,brianosman@google.com,johnstiles@google.com

Change-Id: I1e91c55538ef35f413f2c41c83df9d9c0f29d9a1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11341
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375016
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This commit is contained in:
John Stiles 2021-02-24 14:14:14 +00:00 committed by Skia Commit-Bot
parent ba7ef32832
commit cbd65754f2
3 changed files with 1 additions and 9 deletions

View File

@ -65,7 +65,6 @@ extern bool gSkForceRasterPipelineBlitter;
extern bool gUseSkVMBlitter;
extern bool gSkVMAllowJIT;
extern bool gSkVMJITViaDylib;
extern bool gSkSLAllowOptimization;
#ifndef SK_BUILD_FOR_WIN
#include <unistd.h>
@ -1241,7 +1240,6 @@ int main(int argc, char** argv) {
gSkForceRasterPipelineBlitter = FLAGS_forceRasterPipeline;
gUseSkVMBlitter = FLAGS_skvm;
gSkVMAllowJIT = gSkVMJITViaDylib = FLAGS_jit;
gSkSLAllowOptimization = false; // Temporary experiment
int runs = 0;
BenchmarkStream benchStream;

View File

@ -70,8 +70,6 @@
#endif
bool gSkSLAllowOptimization = true;
namespace SkSL {
using RefKind = VariableReference::RefKind;
@ -1475,7 +1473,7 @@ std::unique_ptr<Program> Compiler::convertProgram(
bool success = false;
if (fErrorCount) {
// Do not return programs that failed to compile.
} else if (settings.fOptimize && gSkSLAllowOptimization && !this->optimize(*program)) {
} else if (settings.fOptimize && !this->optimize(*program)) {
// Do not return programs that failed to optimize.
} else {
// We have a successful program!

View File

@ -88,8 +88,6 @@ static const char resultFormat[] =
static constexpr int kNumFlushesToPrimeCache = 3;
extern bool gSkSLAllowOptimization;
struct Sample {
using duration = std::chrono::nanoseconds;
@ -498,8 +496,6 @@ int main(int argc, char** argv) {
exit(0); // This can be used to print the header and quit.
}
gSkSLAllowOptimization = false; // Temporary experiment
// Parse the config.
const SkCommandLineConfigGpu* config = nullptr; // Initialize for spurious warning.
SkCommandLineConfigArray configs;