1. Nov 28, 2019
    • Craig Topper's avatar
      [LegalizeTypes][FPEnv][X86] Add initial support for softening strict fp nodes · ebfff46c
      Craig Topper authored
      This is based on what's required for softening fp128 operations on 32-bit X86 assuming f32/f64/f80 are legal. So there could be some things missing.
      
      Differential Revision: https://reviews.llvm.org/D70654
      ebfff46c
    • Taewook Oh's avatar
      [BPI] Improve unreachable/ColdCall heurstics to handle loops. · b19ec1eb
      Taewook Oh authored
      Summary:
      While updatePostDominatedByUnreachable attemps to find basic blocks that are post-domianted by unreachable blocks, it currently cannot handle loops precisely, because it doesn't use the actual post dominator tree analysis but relies on heuristics of visiting basic blocks in post-order. More precisely, when the entire loop is post-dominated by the unreachable block, current algorithm fails to detect the entire loop as post-dominated by the unreachable because when the algorithm reaches to the loop latch it fails to tell all its successors (including the loop header) will "eventually" be post-domianted by the unreachable block, because the algorithm hasn't visited the loop header yet. This makes BPI for the loop latch to assume that loop backedges are taken with 100% of probability. And because of this, block frequency info sometimes marks virtually dead loops (which are post dominated by unreachable blocks) super hot, because 100% backedge-taken probability makes the loop iteration count the max value. updatePostDominatedByColdCall has the exact same problem as well.
      
      To address this problem, this patch makes PostDominatedByUnreachable/PostDominatedByColdCall to be computed with the actual post-dominator tree.
      
      Reviewers: skatkov, chandlerc, manmanren
      
      Reviewed By: skatkov
      
      Subscribers: manmanren, vsk, apilipenko, Carrot, qcolombet, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D70104
      b19ec1eb
    • Peter Collingbourne's avatar
      scudo: Limit the number of bytes tested in a realloc test. · b208088a
      Peter Collingbourne authored
      This test was previously effectively doing:
      P = malloc(X); write X bytes to P; P = realloc(P, X - Y); P = realloc(P, X)
      and expecting that all X bytes stored to P would still be identical after
      the final realloc.
      
      This happens to be true for the current scudo implementation of realloc,
      but is not guaranteed to be true by the C standard ("Any bytes in the new
      object beyond the size of the old object have indeterminate values.").
      This implementation detail will change with the new memory tagging support,
      which unconditionally zeros newly allocated granules when memory tagging
      is enabled. Fix this by limiting the number of bytes that we test to the
      minimum size that we realloc the allocation to.
      
      Differential Revision: https://reviews.llvm.org/D70761
      b208088a
    • Peter Collingbourne's avatar
      scudo: Replace a couple of macros with their expansions. · 6fd6cfdf
      Peter Collingbourne authored
      The macros INLINE and COMPILER_CHECK always expand to the same thing (inline
      and static_assert respectively). Both expansions are standards compliant C++
      and are used consistently in the rest of LLVM, so let's improve consistency
      with the rest of LLVM by replacing them with the expansions.
      
      Differential Revision: https://reviews.llvm.org/D70793
      6fd6cfdf
    • Peter Collingbourne's avatar
      scudo: Call setCurrentTSD(nullptr) when bringing down the TSD registry in tests. · f30fe16d
      Peter Collingbourne authored
      Otherwise, we will hit a use-after-free when testing multiple instances of
      the same allocator on the same thread. This only recently became a problem
      with D70552 which caused us to run both ScudoCombinedTest.BasicCombined and
      ScudoCombinedTest.ReleaseToOS on the unit tests' main thread.
      
      Differential Revision: https://reviews.llvm.org/D70760
      f30fe16d
    • Martin Liska's avatar
      Make memory dump same as the one in asan. · 2045d2c9
      Martin Liska authored
      Shadow memory (and short granules) are not prepended with memory
      address and arrow at the end of line is removed.
      
      Differential Revision: https://reviews.llvm.org/D70707
      2045d2c9
    • Kostya Kortchinsky's avatar
      [scudo][standalone] Make tests work on Fuchsia · 0d3d4d3b
      Kostya Kortchinsky authored
      Summary:
      This CL makes unit tests compatible with Fuchsia's zxtest. This
      required a few changes here and there, but also unearthed some
      incompatibilities that had to be addressed.
      
      A header is introduced to allow to account for the zxtest/gtest
      differences, some `#if SCUDO_FUCHSIA` are used to disable incompatible
      code (the 32-bit primary, or the exclusive TSD).
      
      It also brought to my attention that I was using
      `__scudo_default_options` in different tests, which ended up in a
      single binary, and I am not sure how that ever worked. So move
      this to the main cpp.
      
      Additionally fully disable the secondary freelist on Fuchsia as we do
      not track VMOs for secondary allocations, so no release possible.
      
      With some modifications to Scudo's BUILD.gn in Fuchsia:
      ```
      [==========] 79 tests from 23 test cases ran (10280 ms total).
      [  PASSED  ] 79 tests
      ```
      
      Reviewers: mcgrathr, phosek, hctim, pcc, eugenis, cferris
      
      Subscribers: srhines, jfb, #sanitizers, llvm-commits
      
      Tags: #sanitizers, #llvm
      
      Differential Revision: https://reviews.llvm.org/D70682
      0d3d4d3b
    • Gabor Horvath's avatar
      [LifetimeAnalysis] Fix PR44150 · bcd0798c
      Gabor Horvath authored
      References need somewhat special treatment. While copying a gsl::Pointer
      will propagate the points-to set, creating an object from a reference
      often behaves more like a dereference operation.
      
      Differential Revision: https://reviews.llvm.org/D70755
      bcd0798c
    • Fangrui Song's avatar
      [ELF][ARM] Add getPCBias() · 3d9b1128
      Fangrui Song authored
      ThunkCreator::getThunk and ThunkCreator::normalizeExistingThunk
      currently assume that the implicit addends are -8 for ARM and -4 for
      Thumb. In D70637, ThunkCreator::getThunk will need to take care of the
      relocation addend explicitly.
      
      Add the utility function getPCBias() as a prerequisite so that the getThunk change in D70637
      can be more general.
      
      Reviewed By: peter.smith
      
      Differential Revision: https://reviews.llvm.org/D70690
      3d9b1128
    • Mark Murray's avatar
      [ARM][MVE][Intrinsics] Add MVE VAND/VORR/VORN/VEOR/VBIC intrinsics. Add unit tests. · a048bf87
      Mark Murray authored
      Summary: Add MVE VAND/VORR/VORN/VEOR/VBIC intrinsics. Add unit tests.
      
      Reviewers: simon_tatham, ostannard, dmgreen
      
      Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits
      
      Tags: #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D70547
      a048bf87
    • Mark Murray's avatar
      [ARM][MVE][Intrinsics] Add MVE VMUL intrinsics. Remove annoying "t1" from... · e8a8dbe9
      Mark Murray authored
      [ARM][MVE][Intrinsics] Add MVE VMUL intrinsics. Remove annoying "t1" from VMUL* instructions. Add unit tests.
      
      Summary: Add MVE VMUL intrinsics. Remove annoying "t1" from VMUL* instructions. Add unit tests.
      
      Reviewers: simon_tatham, ostannard, dmgreen
      
      Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits
      
      Tags: #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D70546
      e8a8dbe9
    • Mark Murray's avatar
      [ARM][MVE][Intrinsics] Add MVE VABD intrinsics. Add unit tests. · f4bba07b
      Mark Murray authored
      Summary: Add MVE VABD intrinsics. Add unit tests.
      
      Reviewers: simon_tatham, ostannard, dmgreen
      
      Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits
      
      Tags: #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D70545
      f4bba07b
    • Sanjay Patel's avatar
      [InstCombine] add tests for copysign; NFC · 5e6b7287
      Sanjay Patel authored
      5e6b7287
    • Jay Foad's avatar
      Remove a comment obsoleted by r227345. · c13c5fea
      Jay Foad authored
      c13c5fea
  2. Nov 27, 2019