[all-commits] [llvm/llvm-project] 6a172a: [clang] Reland: Instantiate concepts with sugared ...

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Sun Aug 4 15:49:18 PDT 2024


  Branch: refs/heads/users/mizvekov/clang-sugar-substitute-concepts
  Home:   https://github.com/llvm/llvm-project
  Commit: 6a172a93121fdbeb0e58b33ec3140f150ecb524a
      https://github.com/llvm/llvm-project/commit/6a172a93121fdbeb0e58b33ec3140f150ecb524a
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2024-08-04 (Sun, 04 Aug 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Sema/Template.h
    M clang/lib/Sema/SemaConcept.cpp
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/lib/Sema/SemaTemplateDeduction.cpp
    M clang/lib/Serialization/ASTReaderDecl.cpp
    M clang/test/AST/ast-dump-concepts.cpp
    M clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp
    M clang/test/CXX/expr/expr.prim/expr.prim.req/nested-requirement.cpp
    M clang/test/CXX/expr/expr.prim/expr.prim.req/simple-requirement.cpp
    M clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp
    M clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp
    M clang/test/CXX/temp/temp.param/p10-2a.cpp
    M clang/test/SemaTemplate/concepts-recursive-inst.cpp
    M clang/test/SemaTemplate/concepts.cpp
    M clang/test/SemaTemplate/instantiate-requires-expr.cpp
    M clang/test/SemaTemplate/pr52970.cpp
    M libcxx/test/libcxx/algorithms/cpp17_iterator_concepts.verify.cpp

  Log Message:
  -----------
  [clang] Reland: Instantiate concepts with sugared template arguments

Since we don't unique specializations for concepts, we can just instantiate
them with the sugared template arguments, at negligible cost.

If we don't track their specializations, we can't resugar them later
anyway, and that would be more expensive than just instantiating them
sugared in the first place since it would require an additional pass.

This was a previously reverted patch due to a performance regression,
which was very simple to fix, as we were only missing the
canonicalizations for the key to the satisfcation cache.

Fixes #59271

Differential Revision: https://reviews.llvm.org/D136566



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list