Skip to content
  1. Aug 28, 2017
    • Craig Topper's avatar
      [X86] Add support for __builtin_cpu_init · 2c03e53f
      Craig Topper authored
      This adds builtin_cpu_init which will emit a call to cpu_indicator_init in libgcc or compiler-rt.
      
      This is needed to support builtin_cpu_supports/builtin_cpu_is in an ifunc resolver.
      
      Differential Revision: https://reviews.llvm.org/D36336
      
      llvm-svn: 311874
      2c03e53f
    • Craig Topper's avatar
      [X86] Use getUnpackl helper to create an ISD::VECTOR_SHUFFLE instead of using... · 33681161
      Craig Topper authored
      [X86] Use getUnpackl helper to create an ISD::VECTOR_SHUFFLE instead of using X86ISD::UNPCKL in reduceVMULWidth.
      
      This runs fairly early, we should use target independent nodes if possible.
      
      llvm-svn: 311873
      33681161
    • Craig Topper's avatar
      [X86] Add an early out to combineLoopMAddPattern and combineLoopSADPattern when SSE2 is disabled. · 2c77011d
      Craig Topper authored
      Without this the madd.ll and sad.ll test cases both throw assertions if you run them with SSE2 disabled.
      
      llvm-svn: 311872
      2c77011d
    • Dean Michael Berris's avatar
      [XRay][compiler-rt] Return the pointer associated with the function instead of the sled · 66faacee
      Dean Michael Berris authored
      Summary:
      XRay has erroneously been returning the address of the first sled in the
      instrumentation map for a function id instead of the (runtime-relocated)
      functison address. This causes confusion and issues for applications
      where:
      
        - The first sled in the function may not be an entry sled (due to
          re-ordering or some other reason).
        - The caller attempts to find a symbol associated with the pointer at
          runtime, because the sled may not be exactly where the function's
          known address is (in case of inlined functions or those that have an
          external definition for symbols).
      
      This fixes http://llvm.org/PR34340.
      
      Reviewers: eizan
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D37202
      
      llvm-svn: 311871
      66faacee
    • Lang Hames's avatar
      [Error] Add a handleExpected utility. · 5d06c23d
      Lang Hames authored
      handleExpected is similar to handleErrors, but takes an Expected<T> as its first
      input value and a fallback functor as its second, followed by an arbitary list
      of error handlers (equivalent to the handler list of handleErrors). If the first
      input value is a success value then it is returned from handleErrors
      unmodified. Otherwise the contained error(s) are passed to handleErrors, along
      with the handlers. If handleErrors returns success (indicating that all errors
      have been handled) then handleExpected runs the fallback functor and returns its
      result. If handleErrors returns a failure value then the failure value is
      returned and the fallback functor is never run.
      
      This simplifies the process of re-trying operations that return Expected values.
      Without this utility such retry logic is cumbersome as the internal Error must
      be explicitly extracted from the Expected value, inspected to see if its
      handleable and then consumed:
      
      enum FooStrategy { Aggressive, Conservative };
      Expected<Foo> tryFoo(FooStrategy S);
      
      Expected<Foo> Result;
      (void)!!Result; // "Check" Result so that it can be safely overwritten.
      if (auto ValOrErr = tryFoo(Aggressive))
        Result = std::move(ValOrErr);
      else {
        auto Err = ValOrErr.takeError();
        if (Err.isA<HandleableError>()) {
          consumeError(std::move(Err));
          Result = tryFoo(Conservative);
        } else
          return std::move(Err);
      }
      
      with handleExpected, this can be re-written as:
      
      auto Result =
        handleExpected(
          tryFoo(Aggressive),
          []() { return tryFoo(Conservative); },
          [](HandleableError&) { /* discard to handle */ });
      
      llvm-svn: 311870
      5d06c23d
    • Petr Hosek's avatar
      [asan] Move __asan_handle_no_return to public header · 00b760ed
      Petr Hosek authored
      Heretofore asan_handle_no_return was used only by interceptors,
      i.e. code private to the ASan runtime. However, on systems without
      interceptors, code like libc++abi is built with -fsanitize=address
      itself and should call asan_handle_no_return directly from
      __cxa_throw so that no interceptor is required.
      
      Patch by Roland McGrath
      
      Differential Revision: https://reviews.llvm.org/D36811
      
      llvm-svn: 311869
      00b760ed
    • Richard Smith's avatar
      Add test for -Wc++17-compat warning for P0683R1. · 8b633447
      Richard Smith authored
      llvm-svn: 311868
      8b633447
    • Richard Smith's avatar
      [c++2a] P0683R1: Permit default member initializers for bit-fields. · 6b8e3c02
      Richard Smith authored
      This would be trivial, except that our in-memory and serialized representations
      for FieldDecls assumed that this can't happen.
      
      llvm-svn: 311867
      6b8e3c02
    • George Karpenkov's avatar
      [libFuzzer] Use custom allocators for STL containers in libFuzzer. · bebcbfb4
      George Karpenkov authored
      Avoids ODR violations causing spurious ASAN warnings.
      
      Differential Revision: https://reviews.llvm.org/D37086
      
      llvm-svn: 311866
      bebcbfb4
    • Johannes Altmanninger's avatar
      [clang-diff] Treat CXXCtorInitializer as a node · 41395022
      Johannes Altmanninger authored
      Reviewers: arphaman
      
      Subscribers: cfe-commits, klimek
      
      Differential Revision: https://reviews.llvm.org/D37002
      
      llvm-svn: 311865
      41395022
    • Dehao Chen's avatar
      revert r310985 which breaks for the following case: · 191b24d3
      Dehao Chen authored
      struct string {
        ~string();
      };
      void f2();
      void f1(int) { f2(); }
      void run(int c) {
        string body;
        while (true) {
          if (c)
            f1(c);
          else
            f1(c);
        }
      }
      
      Will recommit once the issue is fixed.
      
      llvm-svn: 311864
      191b24d3
  2. Aug 27, 2017
  3. Aug 26, 2017
    • Michal Gorny's avatar
      [Driver] Use arch type to find compiler-rt libraries (on Linux) · 17264592
      Michal Gorny authored
      Use llvm::Triple::getArchTypeName() when looking for compiler-rt
      libraries, rather than the exact arch string from the triple. This is
      more correct as it matches the values used when building compiler-rt
      (builtin-config-ix.cmake) which are the subset of the values allowed
      in triples.
      
      For example, this fixes an issue when the compiler set for
      i686-pc-linux-gnu triple would not find an i386 compiler-rt library,
      while this is the exact arch that is detected by compiler-rt. The same
      applies to any other i?86 variant allowed by LLVM.
      
      This also makes the special case for MSVC unnecessary, since now i386
      will be used reliably for all 32-bit x86 variants.
      
      Differential Revision: https://reviews.llvm.org/D26796
      
      llvm-svn: 311836
      17264592
    • Don Hinton's avatar
      [Dominators] Remove redundant explicit template instantiation. · a67e1312
      Don Hinton authored
      Summary:
      Remove redundant explicit template instantiation.
      
      This was reported by Andrew Kelley building release_50 with gcc7.2.0 on MacOS: duplicate symbol llvm::DominatorTreeBase.
      
      Reviewers: kuhar, andrewrk, davide, hans
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D37185
      
      llvm-svn: 311835
      a67e1312
Loading