Title: [228592] trunk/Source/WebCore
Revision
228592
Author
[email protected]
Date
2018-02-16 18:13:59 -0800 (Fri, 16 Feb 2018)

Log Message

[Cocoa] Stop using non-prefixed vDSP functions in 32-bit builds
https://bugs.webkit.org/show_bug.cgi?id=182898
<rdar://problem/37195079>

Reviewed by Tim Horton.

There's no need to use non-prefixed vDSP function aliases on 32-bit builds.
The vDSP-prefixed versions are available on all Cocoa platforms we currently support.

* platform/audio/DirectConvolver.cpp:
(WebCore::DirectConvolver::process):
* platform/audio/VectorMath.cpp:
(WebCore::VectorMath::vsmul):
(WebCore::VectorMath::vadd):
(WebCore::VectorMath::vmul):
(WebCore::VectorMath::zvmul):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (228591 => 228592)


--- trunk/Source/WebCore/ChangeLog	2018-02-17 01:43:32 UTC (rev 228591)
+++ trunk/Source/WebCore/ChangeLog	2018-02-17 02:13:59 UTC (rev 228592)
@@ -1,3 +1,22 @@
+2018-02-16  Andy Estes  <[email protected]>
+
+        [Cocoa] Stop using non-prefixed vDSP functions in 32-bit builds
+        https://bugs.webkit.org/show_bug.cgi?id=182898
+        <rdar://problem/37195079>
+
+        Reviewed by Tim Horton.
+
+        There's no need to use non-prefixed vDSP function aliases on 32-bit builds.
+        The vDSP-prefixed versions are available on all Cocoa platforms we currently support.
+
+        * platform/audio/DirectConvolver.cpp:
+        (WebCore::DirectConvolver::process):
+        * platform/audio/VectorMath.cpp:
+        (WebCore::VectorMath::vsmul):
+        (WebCore::VectorMath::vadd):
+        (WebCore::VectorMath::vmul):
+        (WebCore::VectorMath::zvmul):
+
 2018-02-16  Ryan Haddad  <[email protected]>
 
         Unreviewed, rolling out r228575.

Modified: trunk/Source/WebCore/platform/audio/DirectConvolver.cpp (228591 => 228592)


--- trunk/Source/WebCore/platform/audio/DirectConvolver.cpp	2018-02-17 01:43:32 UTC (rev 228591)
+++ trunk/Source/WebCore/platform/audio/DirectConvolver.cpp	2018-02-17 02:13:59 UTC (rev 228592)
@@ -74,14 +74,7 @@
     memcpy(inputP, sourceP, sizeof(float) * framesToProcess);
 
 #if USE(ACCELERATE)
-#if defined(__ppc__) || defined(__i386__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-    conv(inputP - kernelSize + 1, 1, kernelP + kernelSize - 1, -1, destP, 1, framesToProcess, kernelSize);
-#pragma clang diagnostic pop
-#else
     vDSP_conv(inputP - kernelSize + 1, 1, kernelP + kernelSize - 1, -1, destP, 1, framesToProcess, kernelSize);
-#endif // defined(__ppc__) || defined(__i386__)
 #else
     // FIXME: The macro can be further optimized to avoid pipeline stalls. One possibility is to maintain 4 separate sums and change the macro to CONVOLVE_FOUR_SAMPLES.
 #define CONVOLVE_ONE_SAMPLE             \

Modified: trunk/Source/WebCore/platform/audio/VectorMath.cpp (228591 => 228592)


--- trunk/Source/WebCore/platform/audio/VectorMath.cpp	2018-02-17 01:43:32 UTC (rev 228591)
+++ trunk/Source/WebCore/platform/audio/VectorMath.cpp	2018-02-17 02:13:59 UTC (rev 228592)
@@ -49,43 +49,20 @@
 
 #if USE(ACCELERATE)
 // On the Mac we use the highly optimized versions in Accelerate.framework
-// In 32-bit mode (__ppc__ or __i386__) <Accelerate/Accelerate.h> includes <vecLib/vDSP_translate.h> which defines macros of the same name as
-// our namespaced function names, so we must handle this case differently. Other architectures (64bit, ARM, etc.) do not include this header file.
 
 void vsmul(const float* sourceP, int sourceStride, const float* scale, float* destP, int destStride, size_t framesToProcess)
 {
-#if defined(__ppc__) || defined(__i386__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-    ::vsmul(sourceP, sourceStride, scale, destP, destStride, framesToProcess);
-#pragma clang diagnostic pop
-#else
     vDSP_vsmul(sourceP, sourceStride, scale, destP, destStride, framesToProcess);
-#endif
 }
 
 void vadd(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess)
 {
-#if defined(__ppc__) || defined(__i386__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-    ::vadd(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess);
-#pragma clang diagnostic pop
-#else
     vDSP_vadd(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess);
-#endif
 }
 
 void vmul(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess)
 {
-#if defined(__ppc__) || defined(__i386__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-    ::vmul(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess);
-#pragma clang diagnostic pop
-#else
     vDSP_vmul(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess);
-#endif
 }
 
 void zvmul(const float* real1P, const float* imag1P, const float* real2P, const float* imag2P, float* realDestP, float* imagDestP, size_t framesToProcess)
@@ -99,14 +76,7 @@
     sc2.imagp = const_cast<float*>(imag2P);
     dest.realp = realDestP;
     dest.imagp = imagDestP;
-#if defined(__ppc__) || defined(__i386__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-    ::zvmul(&sc1, 1, &sc2, 1, &dest, 1, framesToProcess, 1);
-#pragma clang diagnostic pop
-#else
     vDSP_zvmul(&sc1, 1, &sc2, 1, &dest, 1, framesToProcess, 1);
-#endif
 }
 
 void vsma(const float* sourceP, int sourceStride, const float* scale, float* destP, int destStride, size_t framesToProcess)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to