From dee3df930b83751577d5a3489d402c0c9e284495 Mon Sep 17 00:00:00 2001 From: mtklein Date: Thu, 26 Mar 2015 05:30:44 -0700 Subject: [PATCH] Add a go-fast button to Skia GYP configs. ./gyp_skia -Dskia_fast=1 will - always optimize for the current machine as much as possible - drop the frame pointer - optimize floating point arithmetic ignoring IEEE compliance This allows things like 3-argument VEX prefix SSE instructions and NEON autovectorization, and can give some seriously helpful clues about how to rearrange floating point math for speed. I've been having trouble with LTO linking, so I'll leave that out for now. I don't think we should set up bots with this mode. -ffast-math means I'm forced to run DM with --match ~Blend ~Path ~Rect ~Math ~Scalar ~Matrix ~Point before it passes, which is a disconcerting chunk of tests to disable (including all of PathOps). BUG=skia: Review URL: https://codereview.chromium.org/1036533003 --- gyp/common_conditions.gypi | 3 +++ gyp/common_variables.gypi | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi index b9a9296..a38c92d 100644 --- a/gyp/common_conditions.gypi +++ b/gyp/common_conditions.gypi @@ -2,6 +2,7 @@ # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. + # conditions used in both common.gypi and skia.gyp in chromium # { @@ -229,6 +230,7 @@ '-Wno-invalid-offsetof', # GCC <4.6 is old-school strict about what is POD. ], 'conditions': [ + [ 'skia_fast', { 'cflags': [ '<@(skia_fast_flags)' ] }], [ 'skia_os != "chromeos"', { 'conditions': [ [ 'skia_arch_type == "x86_64" and not skia_android_framework', { @@ -529,6 +531,7 @@ }, 'xcode_settings': { 'conditions': [ + [ 'skia_fast', { 'WARNING_CFLAGS': [ '<@(skia_fast_flags)' ] } ], [ 'skia_warnings_as_errors', { 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES' }], [ 'skia_arch_width == 32', { 'ARCHS': ['i386'] }], [ 'skia_arch_width == 64', { 'ARCHS': ['x86_64'] }], diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi index 60dcccc..1031b52 100644 --- a/gyp/common_variables.gypi +++ b/gyp/common_variables.gypi @@ -239,6 +239,14 @@ 'skia_moz2d%': 0, 'skia_is_bot%': '