<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in scudo_crc32.cpp</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>fd1da784 - [compiler-rt] [scudo] Use -mcrc32 on x86 when available</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/compiler-rt/lib/scudo/scudo_crc32.cpp#fd1da784</link>
        <description>[compiler-rt] [scudo] Use -mcrc32 on x86 when availableUpdate the hardware CRC32 logic in scudo to support using `-mcrc32`instead of `-msse4.2`.  The CRC32 intrinsics use the former flagin the newer compiler versions, e.g. in clang since 12fa608af44a.With these versions of clang, passing `-msse4.2` is insufficientto enable the instructions and causes build failures when `-march` doesnot enable CRC32 implicitly:    /var/tmp/portage/sys-libs/compiler-rt-sanitizers-14.0.0/work/compiler-rt/lib/scudo/scudo_crc32.cpp:20:10: error: always_inline function &apos;_mm_crc32_u32&apos; requires target feature &apos;crc32&apos;, but would be inlined into function &apos;computeHardwareCRC32&apos; that is compiled without support for &apos;crc32&apos;      return CRC32_INTRINSIC(Crc, Data);             ^    /var/tmp/portage/sys-libs/compiler-rt-sanitizers-14.0.0/work/compiler-rt/lib/scudo/scudo_crc32.h:27:27: note: expanded from macro &apos;CRC32_INTRINSIC&apos;    #  define CRC32_INTRINSIC FIRST_32_SECOND_64(_mm_crc32_u32, _mm_crc32_u64)                              ^    /var/tmp/portage/sys-libs/compiler-rt-sanitizers-14.0.0/work/compiler-rt/lib/scudo/../sanitizer_common/sanitizer_platform.h:132:36: note: expanded from macro &apos;FIRST_32_SECOND_64&apos;    #  define FIRST_32_SECOND_64(a, b) (a)                                       ^    1 error generated.For backwards compatibility, use `-mcrc32` when available and fall backto `-msse4.2`.  The `&lt;smmintrin.h&gt;` header remains in use as it stillworks and is compatible with GCC, while clang&apos;s `&lt;crc32intrin.h&gt;`is not.Use __builtin_ia32*() rather than _mm_crc32*() when using `-mcrc32`to preserve compatibility with GCC.  _mm_crc32*() are aliasesto __builtin_ia32*() in both compilers but GCC requires `-msse4.2`for the former, while both use `-mcrc32` for the latter.Originally reported in https://bugs.gentoo.org/835870.Differential Revision: https://reviews.llvm.org/D122789

            List of files:
            /llvm-project-15.0.7/compiler-rt/lib/scudo/scudo_crc32.cpp</description>
        <pubDate>Thu, 31 Mar 2022 07:55:25 +0000</pubDate>
        <dc:creator>Micha&#322; G&#243;rny &lt;mgorny@moritz.systems&gt;</dc:creator>
    </item>
