1. Apr 23, 2020
  2. Apr 17, 2020
  3. Apr 15, 2020
  4. Apr 14, 2020
  5. Apr 13, 2020
  6. Apr 12, 2020
  7. Apr 11, 2020
  8. Mar 23, 2020
  9. Mar 19, 2020
    • 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
  10. Mar 18, 2020
  11. Mar 17, 2020
    • 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
  12. Mar 16, 2020
  13. Mar 13, 2020
  14. Mar 12, 2020
  15. Mar 11, 2020
  16. Mar 07, 2020
    • 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