aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@google.com>2016-06-07 16:46:39 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-07 16:46:39 -0700
commit50bcb189f8785a599a3024d8eba4681c2e8ca37a (patch)
tree8d70e4f9ed2338ccda1a869bb1fc83133e6ae56b /include
parentddc2cd6a1f55f4f235db60d7545a74620722ba25 (diff)
Revert of Move immintrin/arm_neon includes to where they are used. (patchset #2 id:20001 of https://codereview.chromium.org/2045633002/ )
Reason for revert: Appears to have broken the ARMv7 aspect of the Google3 roll in bizarre seemingly-unrelated ways. Original issue's description: > Move immintrin/arm_neon includes to where they are used. > > On my Mac (so, immintrin), this improves compile time, both wall and cpu, > by about 16%. To test I ran this on an SSD with files hot in their caches: > > $ env CC=/usr/bin/clang CXX=/usr/bin/clang++ ./gyp_skia && \ > ninja -C out/Release -t clean && \ > time ninja -C out/Release > > Before: 159 wall / 3367 cpu > 159 wall / 3368 cpu > > After: 137 wall / 2860 cpu > 136 wall / 2863 cpu > > I also tried further refining immintrin down to emmintrin / tmmintrin / smmintrin etc. > That made no signficant difference, so I've kept immintrin for its simplicity. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2045633002 > CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot > > TBR=reed@google.com > No public API changes. > > Committed: https://skia.googlesource.com/skia/+/12dfaaa53c23f3d03050bde8f64136ac1f44164a TBR=herb@google.com,mtklein@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2046213002
Diffstat (limited to 'include')
-rw-r--r--include/core/SkTypes.h6
-rw-r--r--include/private/SkFloatingPoint.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
index 4e95c69f32..a47225db11 100644
--- a/include/core/SkTypes.h
+++ b/include/core/SkTypes.h
@@ -14,6 +14,12 @@
#include "SkPostConfig.h"
#include <stddef.h>
#include <stdint.h>
+
+#if defined(SK_ARM_HAS_NEON)
+ #include <arm_neon.h>
+#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
+ #include <immintrin.h>
+#endif
// IWYU pragma: end_exports
#include <string.h>
diff --git a/include/private/SkFloatingPoint.h b/include/private/SkFloatingPoint.h
index a7aa50cf9f..6ed6144d18 100644
--- a/include/private/SkFloatingPoint.h
+++ b/include/private/SkFloatingPoint.h
@@ -15,12 +15,6 @@
#include <math.h>
#include <float.h>
-#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1
- #include <xmmintrin.h>
-#elif defined(SK_ARM_HAS_NEON)
- #include <arm_neon.h>
-#endif
-
// For _POSIX_VERSION
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
#include <unistd.h>