<item>
        <title>985c717c - Revert &quot;[compiler-rt] [scudo] Use -mcrc32 on x86 when available&quot;</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/compiler-rt/lib/scudo/scudo_crc32.cpp#985c717c</link>
        <description>Revert &quot;[compiler-rt] [scudo] Use -mcrc32 on x86 when available&quot;This reverts commit 09b53121c323f260ab97cecd067d4e7b3be1bf7c.Breaks the build with GCC 11.2 on x86_64:In file included from /home/npopov/repos/llvm-project/compiler-rt/lib/scudo/scudo_crc32.h:27,                 from /home/npopov/repos/llvm-project/compiler-rt/lib/scudo/scudo_crc32.cpp:14:/usr/lib/gcc/x86_64-redhat-linux/11/include/smmintrin.h: In function &#8216;__sanitizer::u32 __scudo::computeHardwareCRC32(__sanitizer::u32, __sanitizer::uptr)&#8217;:/usr/lib/gcc/x86_64-redhat-linux/11/include/smmintrin.h:846:1: error: inlining failed in call to &#8216;always_inline&#8217; &#8216;long long unsigned int _mm_crc32_u64(long long unsigned int, long long unsigned int)&#8217;: target specific option mismatch  846 | _mm_crc32_u64 (unsigned long long __C, unsigned long long __V)

            List of files:
            /llvm-project-15.0.7/compiler-rt/lib/scudo/scudo_crc32.cpp</description>
        <pubDate>Fri, 01 Apr 2022 07:34:13 +0000</pubDate>
        <dc:creator>Nikita Popov &lt;npopov@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>09b53121 - [compiler-rt] [scudo] Use -mcrc32 on x86 when available</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/compiler-rt/lib/scudo/scudo_crc32.cpp#09b53121</link>
        <description>[compiler-rt] [scudo] Use -mcrc32 on x86 when availableUpdate the hardware CRC32 logic in scudo to support using `-mcrc32`instead of `-msse4.2`.  The CRC32 intrinsics use the former flagin the newer compiler versions, e.g. in clang since 12fa608af44a.With these compilers, passing `-msse4.2` is insufficient to enablethe instructions and causes build failures when `-march` does not enableCRC32:    /var/tmp/portage/sys-libs/compiler-rt-sanitizers-14.0.0/work/compiler-rt/lib/scudo/scudo_crc32.cpp:20:10: error: always_inline function &apos;_mm_crc32_u32&apos; requires target feature &apos;crc32&apos;, but would be inlined into function &apos;computeHardwareCRC32&apos; that is compiled without support for &apos;crc32&apos;      return CRC32_INTRINSIC(Crc, Data);             ^    /var/tmp/portage/sys-libs/compiler-rt-sanitizers-14.0.0/work/compiler-rt/lib/scudo/scudo_crc32.h:27:27: note: expanded from macro &apos;CRC32_INTRINSIC&apos;    #  define CRC32_INTRINSIC FIRST_32_SECOND_64(_mm_crc32_u32, _mm_crc32_u64)                              ^    /var/tmp/portage/sys-libs/compiler-rt-sanitizers-14.0.0/work/compiler-rt/lib/scudo/../sanitizer_common/sanitizer_platform.h:132:36: note: expanded from macro &apos;FIRST_32_SECOND_64&apos;    #  define FIRST_32_SECOND_64(a, b) (a)                                       ^    1 error generated.For backwards compatibility, use `-mcrc32` when available and fall backto `-msse4.2`.  The `&lt;smmintrin.h&gt;` header remains in use as it stillworks and is compatible with GCC, while clang&apos;s `&lt;crc32intrin.h&gt;`is not.Originally reported in https://bugs.gentoo.org/835870.Differential Revision: https://reviews.llvm.org/D122789

            List of files:
            /llvm-project-15.0.7/compiler-rt/lib/scudo/scudo_crc32.cpp</description>
        <pubDate>Thu, 31 Mar 2022 07:55:25 +0000</pubDate>
        <dc:creator>Micha&#322; G&#243;rny &lt;mgorny@moritz.systems&gt;</dc:creator>
    </item>
<item>
        <title>2946cd70 - Update the file headers across all of the LLVM projects in the monorepo</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/compiler-rt/lib/scudo/scudo_crc32.cpp#2946cd70</link>
        <description>Update the file headers across all of the LLVM projects in the monorepoto reflect the new license.We understand that people may be surprised that we&apos;re moving the headerentirely to discuss the new license. We checked this carefully with theFoundation&apos;s lawyer and we believe this is the correct approach.Essentially, all code in the project is now made available by the LLVMproject under our new license, so you will see that the license headersinclude that license only. Some of our contributors have contributedcode under our old license, and accordingly, we have retained a copy ofour old license notice in the top-level files in each project andrepository.llvm-svn: 351636

            List of files:
            /llvm-project-15.0.7/compiler-rt/lib/scudo/scudo_crc32.cpp</description>
        <pubDate>Sat, 19 Jan 2019 08:50:56 +0000</pubDate>
        <dc:creator>Chandler Carruth &lt;chandlerc@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>b0e96eb2 - [scudo] CRC32 optimizations</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/compiler-rt/lib/scudo/scudo_crc32.cpp#b0e96eb2</link>
        <description>[scudo] CRC32 optimizationsSummary:This change optimizes several aspects of the checksum used for chunk headers.First, there is no point in checking the weak symbol `computeHardwareCRC32`everytime, it will either be there or not when we start, so check it onceduring initialization and set the checksum type accordingly.Then, the loading of `HashAlgorithm` for SSE versions (and ARM equivalent) wasnot optimized out, while not necessary. So I reshuffled that part of the code,which duplicates a tiny bit of code, but ends up in a much cleaner assembly(and faster as we avoid an extraneous load and some calls).The following code is the checksum at the end of `scudoMalloc` for x86_64 withfull SSE 4.2, before:```mov     rax, 0FFFFFFFFFFFFFFhshl     r10, 38hmov     edi, dword ptr cs:_ZN7__scudoL6CookieE ; __scudo::Cookieand     r14, raxlea     rsi, [r13-10h]movzx   eax, cs:_ZN7__scudoL13HashAlgorithmE ; __scudo::HashAlgorithmor      r14, r10mov     rbx, r14xor     bx, bxcall    _ZN7__scudo20computeHardwareCRC32Ejm ; __scudo::computeHardwareCRC32(uint,ulong)mov     rsi, rbxmov     edi, eaxcall    _ZN7__scudo20computeHardwareCRC32Ejm ; __scudo::computeHardwareCRC32(uint,ulong)mov     r14w, axmov     rax, r13mov     [r13-10h], r14```After:```mov     rax, cs:_ZN7__scudoL6CookieE ; __scudo::Cookielea     rcx, [rbx-10h]mov     rdx, 0FFFFFFFFFFFFFFhand     r14, rdxshl     r9, 38hor      r14, r9crc32   eax, rcxmov     rdx, r14xor     dx, dxmov     eax, eaxcrc32   eax, rdxmov     r14w, axmov     rax, rbxmov     [rbx-10h], r14```Reviewers: dvyukov, alekseyshl, kccReviewed By: alekseyshlSubscribers: aemerson, rengolin, llvm-commitsDifferential Revision: https://reviews.llvm.org/D32971llvm-svn: 302538

            List of files:
            /llvm-project-15.0.7/compiler-rt/lib/scudo/scudo_crc32.cpp</description>
        <pubDate>Tue, 09 May 2017 15:12:38 +0000</pubDate>
        <dc:creator>Kostya Kortchinsky &lt;kostyak@google.com&gt;</dc:creator>
    </item>
