Add noinline for GCC 4.6, which seems to vectorize after inlining.
GCC 4.7 and 4.8 don't need this, but we're not building with them so it doesn't hurt.
BUG=skia:
R=mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/343423003
diff --git a/src/core/SkConvolver.cpp b/src/core/SkConvolver.cpp
index 0ef683c..4633c2e 100644
--- a/src/core/SkConvolver.cpp
+++ b/src/core/SkConvolver.cpp
@@ -159,9 +159,9 @@
}
// There's a bug somewhere here with GCC autovectorization (-ftree-vectorize) on 32 bit builds.
- // Dropping to -O2 disables -ftree-vectorize. http://skbug.com/2575
+ // Dropping to -O2 disables -ftree-vectorize. GCC 4.6 needs noinline. http://skbug.com/2575
#if defined(__i386) && SK_HAS_ATTRIBUTE(optimize) && defined(SK_RELEASE)
- #define SK_MAYBE_DISABLE_VECTORIZATION __attribute__((optimize("O2")))
+ #define SK_MAYBE_DISABLE_VECTORIZATION __attribute__((optimize("O2"), noinline))
#else
#define SK_MAYBE_DISABLE_VECTORIZATION
#endif