[all-commits] [llvm/llvm-project] 82e48a: Disable use of _ExtInt with '__atomic' builtins

jtmott-intel via All-commits all-commits at lists.llvm.org
Mon Aug 24 11:25:30 PDT 2020


  Branch: refs/heads/release/11.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 82e48a579024d0ffbc352702ec0c52b47a6fe691
      https://github.com/llvm/llvm-project/commit/82e48a579024d0ffbc352702ec0c52b47a6fe691
  Author: Mott, Jeffrey T <jeffrey.t.mott at intel.com>
  Date:   2020-08-24 (Mon, 24 Aug 2020)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaChecking.cpp
    M clang/lib/Sema/SemaType.cpp
    M clang/test/Sema/builtins.c
    M clang/test/SemaCXX/ext-int.cpp
    A libcxx/test/libcxx/atomics/ext-int.verify.cpp

  Log Message:
  -----------
  Disable use of _ExtInt with '__atomic' builtins

We're (temporarily) disabling ExtInt for the '__atomic' builtins so we can better design their behavior later. The idea is until we do an audit/design for the way atomic builtins are supposed to work with _ExtInt, we should leave them restricted so they don't limit our future options, such as by binding us to a sub-optimal implementation via ABI.

Example after this change:

    $ cat test.c

        void f(_ExtInt(64) *ptr) {
          __atomic_fetch_add(ptr, 1, 0);
        }

    $ clang -c test.c

        test.c:2:22: error: argument to atomic builtin of type '_ExtInt' is not supported
          __atomic_fetch_add(ptr, 1, 0);
                             ^
        1 error generated.

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

(cherry picked from commit ca77ab494aa29f7521ff797d230cd1b36cbe4e62)




More information about the All-commits mailing list