<item>
        <title>b39dff45 - [scudo] Refactor of CRC32 and ARM runtime CRC32 detection</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/compiler-rt/lib/scudo/scudo_crc32.cpp#b39dff45</link>
        <description>[scudo] Refactor of CRC32 and ARM runtime CRC32 detectionSummary:ARM &amp; AArch64 runtime detection for hardware support of CRC32 has been addedvia check of the AT_HWVAL auxiliary vector.Following Michal&apos;s suggestions in D28417, the CRC32 code has been furtherchanged and looks better now. When compiled with full relro (which is stronglysuggested to benefit from additional hardening), the weak symbol forcomputeHardwareCRC32 is read-only and the assembly generated is fairly cleanand straight forward. As suggested, an additional optimization is to skipthe runtime check if SSE 4.2 has been enabled globally, as opposed to onlyfor scudo_crc32.cpp.scudo_crc32.h has no purpose anymore and was removed.Reviewers: alekseyshl, kcc, rengolin, mgorny, phosekReviewed By: rengolin, mgornySubscribers: aemerson, rengolin, llvm-commitsDifferential Revision: https://reviews.llvm.org/D28574llvm-svn: 292409

            List of files:
            /llvm-project-15.0.7/compiler-rt/lib/scudo/scudo_crc32.cpp</description>
        <pubDate>Wed, 18 Jan 2017 17:11:17 +0000</pubDate>
        <dc:creator>Kostya Kortchinsky &lt;kostyak@google.com&gt;</dc:creator>
    </item>
<item>
        <title>c4d6c938 - [scudo] Separate hardware CRC32 routines</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/compiler-rt/lib/scudo/scudo_crc32.cpp#c4d6c938</link>
        <description>[scudo] Separate hardware CRC32 routinesSummary:As raised in D28304, enabling SSE 4.2 for the whole Scudo tree leads to theemission of SSE 4.2 instructions everywhere, while the runtime checks onlyapplied to the CRC32 computing function.This patch separates the CRC32 function taking advantage of the hardware intoits own file, and only enabled -msse4.2 for that file, if detected to besupported by the compiler.Another consequence of removing SSE4.2 globally is realizing that memcpy werenot being optimized, which turned out to be due to the -fno-builtin inSANITIZER_COMMON_CFLAGS. So we now explicitely enable builtins for Scudo.The resulting assembly looks good, with some CALLs are introduced instead ofthe CRC32 code being inlined.Reviewers: kcc, mgorny, alekseyshlSubscribers: llvm-commitsDifferential Revision: https://reviews.llvm.org/D28417llvm-svn: 291570

            List of files:
            /llvm-project-15.0.7/compiler-rt/lib/scudo/scudo_crc32.cpp</description>
        <pubDate>Tue, 10 Jan 2017 16:39:36 +0000</pubDate>
        <dc:creator>Kostya Kortchinsky &lt;kostyak@google.com&gt;</dc:creator>
    </item>
</channel>
</rss>
