diff options
author | Boris Sazonov <bsazonov@chromium.org> | 2017-11-30 10:01:30 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2017-11-30 10:01:30 +0000 |
commit | 0f473a1d95364a4390d368bd5c1c1457133bc28a (patch) | |
tree | 84c23477059edb4ebcd044d7ad9e14170f8eb67d /deflate.c | |
parent | d7601c23c6fe4a8061394af350df935772f520f3 (diff) | |
download | zlib-0f473a1d95364a4390d368bd5c1c1457133bc28a.tar.gz |
Revert "Using ARMv8 CRC32 specific instruction"
This reverts commit 35988c821c051a57e30c76f9fcd87b7b677bd9bd.
Reason for revert: broke build ('cpu-features.h' not found)
https://uberchromegw.corp.google.com/i/internal.client.clank/builders/x64-builder/builds/13697
Original change's description:
> Using ARMv8 CRC32 specific instruction
>
> CRC32 affects performance for both image decompression (PNG)
> as also in general browsing while accessing websites that serve
> content using compression (i.e. Content-Encoding: gzip).
>
> This patch implements an optimized CRC32 function using the
> dedicated instruction available in ARMv8. This instruction is available
> in new Android devices featuring an ARMv8 SoC, like Nexus 5x and
> Google Pixel.
>
> It should be between 6x (A53: 116ms X 22ms for a 4Kx4Kx4 buffer) to
> 10x faster (A72: 91ms x 9ms) than the C implementation currently used
> by zlib.
>
> PNG decoding performance gains should be around 5-9%.
>
> Finally it also introduces code to perform the ARM CPU features detection
> using getauxval()@Linux/CrOS or android_getCpuFeatures(). We pre-built
> and link the CRC32 instruction dependent code but will decide if to
> use it at run time.
>
> If the feature is not supported, we fallback to the C implementation.
>
> This approach allows to use the instruction in both 32bits and 64bits
> builds and works fine either in ARMv7 or ARMv8 processor. I tested the
> generated Chromium apk in both a ARMv7 (Nexus 4 and 6) and ARMv8 (Nexus 5x and
> Google Pixel).
>
> Change-Id: I069408ebc06c49a3c2be4ba3253319e025ee09d7
> Bug: 709716
> Reviewed-on: https://chromium-review.googlesource.com/612629
> Reviewed-by: Chris Blume <cblume@chromium.org>
> Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#520377}
TBR=agl@chromium.org,noel@chromium.org,cavalcantii@chromium.org,cblume@chromium.org,mtklein@chromium.org,adenilson.cavalcanti@arm.com
Change-Id: Ief2c32df5c8a37635f937cd6a671f5574f5a53a3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 709716
Reviewed-on: https://chromium-review.googlesource.com/799930
Reviewed-by: Chris Blume <cblume@chromium.org>
Reviewed-by: Boris Sazonov <bsazonov@chromium.org>
Commit-Queue: Boris Sazonov <bsazonov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#520497}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e7d9a4649bde6f047105d29f0026dd8c3d54143a
Diffstat (limited to 'deflate.c')
-rw-r--r-- | deflate.c | 7 |
1 files changed, 0 insertions, 7 deletions
@@ -51,9 +51,6 @@ #include <assert.h> #include "deflate.h" #include "x86.h" -#if defined(USE_ARMV8_CRC32) -#include "contrib/optimizations/arm/arm_features.h" -#endif const char deflate_copyright[] = " deflate 1.2.11 Copyright 1995-2017 Jean-loup Gailly and Mark Adler "; @@ -286,11 +283,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, * output size for (length,distance) codes is <= 24 bits. */ -#if defined(ADLER32_SIMD_SSE3) x86_check_features(); -#elif defined(USE_ARMV8_CRC32) - arm_check_features(); -#endif if (version == Z_NULL || version[0] != my_version[0] || stream_size != sizeof(z_stream)) { |