1. Jul 08, 2019
  2. Jul 07, 2019
    • Nico Weber's avatar
      gn build: Merge r365258 and follow-ups r365263, r365264 · 3e9ef484
      Nico Weber authored
      llvm-svn: 365276
      3e9ef484
    • Craig Topper's avatar
      ac744d5a
    • David Majnemer's avatar
      [CodeGen] Add larger vector types for i32 and f32 · 617df204
      David Majnemer authored
      Some out of tree backend require larger vector type. Since maintaining the changes out of tree is difficult due to the many manual changes needed when adding a new type we are adding it even if no backend currently use it.
      
      Differential Revision: https://reviews.llvm.org/D64141
      
      Patch by Thomas Raoux!
      
      llvm-svn: 365274
      617df204
    • Eric Fiselier's avatar
      Fix PR27658 - Make ~mutex trivial when possible. · 8baf8383
      Eric Fiselier authored
      Currently std::mutex has a constexpr constructor, but a non-trivial
      destruction.
      
      The constexpr constructor is required to ensure the construction of a
      mutex with static storage duration happens at compile time, during
      constant initialization, and not during dynamic initialization.
      This means that static mutex's are always initialized and can be used
      safely during dynamic initialization without the "static initialization
      order fiasco".
      
      A trivial destructor is important for similar reasons. If a mutex is
      used during dynamic initialization it might also be used during program
      termination. If a static mutex has a non-trivial destructor it will be
      invoked during termination. This can introduce the "static
      deinitialization order fiasco".
      
      Additionally, function-local statics emit a guard variable around
      non-trivially destructible types. This results in horrible codegen and
      adds a runtime cost to every call to that function. non-local static's
      also result in slightly worse codegen but it's not as big of a problem.
      
      Example codegen can be found here: https://goo.gl/3CSzbM
      
      Note: This optimization is not safe with every pthread implementation.
      Some implementations allocate on the first call to pthread_mutex_lock
      and free the allocation in pthread_mutex_destroy.
      
      Also, changing the triviality of the destructor is not an ABI break.
      At least to the best of my knowledge :-)
      
      llvm-svn: 365273
      8baf8383
    • Richard Smith's avatar
      Treat the range of representable values of floating-point types as [-inf,... · 9e52c430
      Richard Smith authored
      Treat the range of representable values of floating-point types as [-inf, +inf] not as [-max, +max].
      
      Summary:
      Prior to r329065, we used [-max, max] as the range of representable
      values because LLVM's `fptrunc` did not guarantee defined behavior when
      truncating from a larger floating-point type to a smaller one. Now that
      has been fixed, we can make clang follow normal IEEE 754 semantics in this
      regard and take the larger range [-inf, +inf] as the range of representable
      values.
      
      In practice, this affects two parts of the frontend:
       * the constant evaluator no longer treats floating-point evaluations
         that result in +-inf as being undefined (because they no longer leave
         the range of representable values of the type)
       * UBSan no longer treats conversions to floating-point type that are
         outside the [-max, +max] range as being undefined
      
      In passing, also remove the float-divide-by-zero sanitizer from
      -fsanitize=undefined, on the basis that while it's undefined per C++
      rules (and we disallow it in constant expressions for that reason), it
      is defined by Clang / LLVM / IEEE 754.
      
      Reviewers: rnk, BillyONeal
      
      Subscribers: cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D63793
      
      llvm-svn: 365272
      9e52c430
    • Simon Pilgrim's avatar
      [X86] SimplifyDemandedVectorEltsForTargetNode - fix shadow variable warning. NFCI. · a7145c45
      Simon Pilgrim authored
      Fixes cppcheck warning.
      
      llvm-svn: 365271
      a7145c45
    • Simon Pilgrim's avatar
      01f1bad6