1. 16 Jun, 2020 1 commit
    • Cristian Adam's avatar
      [clang] [mac] Disable crash-recovery-reparse test · f7b8eaf7
      Cristian Adam authored
      The "Cache preamble-related data" commit is crashing only on macOS:
      
      libc++abi.dylib: terminating with uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument
      libc++abi.dylib: Pure virtual function called!
      error: Abort trap: 6
      
      I've tried leaking the CacheMutex. Didn't help. Disabling the test
      in order to make a release.
      
      Change-Id: I3a44be771896d6263a08ed56a49646019508f08e
      Reviewed-by: default avatarCristian Adam <cristian.adam@qt.io>
      f7b8eaf7
  2. 15 Jun, 2020 1 commit
    • Ivan Donchevskii's avatar
      [clang] Cache preamble-related data · 1c3b7543
      Ivan Donchevskii authored
      In case two translation units are created for the
      same file - reuse preamble data to reduce memory and
      save time on extra preamble generation.
      
      Qt Creator creates two translation units for each file.
      With this patch they try to share the same preamble which
      in most of the cases prevents double generation by checking
      the bounds of the existing preamble and reusing it if it's valid.
      In the worst case preamble is still generated twice and we get
      slightly worse performance than before but I never saw such case.
      
      Cherry picked from commit
      clang.git/403df55e933f947ad52c9a66759a06b30ab89738.
      
      Reviewed-by; Marco Bubke <marco.bubke@qt.io>
      
      Change-Id: Ia52fe2a0428cf0d13f210b2e85ee7b44cde9ad1c
      Reviewed-by: default avatarCristian Adam <cristian.adam@qt.io>
      1c3b7543
  3. 05 May, 2020 1 commit
  4. 27 Apr, 2020 2 commits
  5. 23 Mar, 2020 1 commit
  6. 22 Mar, 2020 1 commit
  7. 19 Mar, 2020 5 commits
    • Saar Raz's avatar
      [Concepts] Fix incorrect control flow when TryAnnotateTypeConstraint annotates... · 35627038
      Saar Raz authored
      [Concepts] Fix incorrect control flow when TryAnnotateTypeConstraint annotates an invalid template-id
      
      TryAnnotateTypeConstraint could annotate a template-id which doesn't end up being a type-constraint,
      in which case control flow would incorrectly flow into ParseImplicitInt.
      
      Reenter the loop in this case.
      Enable relevant tests for C++20. This required disabling typo-correction during TryAnnotateTypeConstraint
      and changing a test case which is broken due to a separate bug (will be reported and handled separately).
      
      (cherry picked from commit 19fccc52)
      35627038
    • Saar Raz's avatar
      [Concepts] Fix incorrect DeclContext for transformed RequiresExprBodyDecl · a36a14b7
      Saar Raz authored
      We would assign the incorrect DeclContext when transforming the RequiresExprBodyDecl, causing incorrect
      handling of 'this' inside RequiresExprBodyDecls (bug #45162).
      
      Assign the current context as the DeclContext of the transformed decl.
      
      (cherry picked from commit 9769e1ee)
      a36a14b7
    • Hans Wennborg's avatar
      ../llvm/utils/update_test_checks.py --opt-binary bin/opt... · 5401d393
      Hans Wennborg authored
      ../llvm/utils/update_test_checks.py --opt-binary bin/opt ../llvm/test/Transforms/PhaseOrdering/min-max-abs-cse.ll
      5401d393
    • Sanjay Patel's avatar
      [EarlyCSE] avoid crashing when detecting min/max/abs patterns (PR41083) · 623461b2
      Sanjay Patel authored
      As discussed in PR41083:
      https://bugs.llvm.org/show_bug.cgi?id=41083
      ...we can assert/crash in EarlyCSE using the current hashing scheme and
      instructions with flags.
      
      ValueTracking's matchSelectPattern() may rely on overflow (nsw, etc) or
      other flags when detecting patterns such as min/max/abs composed of
      compare+select. But the value numbering / hashing mechanism used by
      EarlyCSE intersects those flags to allow more CSE.
      
      Several alternatives to solve this are discussed in the bug report.
      This patch avoids the issue by doing simple matching of min/max/abs
      patterns that never requires instruction flags. We give up some CSE
      power because of that, but that is not expected to result in much
      actual performance difference because InstCombine will canonicalize
      these patterns when possible. It even has this comment for abs/nabs:
      
        /// Canonicalize all these variants to 1 pattern.
        /// This makes CSE more likely.
      
      (And this patch adds PhaseOrdering tests to verify that the expected
      transforms are still happening in the standard optimization pipelines.
      
      I left this code to use ValueTracking's "flavor" enum values, so we
      don't have to change the callers' code. If we decide to go back to
      using the ValueTracking call (by changing the hashing algorithm
      instead), it should be obvious how to replace this chunk.
      
      Differential Revision: https://reviews.llvm.org/D74285
      
      (cherry picked from commit b8ebc11f)
      623461b2
    • Sanjay Patel's avatar
      [Transforms] add phase ordering tests for min/max/abs; NFC · cfa79245
      Sanjay Patel authored
      Test that instcombine and early-cse can cooperate
      to reduce sequences of select patterns that are not
      composed of the same underlying instructions.
      
      There's a bug in EarlyCSE (PR41083), and we can test
      how much a possible fix (D74285) may affect optimization.
      
      (cherry picked from commit 0ad6e726)
      cfa79245
  8. 18 Mar, 2020 2 commits
  9. 17 Mar, 2020 2 commits
    • Saar Raz's avatar
      [Concepts] Fix incorrect control flow when TryAnnotateTypeConstraint annotates... · 135744ce
      Saar Raz authored
      [Concepts] Fix incorrect control flow when TryAnnotateTypeConstraint annotates an invalid template-id
      
      TryAnnotateTypeConstraint could annotate a template-id which doesn't end up being a type-constraint,
      in which case control flow would incorrectly flow into ParseImplicitInt.
      
      Reenter the loop in this case.
      Enable relevant tests for C++20. This required disabling typo-correction during TryAnnotateTypeConstraint
      and changing a test case which is broken due to a separate bug (will be reported and handled separately).
      
      (cherry picked from commit 19fccc52)
      135744ce
    • Saar Raz's avatar
      [Concepts] Fix incorrect DeclContext for transformed RequiresExprBodyDecl · 9e0bd5ec
      Saar Raz authored
      We would assign the incorrect DeclContext when transforming the RequiresExprBodyDecl, causing incorrect
      handling of 'this' inside RequiresExprBodyDecls (bug #45162).
      
      Assign the current context as the DeclContext of the transformed decl.
      
      (cherry picked from commit 9769e1ee)
      9e0bd5ec
  10. 16 Mar, 2020 1 commit
  11. 13 Mar, 2020 3 commits
  12. 12 Mar, 2020 2 commits
  13. 11 Mar, 2020 1 commit
    • Richard Smith's avatar
      PR45124: Don't leave behind pending cleanups when declaring implicit · 5b5a111c
      Richard Smith authored
      deduction guides.
      
      Previously if an implicit deduction guide had a default argument with a
      cleanup, we'd leave the 'pending cleanup' flag set after declaring the
      implicit guide. But it turns out that there's no reason to even
      substitute into the default argument when declaring an implicit
      deduction guide: we only need to record that the default argument
      exists, not what it is, since we never actually form a call to a
      deduction guide.
      
      (cherry picked from commit 6d894afd)
      5b5a111c
  14. 10 Mar, 2020 2 commits
  15. 06 Mar, 2020 2 commits
    • Saar Raz's avatar
      [Concepts] Add null check for TemplateTypeParmType::getDecl() in... · 7c18c2f7
      Saar Raz authored
      [Concepts] Add null check for TemplateTypeParmType::getDecl() in GetContainedInventedTypeParmVisitor
      
      GetContainedInventedTypeParmVisitor would not account for the case where TemplateTypeParmType::getDecl() is
      nullptr, causing bug #45102.
      
      Add the nullptr check.
      
      (cherry picked from commit 865456d5)
      7c18c2f7
    • Rainer Orth's avatar
      [mlir] NFC: Rename index_t to index_type · edcd83a6
      Rainer Orth authored
      mlir currently fails to build on Solaris:
      
        /vol/llvm/src/llvm-project/dist/mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp:78:20: error: reference to 'index_t' is ambiguous
          IndexHandle zero(index_t(0)), one(index_t(1));
                           ^
        /usr/include/sys/types.h:103:16: note: candidate found by name lookup is 'index_t'
        typedef short           index_t;
                                ^
        /vol/llvm/src/llvm-project/dist/mlir/include/mlir/EDSC/Builders.h:27:8: note: candidate found by name lookup is 'mlir::edsc::index_t'
        struct index_t {
               ^
      
      and many more.
      
      Given that POSIX reserves all identifiers ending in `_t` 2.2.2 The Name Space <https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html>, it seems
      quite unwise to use such identifiers in user code, even more so without a distinguished
      prefix.
      
      The following patch fixes this by renaming `index_t` to `index_type`.
      cases.
      
      Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.
      
      Differential Revision: https://reviews.llvm.org/D72619
      
      (cherry picked from commit 002ec79f)
      edcd83a6
  16. 05 Mar, 2020 1 commit
  17. 04 Mar, 2020 4 commits
  18. 03 Mar, 2020 2 commits
  19. 02 Mar, 2020 6 commits