[all-commits] [llvm/llvm-project] dbde39: [UpdateTestChecks][NFC] Fix spelling

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Wed Sep 16 11:40:04 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: dbde3969ba8e2b396333dc6b139a0b3a88dfbc80
      https://github.com/llvm/llvm-project/commit/dbde3969ba8e2b396333dc6b139a0b3a88dfbc80
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-09-16 (Wed, 16 Sep 2020)

  Changed paths:
    M llvm/utils/UpdateTestChecks/common.py

  Log Message:
  -----------
  [UpdateTestChecks][NFC] Fix spelling


  Commit: 6a02932becaeaeb02eddfaed567f3dad3719dd1c
      https://github.com/llvm/llvm-project/commit/6a02932becaeaeb02eddfaed567f3dad3719dd1c
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-09-16 (Wed, 16 Sep 2020)

  Changed paths:
    M clang/lib/AST/OpenMPClause.cpp
    A clang/test/AST/ast-dump-openmp-begin-declare-variant_13.c

  Log Message:
  -----------
  [OpenMP][FIX] Do not crash trying to print a missing (demangled) user condition

Reviewed By: JonChesterfield

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


  Commit: 05fd04eda4b22b09e33753132cbf037a1265c7e2
      https://github.com/llvm/llvm-project/commit/05fd04eda4b22b09e33753132cbf037a1265c7e2
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-09-16 (Wed, 16 Sep 2020)

  Changed paths:
    M clang/lib/AST/OpenMPClause.cpp
    M clang/test/AST/ast-dump-openmp-declare-variant-extensions.c

  Log Message:
  -----------
  [OpenMP][FIX] Do not drop a '$' while demangling declare variant names

Reviewed By: ABataev

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


  Commit: 5c63ae156e96a20ce96570d4bd2c48a9c8170a9d
      https://github.com/llvm/llvm-project/commit/5c63ae156e96a20ce96570d4bd2c48a9c8170a9d
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-09-16 (Wed, 16 Sep 2020)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticParseKinds.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Parse/Parser.h
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Parse/ParseOpenMP.cpp
    M clang/lib/Sema/SemaOpenMP.cpp
    A clang/test/AST/ast-dump-openmp-begin-declare-variant_nested.c
    M clang/test/OpenMP/declare_variant_messages.c

  Log Message:
  -----------
  [OpenMP] Support nested OpenMP context selectors (declare variant)

Due to `omp begin/end declare variant`, OpenMP context selectors can be
nested. This patch adds initial support for this so we can use it for
target math variants. We should improve the detection of "equivalent"
scores and user conditions, we should also revisit the data structures
of the OMPTraitInfo object, however, both are not pressing issues right
now.

Reviewed By: JonChesterfield

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


  Commit: c4b7a1da9d872ed075ce99c80a90b11a135577a0
      https://github.com/llvm/llvm-project/commit/c4b7a1da9d872ed075ce99c80a90b11a135577a0
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-09-16 (Wed, 16 Sep 2020)

  Changed paths:
    M clang/include/clang/AST/OpenMPClause.h
    M clang/include/clang/Basic/AttrDocs.td
    M clang/lib/Parse/ParseOpenMP.cpp
    M clang/lib/Sema/SemaOpenMP.cpp
    A clang/test/AST/ast-dump-openmp-begin-declare-variant-varying-return.c
    M llvm/include/llvm/Frontend/OpenMP/OMPKinds.def

  Log Message:
  -----------
  [OpenMP] Context selector extensions for return value overloading

This extension allows to declare variants in between `omp begin/end
declare variant` that do not match the type of the existing function
with that name. Without this extension we would not find a base function
(with a compatible type), therefore create a new one, which would
cause conflicting declarations. With this extension we will not create
"missing" base functions, which basically renders these specializations
harmless. They will be generated but never called.

Reviewed By: JonChesterfield

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


  Commit: 97652202d1e6964d5d7a1c03a257452c7ad95233
      https://github.com/llvm/llvm-project/commit/97652202d1e6964d5d7a1c03a257452c7ad95233
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-09-16 (Wed, 16 Sep 2020)

  Changed paths:
    M clang/lib/Headers/__clang_cuda_cmath.h
    M clang/test/Headers/Inputs/include/cmath
    A clang/test/Headers/openmp_device_math_isnan.cpp

  Log Message:
  -----------
  [OpenMP] Overload `std::isnan` and friends multiple times for the GPU

`std::isnan` and friends can be found in two variants in the wild, one
returns `bool`, as the standard defines it, one returns `int`, as the C
macros do. So far we kinda hoped the system versions of these functions
will work for people, e.g. they are definitions that can be compiled for
the target. We know that is not the case always so we leverage the
`disable_implicit_base` OpenMP context extension to specialize both
versions of these functions without causing an invalid redeclaration.

Reviewed By: JonChesterfield, tra

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


  Commit: 5c1084e8840b02d410ba125cbba466465242d820
      https://github.com/llvm/llvm-project/commit/5c1084e8840b02d410ba125cbba466465242d820
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-09-16 (Wed, 16 Sep 2020)

  Changed paths:
    M clang/include/clang/Basic/AttrDocs.td
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Headers/openmp_wrappers/cmath
    M clang/lib/Parse/ParseOpenMP.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaOpenMP.cpp
    M clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
    A clang/test/AST/ast-dump-openmp-begin-declare-variant_template_2.cpp
    M llvm/include/llvm/Frontend/OpenMP/OMPKinds.def

  Log Message:
  -----------
  [OpenMP] Context selector extensions for template functions

With this extension the effects of `omp begin declare variant` will be
applied to template function declarations. The behavior is opt-in and
controlled by the `extension(allow_templates)` trait. While generally
useful, this will enable us to implement complex math function calls by
overloading the templates of the standard library with the ones in
libc++.

Reviewed By: JonChesterfield

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


  Commit: 56069b5c71ca78749aa983c1e9de6f1e4c049f4b
      https://github.com/llvm/llvm-project/commit/56069b5c71ca78749aa983c1e9de6f1e4c049f4b
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-09-16 (Wed, 16 Sep 2020)

  Changed paths:
    M clang/lib/Headers/CMakeLists.txt
    M clang/lib/Headers/openmp_wrappers/complex
    A clang/lib/Headers/openmp_wrappers/complex_cmath.h
    M clang/test/Headers/Inputs/include/complex
    A clang/test/Headers/Inputs/include/type_traits
    M clang/test/Headers/nvptx_device_math_complex.cpp

  Log Message:
  -----------
  [OpenMP] Support `std::complex` math functions in target regions

The last (big) missing piece to get "math" working in OpenMP target
regions (that I know of) was complex math functions, e.g.,
`std::sin(std::complex<double>)`. With this patch we overload the system
template functions for these operations with versions that have been
distilled from `libcxx/include/complex`. We use the same
  `omp begin/end declare variant`
mechanism we use for other math functions before, except that we this
time overload templates (via D85735).

Reviewed By: JonChesterfield

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


Compare: https://github.com/llvm/llvm-project/compare/f723d193e2c9...56069b5c71ca


More information about the All-commits mailing list