1. May 10, 2017
  2. May 09, 2017
    • Hans Wennborg's avatar
      Revert r302476 "Update testcase for upstream LLVM changes." · fb82abd8
      Hans Wennborg authored
      That test update was for r302469, which was reverted in r302533 due to PR32977.
      
      llvm-svn: 302542
      fb82abd8
    • Reid Kleckner's avatar
      e2328eba
    • Alex Lorenz's avatar
      Add support for pretty platform names to `@available`/ · e1fb64e5
      Alex Lorenz authored
      `__builtin_available`
      
      This commit allows us to use the macOS/iOS/tvOS/watchOS platform names in
      `@available`/`__builtin_available`.
      
      rdar://32067795
      
      Differential Revision: https://reviews.llvm.org/D33000
      
      llvm-svn: 302540
      e1fb64e5
    • Tim Shen's avatar
      [Atomic] Remove IsStore/IsLoad in the interface, and pass the instruction instead. NFC. · 04de70d3
      Tim Shen authored
      Now both emitLeadingFence and emitTrailingFence take the instruction
      itself, instead of taking IsLoad/IsStore pairs.
      Instruction::mayReadFromMemory and Instrucion::mayWriteToMemory are used
      for determining those two booleans.
      
      The instruction argument is also useful for later D32763, in
      emitTrailingFence. For emitLeadingFence, it seems to have cleaner
      interface with the proposed change.
      
      Differential Revision: https://reviews.llvm.org/D32762
      
      llvm-svn: 302539
      04de70d3
    • Kostya Kortchinsky's avatar
      [scudo] CRC32 optimizations · b0e96eb2
      Kostya Kortchinsky authored
      Summary:
      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 once
      during initialization and set the checksum type accordingly.
      
      Then, the loading of `HashAlgorithm` for SSE versions (and ARM equivalent) was
      not 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 with
      full SSE 4.2, before:
      ```
      mov     rax, 0FFFFFFFFFFFFFFh
      shl     r10, 38h
      mov     edi, dword ptr cs:_ZN7__scudoL6CookieE ; __scudo::Cookie
      and     r14, rax
      lea     rsi, [r13-10h]
      movzx   eax, cs:_ZN7__scudoL13HashAlgorithmE ; __scudo::HashAlgorithm
      or      r14, r10
      mov     rbx, r14
      xor     bx, bx
      call    _ZN7__scudo20computeHardwareCRC32Ejm ; __scudo::computeHardwareCRC32(uint,ulong)
      mov     rsi, rbx
      mov     edi, eax
      call    _ZN7__scudo20computeHardwareCRC32Ejm ; __scudo::computeHardwareCRC32(uint,ulong)
      mov     r14w, ax
      mov     rax, r13
      mov     [r13-10h], r14
      ```
      After:
      ```
      mov     rax, cs:_ZN7__scudoL6CookieE ; __scudo::Cookie
      lea     rcx, [rbx-10h]
      mov     rdx, 0FFFFFFFFFFFFFFh
      and     r14, rdx
      shl     r9, 38h
      or      r14, r9
      crc32   eax, rcx
      mov     rdx, r14
      xor     dx, dx
      mov     eax, eax
      crc32   eax, rdx
      mov     r14w, ax
      mov     rax, rbx
      mov     [rbx-10h], r14
      ```
      
      Reviewers: dvyukov, alekseyshl, kcc
      
      Reviewed By: alekseyshl
      
      Subscribers: aemerson, rengolin, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D32971
      
      llvm-svn: 302538
      b0e96eb2