1. Nov 22, 2016
    • Jonathan Peyton's avatar
      Merging r285703: · aa6fbaf7
      Jonathan Peyton authored
      ------------------------------------------------------------------------
      r285703 | achurbanov | 2016-11-01 11:19:04 -0500 (Tue, 01 Nov 2016) | 9 lines
      
      Fixed problem introduced by part of https://reviews.llvm.org/D21196.
      
      Check Task Scheduling Constraint (TSC) on stealing of untied task.
      This is needed because the untied task can produce tied children
      those can break TSC if untied is not a descendant of current task.
      This can cause live lock on complex tyasking tests
      (e.g. kastors/strassen-task-dep).
      
      Differential Revision: https://reviews.llvm.org/D26182
      ------------------------------------------------------------------------
      
      llvm-svn: 287561
      aa6fbaf7
    • Jonathan Peyton's avatar
      Merging r287551: · 43fb3dac
      Jonathan Peyton authored
      ------------------------------------------------------------------------
      r287551 | jlpeyton | 2016-11-21 10:18:57 -0600 (Mon, 21 Nov 2016) | 8 lines
      
      Fix for D25504 - segfault because of double free()-ing in shutdown code.
      
      Paul Osmialowski pointed out a double free bug in shutdown code.  This patch
      Moves the freeing of the implicit task to above the freeing of all fast memory
      to prevent the double-free issue.
      
      Differential Revision: https://reviews.llvm.org/D26860
      
      ------------------------------------------------------------------------
      
      llvm-svn: 287560
      43fb3dac
    • Jonathan Peyton's avatar
      Merging r285283: · 41581708
      Jonathan Peyton authored
      ------------------------------------------------------------------------
      r285283 | achurbanov | 2016-10-27 06:43:07 -0500 (Thu, 27 Oct 2016) | 6 lines
      
      Fixed a memory leak related to task dependencies.
      
      Differential Revision: http://reviews.llvm.org/D25504
      
      Patch by Alex Duran.
      
      ------------------------------------------------------------------------
      
      llvm-svn: 287559
      41581708
    • Jonathan Peyton's avatar
      Merging r280138: · ba41eae9
      Jonathan Peyton authored
      ------------------------------------------------------------------------
      r280138 | jlpeyton | 2016-08-30 14:28:58 -0500 (Tue, 30 Aug 2016) | 5 lines
      
      Appease older gcc compilers for the many-microtask-args.c test
      
      Older gcc compilers error out with the C99 syntax of: for (int i =...)
      so this change just moves the int i; declaration up above.
      
      ------------------------------------------------------------------------
      
      llvm-svn: 287558
      ba41eae9
    • Jonathan Peyton's avatar
      Merging r278332: · 6b2aaa62
      Jonathan Peyton authored
      ------------------------------------------------------------------------
      r278332 | achurbanov | 2016-08-11 08:04:00 -0500 (Thu, 11 Aug 2016) | 3 lines
      
      Fixes for hierarchical barrier (possible hang if team size changed).
      
      Differential Revision: http://reviews.llvm.org/D23175
      ------------------------------------------------------------------------
      
      llvm-svn: 287557
      6b2aaa62
  2. Nov 21, 2016
  3. Nov 19, 2016
    • Renato Golin's avatar
      [3.9.1] Merging r287359: · 9dd3ddbb
      Renato Golin authored
      builtins: repair the builtins build with clang 3.8
      
      When the C unwinding personality was corrected to match the ARM EHABI
      specification, the unwind header in clang was updated with necessary
      declarations.  However, when building with an older compiler, we would not have
      the necessary declarations.  This would result in a build failure.  Provide a
      supplementary header to ensure that the necessary declarations are present for
      the build of the C unwinding personality.
      
      Note that this is NOT an ABI break.  It merely is a compile time failure due to
      the constants not being present.  The constants here are reproduced
      equivalently.  This header should permit building with clang[<3.9] as well as
      gcc.
      
      Addresses PR31035!
      
      llvm-svn: 287441
      9dd3ddbb
  4. Nov 18, 2016
  5. Nov 17, 2016
    • Tom Stellard's avatar
      Merging r280599: · 0ef85d42
      Tom Stellard authored
      ------------------------------------------------------------------------
      r280599 | mehdi.amini | 2016-09-03 14:12:33 -0700 (Sat, 03 Sep 2016) | 10 lines
      
      Fix ThinLTO crash with debug info
      
      Because the recent change about ODR type uniquing in the context,
      we can reach types defined in another module during IR linking.
      This triggered some assertions in case we IR link without starting
      from an empty module. To alleviate that, we can self-map metadata
      defined in the destination module so that they won't be visited.
      
      Differential Revision: https://reviews.llvm.org/D23841
      
      ------------------------------------------------------------------------
      
      llvm-svn: 287137
      0ef85d42
    • Tom Stellard's avatar
      Merging r283427: · 2d8aa64e
      Tom Stellard authored
      ------------------------------------------------------------------------
      r283427 | nunoplopes | 2016-10-06 02:32:16 -0700 (Thu, 06 Oct 2016) | 3 lines
      
      fix build on cygwin
      Cygwin has dlfcn.h, but no Dl_info
      
      ------------------------------------------------------------------------
      
      llvm-svn: 287133
      2d8aa64e
  6. Nov 16, 2016
    • Ed Schouten's avatar
      Merge r280672, per bug 30839: · e9ceabd0
      Ed Schouten authored
        Add support for targeting armv6-unknown-cloudabi-eabihf.
      
        I'm in the progress of adding ARMv6 support to CloudABI. On the compiler
        side, everything seems to work properly with this tiny change applied.
      
      llvm-svn: 287093
      e9ceabd0
    • Alexey Bataev's avatar
      Merging r287025: · 268274a9
      Alexey Bataev authored
      ------------------------------------------------------------------------
      r287025 | abataev | 2016-11-15 20:57:18 +0000 (Tue, 15 Nov 2016) | 3 lines
      
      [OPENMP] Fix stack use after delete, NFC.
      
      Fixed possible use of stack variable after deletion.
      ------------------------------------------------------------------------
      
      llvm-svn: 287033
      268274a9
  7. Nov 15, 2016
    • Alexey Bataev's avatar
      Merging r283223: · f876bbe0
      Alexey Bataev authored
      r283223 | davidsh | 2016-10-04 10:41:36 -0400 (Tue, 04 Oct 2016) | 1 line
      
      [OpenMP] fix segfault when a variable referenced in reduction clause is a reference parameter
      Differential Revision: http://reviews.llvm.org/D24524
      
      llvm-svn: 286972
      f876bbe0
    • Alexey Bataev's avatar
      Merging r284229: · c78edcc2
      Alexey Bataev authored
      ------------------------------------------------------------------------
      r284229 | abataev | 2016-10-14 12:43:59 +0000 (Fri, 14 Oct 2016) | 37 lines
      
      Fix for PR30632: Name mangling issue.
      
      There was a bug in the implementation of captured statements. If it has
      a lambda expression in it and the same lambda expression is used outside
      the captured region, clang produced an error:
      ```
      error: definition with same mangled name as another definition
      ```
      Here is an example:
      ```
      struct A {
       template <typename L>
       void g(const L&) { }
      };
      
      template<typename T>
      void f() {
        {
          A().g([](){});
        }
        A().g([](){});
      }
      
      int main() {
        f<void>();
      }
      ```
      
      Error report:
      ```
      main.cpp:3:10: error: definition with same mangled name as another
      definition
          void g(const L&) { }
                   ^
      main.cpp:3:10: note: previous definition is here
      ```
      Patch fixes this bug.
      ------------------------------------------------------------------------
      
      llvm-svn: 286970
      c78edcc2
    • Alexey Bataev's avatar
      Merging r286944: · 0a72d7c5
      Alexey Bataev authored
      ------------------------------------------------------------------------
      r286944 | abataev | 2016-11-15 09:11:50 +0000 (Tue, 15 Nov 2016) | 6 lines
      
      [OPENMP] Fixed codegen for 'omp cancel' construct.
      
      If 'omp cancel' construct is used in a worksharing construct it may cause
      hanging of the software in case if reduction clause is used. Patch fixes
      this problem by avoiding extra reduction processing for branches that
      were canceled.
      ------------------------------------------------------------------------
      
      llvm-svn: 286968
      0a72d7c5
    • Alexey Bataev's avatar
      Merging r286584: · 765b7888
      Alexey Bataev authored
      ------------------------------------------------------------------------
      r286584 | abataev | 2016-11-11 12:36:20 +0000 (Fri, 11 Nov 2016) | 31 lines
      
      Fix for PR28523: unexpected compilation error.
      
      Clang emits error message for the following code:
      ```
      template <class F> void parallel_loop(F &&f) { f(0); }
      
      int main() {
        int x;
        parallel_loop([&](auto y) {
          {
            x = y;
          };
        });
      }
      ```
      
      $ clang++ --std=gnu++14 clang_test.cc -o clang_test
      clang_test.cc:9:7: error: reference to local variable 'x' declared in enclosing function 'main'
            x = y;
                  ^
      clang_test.cc:2:48: note: in instantiation of function template specialization 'main()::(anonymous class)::operator()<int>' requested here
                  template <class F> void parallel_loop(F &&f) { f(0); }
                                                                 ^
      clang_test.cc:6:3: note: in instantiation of function template specialization 'parallel_loop<(lambda at clang_test.cc:6:17)>' requested here parallel_loop([&](auto y) {
                 ^
      clang_test.cc:5:7: note: 'x' declared here
            int x;
                ^
      1 error generated.
      
      Patch fixes this issue.
      ------------------------------------------------------------------------
      
      llvm-svn: 286966
      765b7888
    • Alexey Bataev's avatar
      Merging r286129: · fe68fa6e
      Alexey Bataev authored
      ------------------------------------------------------------------------
      r286129 | abataev | 2016-11-07 18:15:02 +0000 (Mon, 07 Nov 2016) | 8 lines
      
      [OPENMP] Fixed codegen for __real/__imag expressions in atomic
      constructs.
      
      For __real/__imag unary expressions clang emits lvalue with the
      associated type from the original complex expression, but not the
      underlying builtin integer or float type. This causes crash in codegen
      for atomic constructs, if __real/__imag expression are used in atomic
        constructs.
      ------------------------------------------------------------------------
      
      llvm-svn: 286965
      fe68fa6e
    • Alexey Bataev's avatar
      Merging r284110: · 5cb5303b
      Alexey Bataev authored
      ------------------------------------------------------------------------
      r284110 | abataev | 2016-10-13 09:52:46 +0000 (Thu, 13 Oct 2016) | 9 lines
      
      Fix for PR30639: CGDebugInfo Null dereference with OpenMP array
      access, by Erich Keane
      
      OpenMP creates a variable array type with a a null size-expr. The Debug
      generation failed to due to this. This patch corrects the openmp
      implementation, updates the tests, and adds a new one for this
      condition.
      
      Differential Revision: https://reviews.llvm.org/D25373
      ------------------------------------------------------------------------
      
      llvm-svn: 286964
      5cb5303b
    • Richard Trieu's avatar
      Merging rr285370: · 63056d4c
      Richard Trieu authored
      ------------------------------------------------------------------------
      r285370 | rtrieu | 2016-10-27 17:15:24 -0700 (Thu, 27 Oct 2016) | 10 lines
      
      Fix a crash on invalid code.
      
      The diagnostic was attempting to access the QualType of a TypeDecl by calling
      TypeDecl::getTypeForDecl.  However, the Type pointer stored there is lazily
      loaded by functions in ASTContext.  In most cases, the pointer is loaded and
      this does not cause a problem.  However, when more that 50 or so unknown types
      are seen beforehand, this causes the Type to not be loaded, passing a null
      Type to the diagnostics, leading to the crash.  Using
      ASTContext::getTypeDeclType will give a proper QualType for all cases.
      
      ------------------------------------------------------------------------
      
      llvm-svn: 286923
      63056d4c
    • Richard Trieu's avatar
      Merging r282989: · f92e135e
      Richard Trieu authored
      ------------------------------------------------------------------------
      r282989 | rtrieu | 2016-09-30 17:15:24 -0700 (Fri, 30 Sep 2016) | 10 lines
      
      Fix crash when emitting error.
      
      With templated classes, is possible to not be able to determine is a member
      function is a special member function before the class is instantiated.  Only
      these special member functions can be defaulted.  In some cases, knowing
      whether a function is a special member function can't be determined until
      instantiation, so an uninstantiated function could possibly be defaulted too.
      Add a case to the error diagnostic when the function marked with a default is
      not known to be a special member function.
      
      ------------------------------------------------------------------------
      
      llvm-svn: 286922
      f92e135e
    • Richard Trieu's avatar
      Merging r281287: · 167a1146
      Richard Trieu authored
      ------------------------------------------------------------------------
      r281287 | rtrieu | 2016-09-12 18:37:01 -0700 (Mon, 12 Sep 2016) | 2 lines
      
      Handle empty message in static_asserts.
      
      ------------------------------------------------------------------------
      
      llvm-svn: 286918
      167a1146
  8. Nov 12, 2016
    • Richard Trieu's avatar
      Merging r281286: · 459d3a48
      Richard Trieu authored
      ------------------------------------------------------------------------
      r281286 | rtrieu | 2016-09-12 18:20:40 -0700 (Mon, 12 Sep 2016) | 6 lines
      
      Fix interaction between serialization and c++1z feature.
      
      In c++1z, static_assert is not required to have a StringLiteral message, where
      previously it was required.  Update the AST Reader to be able to handle a
      null StringLiteral.
      
      ------------------------------------------------------------------------
      
      llvm-svn: 286667
      459d3a48
  9. Nov 09, 2016
    • Simon Pilgrim's avatar
      [3.9.1] Merging r283070 - [X86][AVX] Ensure broadcast loads respect dependencies · 863df312
      Simon Pilgrim authored
      To allow broadcast loads of a non-zero'th vector element, lowerVectorShuffleAsBroadcast can replace a load with a new load with an adjusted address, but unfortunately we weren't ensuring that the new load respected the same dependencies.
      
      This patch adds a TokenFactor and updates all dependencies of the old load to reference the new load instead.
      
      Bug found during internal testing.
      
      Differential Revision: https://reviews.llvm.org/D25039
      
      As discussed on PR30596
      
      llvm-svn: 286251
      863df312
    • Simon Pilgrim's avatar
      [3.9.1] Merging r282613 - [X86][AVX] Add test showing that VBROADCAST loads... · cacba2ea
      Simon Pilgrim authored
      [3.9.1] Merging r282613 - [X86][AVX] Add test showing that VBROADCAST loads don't correctly respect dependencies
      
      As discussed in PR30596, this is a preliminary test update before we can merge r283070
      
      Note: This required the test to be regenerated after the merge as 3.9.1 doesn't have trunk's latest lea -> mov simplifications
      llvm-svn: 286248
      cacba2ea
    • Hans Wennborg's avatar
      Merging r283129: · e46e43f6
      Hans Wennborg authored
      ------------------------------------------------------------------------
      r283129 | hans | 2016-10-03 11:18:04 -0700 (Mon, 03 Oct 2016) | 6 lines
      
      Jump threading: avoid trying to split edge into landingpad block (PR27840)
      
      Splitting the edge is nontrivial because of the landing pad, and we would
      currently assert trying to do it.
      
      Differential Revision: https://reviews.llvm.org/D24680
      ------------------------------------------------------------------------
      
      llvm-svn: 286246
      e46e43f6
  10. Sep 30, 2016
  11. Sep 29, 2016
    • Eric Fiselier's avatar
      Merging rr280190: · c457a1b8
      Eric Fiselier authored
      ------------------------------------------------------------------------
      r280190 | rsmith | 2016-08-30 20:15:21 -0600 (Tue, 30 Aug 2016) | 12 lines
      
      PR12298 et al: don't recursively instantiate a template specialization from
      within the instantiation of that same specialization. This could previously
      happen for eagerly-instantiated function templates, variable templates,
      exception specifications, default arguments, and a handful of other cases.
      
      We still have an issue here for default template arguments that recursively
      make use of themselves and likewise for substitution into the type of a
      non-type template parameter, but in those cases we're producing a different
      entity each time, so they should instead be caught by the instantiation depth
      limit. However, currently we will typically run out of stack before we reach
      it. :(
      
      ------------------------------------------------------------------------
      
      llvm-svn: 282636
      c457a1b8
    • Matthias Braun's avatar
      Cherry pick r281957 (see http://llvm.org/PR30463) · 93b573f0
      Matthias Braun authored
      llvm-svn: 282615
      93b573f0
  12. Sep 16, 2016
  13. Sep 13, 2016
  14. Aug 25, 2016
    • Hans Wennborg's avatar
      Merging r279647: · ce25e1a7
      Hans Wennborg authored
      ------------------------------------------------------------------------
      r279647 | sanjoy | 2016-08-24 11:10:21 -0700 (Wed, 24 Aug 2016) | 5 lines
      
      [SCCP] Don't delete side-effecting instructions
      
      I'm not sure if the `!isa<CallInst>(Inst) &&
      !isa<TerminatorInst>(Inst))` bit is correct either, but this fixes the
      case we know is broken.
      ------------------------------------------------------------------------
      
      llvm-svn: 279689
      ce25e1a7
  15. Aug 23, 2016
    • Hans Wennborg's avatar
      Merging r279268: · 08064c20
      Hans Wennborg authored
      ------------------------------------------------------------------------
      r279268 | majnemer | 2016-08-19 09:37:40 -0700 (Fri, 19 Aug 2016) | 5 lines
      
      [CloneFunction] Don't remove unrelated nodes from the CGSSC
      
      CGSCC use a WeakVH to track call sites.  RAUW a call within a function
      can result in that WeakVH getting confused about whether or not the call
      site is still around.
      ------------------------------------------------------------------------
      
      llvm-svn: 279477
      08064c20
    • Hans Wennborg's avatar
      Merging r279368: · f7ff8644
      Hans Wennborg authored
      ------------------------------------------------------------------------
      r279368 | ed | 2016-08-20 03:54:51 -0700 (Sat, 20 Aug 2016) | 12 lines
      
      Add R_386_TLS_LE as a relocation having an implicit addend.
      
      TLS on i386 in non-PIE/PIC code seems broken right now, because we don't
      properly add the addend encoded in the instruction to the resulting
      offset when processing R_386_TLS_LE relocations.
      
      Extend one of the existing tests for TLS on i686 to use an addend.
      
      PR:		https://llvm.org/bugs/show_bug.cgi?id=29068
      Reviewed by:	ruiu
      Differential Revision:	https://reviews.llvm.org/D23741
      
      ------------------------------------------------------------------------
      
      llvm-svn: 279476
      f7ff8644
    • Hans Wennborg's avatar
      Merging r279369 and update the test: · 0f664e38
      Hans Wennborg authored
      ------------------------------------------------------------------------
      r279369 | mssimpso | 2016-08-20 07:10:06 -0700 (Sat, 20 Aug 2016) | 1 line
      
      [SLP] Add command line option for minimum tree size (NFC)
      ------------------------------------------------------------------------
      
      llvm-svn: 279474
      0f664e38
    • Hans Wennborg's avatar
      Merging r279352: · e7d842f6
      Hans Wennborg authored
      ------------------------------------------------------------------------
      r279352 | eugenis | 2016-08-19 17:38:55 -0700 (Fri, 19 Aug 2016) | 1 line
      
      [msan] Disable prlimit test on glibc < 2.13.
      ------------------------------------------------------------------------
      
      llvm-svn: 279471
      e7d842f6
    • Hans Wennborg's avatar
      Fix gather-root.ll SLP vectorizer test to not expose UB. · afe20942
      Hans Wennborg authored
      The undefined behaviour (signed integer overflow) is not a regression
      in itself as it was already there, but the test exposing it is a
      regression compared to rc1, i.e. the lit tests no longer run ubsan-clean.
      
      This commit fixes the test based on Matt's change in r279125 to not
      expose the undefined behaviour.
      
      llvm-svn: 279468
      afe20942
  16. Aug 19, 2016