[all-commits] [llvm/llvm-project] 5cf587: Atomics: support min/max orthogonally

Tim Northover via All-commits all-commits at lists.llvm.org
Thu Nov 21 02:38:01 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5cf58768cb3ba31ee37facaf23f7a74f78781590
      https://github.com/llvm/llvm-project/commit/5cf58768cb3ba31ee37facaf23f7a74f78781590
  Author: Tim Northover <t.p.northover at gmail.com>
  Date:   2019-11-21 (Thu, 21 Nov 2019)

  Changed paths:
    M clang/docs/LanguageExtensions.rst
    M clang/include/clang/Basic/Builtins.def
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/AST/Expr.cpp
    M clang/lib/CodeGen/CGAtomic.cpp
    M clang/lib/Sema/SemaChecking.cpp
    M clang/test/CodeGen/atomic-ops.c
    M clang/test/Sema/atomic-ops.c
    M clang/test/SemaOpenCL/atomic-ops.cl

  Log Message:
  -----------
  Atomics: support min/max orthogonally

We seem to have been gradually growing support for atomic min/max operations
(exposing longstanding IR atomicrmw instructions). But until now there have
been gaps in the expected intrinsics. This adds support for the C11-style
intrinsics (i.e. taking _Atomic, rather than individually blessed by C11
standard), and the variants that return the new value instead of the original
one.

That way, people won't be misled by trying one form and it not working, and the
front-end is more friendly to people using _Atomic types, as we recommend.




More information about the All-commits mailing list