Remove hacks that disable AVX vectorization and inlining for gcc draft
authorJan Hubicka <jh@suse.cz>
Tue, 25 Dec 2018 17:01:58 +0100
changeset 1795541 4da15f2d10c97839c41d3f5c7015703449835388
parent 1795539 d747a5babf37e575fd11077052b9e240c539c628
child 1795542 1d045ae72e19798dbd039a557247805a0fd43180
child 1795793 59cbdefecf3f43af14b4ef68e99cc19ae5544194
child 1796100 c565af82be2ab77921cfbaa53f15022b91028323
push id324016
push userjh@suse.cz
push dateTue, 25 Dec 2018 16:02:48 +0000
treeherdertry@1d045ae72e19 [default view] [failures only]
milestone66.0a1
Remove hacks that disable AVX vectorization and inlining for gcc
gfx/skia/skia/src/opts/SkOpts_avx.cpp
gfx/skia/skia/third_party/skcms/src/Transform_inl.h
--- a/gfx/skia/skia/src/opts/SkOpts_avx.cpp
+++ b/gfx/skia/skia/src/opts/SkOpts_avx.cpp
@@ -2,36 +2,32 @@
  * Copyright 2016 Google Inc.
  *
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
 
 #include "SkOpts.h"
 
-#ifdef __clang__
 #define SK_OPTS_NS avx
 #include "SkRasterPipeline_opts.h"
-#endif
 
 #include "SkUtils_opts.h"
 
 namespace SkOpts {
     void Init_avx() {
         memset16 = SK_OPTS_NS::memset16;
         memset32 = SK_OPTS_NS::memset32;
         memset64 = SK_OPTS_NS::memset64;
 
-#ifdef __clang__
     #define M(st) stages_highp[SkRasterPipeline::st] = (StageFn)SK_OPTS_NS::st;
         SK_RASTER_PIPELINE_STAGES(M)
         just_return_highp = (StageFn)SK_OPTS_NS::just_return;
         start_pipeline_highp = SK_OPTS_NS::start_pipeline;
     #undef M
 
     #define M(st) stages_lowp[SkRasterPipeline::st] = (StageFn)SK_OPTS_NS::lowp::st;
         SK_RASTER_PIPELINE_STAGES(M)
         just_return_lowp = (StageFn)SK_OPTS_NS::lowp::just_return;
         start_pipeline_lowp = SK_OPTS_NS::lowp::start_pipeline;
     #undef M
-#endif
     }
 }
--- a/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
+++ b/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
@@ -535,28 +535,20 @@ SI void clut_0_16(const skcms_A2B* a2b, 
         *r = cast<F>((rgb >>  0) & 0xffff) * (1/65535.0f);
         *g = cast<F>((rgb >> 16) & 0xffff) * (1/65535.0f);
         *b = cast<F>((rgb >> 32) & 0xffff) * (1/65535.0f);
     #endif
     (void)a;
     (void)stride;
 }
 
-// __attribute__((always_inline)) hits some pathological case in GCC that makes
-// compilation way too slow for my patience.
-#if defined(__clang__)
-    #define MAYBE_SI SI
-#else
-    #define MAYBE_SI static inline
-#endif
-
 // These are all the same basic approach: handle one dimension, then the rest recursively.
 // We let "I" be the current dimension, and "J" the previous dimension, I-1.  "B" is the bit depth.
 #define DEF_CLUT(I,J,B)                                                                    \
-    MAYBE_SI \
+    SI \
     void clut_##I##_##B(const skcms_A2B* a2b, I32 ix, I32 stride, F* r, F* g, F* b, F a) { \
         I32 limit = cast<I32>(F0);                                                         \
         limit += a2b->grid_points[I-1];                                                    \
                                                                                            \
         const F* srcs[] = { r,g,b,&a };                                                    \
         F src = *srcs[I-1];                                                                \
                                                                                            \
         F x = max_(F0, min_(src, F1)) * cast<F>(limit - 1);                                \