1. Jul 26, 2022
    • Alexander Shaposhnikov's avatar
      [IRBuilder] Add assert for AtomicRMW ordering · 1e636f26
      Alexander Shaposhnikov authored
      Add assert for AtomicRMW: Ordering != AtomicOrdering::Unordered
      (https://github.com/llvm/llvm-project/blob/main/llvm/lib/IR/Verifier.cpp#L3944)
      and adjust expandAtomicStore accordingly.
      
      Test plan:
      1/ ninja check-llvm check-clang check-lld
      2/ Bootstrapped LLVM/Clang pass tests
      
      Differential revision: https://reviews.llvm.org/D130457
      1e636f26
    • Fabian Parzefall's avatar
      [BOLT] Process each block only once in fixCFGForPIC · 83882606
      Fabian Parzefall authored
      Rather than iterating over the whole function from the start until no
      internal calls are found, process each block only once and continue
      processing after splitting. This version of the function also does not
      seemingly invalidate iterators from within the loop.
      
      Reviewed By: maksfb
      
      Differential Revision: https://reviews.llvm.org/D130436
      83882606
    • Fangrui Song's avatar
      [Driver] Ignore unimplemented -mtune= for ARM/PowerPC · 1d23f6c5
      Fangrui Song authored
      This compensates for 8f0c901c which enabled
      -Wunused-command-line-argument for unimplemented -mtune= in the generic code.
      Ignoring -mtune= appears to be longstanding and the error-free behavior in the
      presence of -Werror is unfortunately relied on by the Linux kernel's arm and
      powerpc ports. Ignore the warnings for the upcoming 15.0.0 branch and will
      implement functionality to fill the test gap soon.
      
      Link: https://github.com/ClangBuiltLinux/linux/issues/1674
      1d23f6c5
    • lipracer's avatar
      [mlir][NFC] Remove TypeRange's constructors that cause ambiguity · de7ff8d6
      lipracer authored
      ArrayRef<Value> can implicit convert to ValueRange,when we call TypeRange(SmallVector<Value>) is ambiguity.
      TypeRange(ValueRange values)
      TypeRange(ArrayRef<Value> values)
      
      Reviewed By: rriddle, Mogball
      
      Differential Revision: https://reviews.llvm.org/D129475
      de7ff8d6
    • lipracer's avatar
      Split class ValueRange to a new file · 10a4f033
      lipracer authored
      When we apply parent patch : https://reviews.llvm.org/D129475
      The prompt I get with the clang compiler is: ValueRange is imcomplete type,ValueRange is a forward declaration in the file TypeRange.h, and the file OperationSupport.h already includes the file TypeRange.h.The class TypeRange and the class ValueRange depend on each other.
      
      Reviewed By: rriddle, Mogball
      
      Differential Revision: https://reviews.llvm.org/D130332
      10a4f033
    • Augie Fackler's avatar
      MemoryBuiltins: remove malloc-family funcs from list · 85063090
      Augie Fackler authored
      We no longer need specialized knowledge of these allocator functions in
      this file since we have the correct attributes available now.
      
      As far as I can tell the changes in the attributor tests are due to
      things getting more consistent on alloc-family once we remove the static
      list entries.
      
      The two test changes in NewGVN merit extra scrutiny: NewGVN appears to
      be _extremely_ sensitive to the inaccessiblememonly for reasons that
      are beyond me. As a result, I had-enumerated all the attributes on
      allocation functions in those two tests instead of using -inferattrs.
      I assumed that the two -disable-simplify-libcalls tests there no
      longer are sensible since the function declaration now includes all the
      relevant attributes.
      
      Differential Revision: https://reviews.llvm.org/D130107
      85063090
    • Augie Fackler's avatar
      tests: add attributes that would normally come from inferattrs · 12c0bf8b
      Augie Fackler authored
      As my goal is to remove at least _some_ functions from the static list
      in MemoryBuiltins.cpp, these tests either need to run inferattrs or
      statically declare these attributes to keep passing. A couple of tests
      had alternate cases which are no longer meaningful, e.g.
      `malloc-load-removal.ll`.
      
      Differential Revision: https://reviews.llvm.org/D123087
      12c0bf8b
    • John Ericson's avatar
      Revert "[llvm][cmake] Make `install_symlink` workflow work with absolute install dirs" · cdf8c7b1
      John Ericson authored
      `ExtendPath` needs to be moved from internal to external CMake if it is
      to be used to `AddLLVM`. See, for example, the failure in
      https://lab.llvm.org/buildbot#builders/61/builds/29940
      
      This reverts commit 5acd3764.
      cdf8c7b1
    • John Ericson's avatar
      [llvm][cmake] Make `install_symlink` workflow work with absolute install dirs · 5acd3764
      John Ericson authored
      If `CMAKE_INSTALL_BINDIR` is a different absolute path per project, as
      it is with NixOS when we install every package to its own prefix, the
      old way fails when the absolute path gets prepended with `CMAKE_INSTALL_PREFIX`.
      
      Using `extend_path` from the install-time script isn't really possible, so we just make the caller responsible for making the path absolute instead.
      
      Also fix one stray `bin` -> `CMAKE_INSTALL_BINDIR`
      
      Reviewed By: sebastian-ne
      
      Differential Revision: https://reviews.llvm.org/D101070
      5acd3764
    • John Ericson's avatar
      [cmake] Support custom package install paths · ac0d1d5c
      John Ericson authored
      Firstly, we we make an additional GNUInstallDirs-style variable. With
      NixOS, for example, this is crucial as we want those to go in
      `${dev}/lib/cmake` not `${out}/lib/cmake` as that would a cmake subdir
      of the "regular" libdir, which is installed even when no one needs to do
      any development.
      
      Secondly, we make *Config.cmake robust to absolute package install
      paths. We for NixOS will in fact be passing them absolute paths to make
      the `${dev}` vs `${out}` distinction mentioned above, and the
      GNUInstallDirs-style variables are suposed to support absolute paths in
      general so it's good practice besides the NixOS use-case.
      
      Thirdly, we make `${project}_INSTALL_PACKAGE_DIR` CACHE PATHs like other
      install dirs are.
      
      Reviewed By: sebastian-ne
      
      Differential Revision: https://reviews.llvm.org/D117973
      ac0d1d5c
    • Joseph Huber's avatar
      [Libomptarget] Reintroduce host architecture checks for device RTL · 8c626fc0
      Joseph Huber authored
      A previous patch removed the need to set the auxiliary architecture as
      it was no longer needed for the clang invocation after moving to using
      the clang frontend. However, this had a second use of preventing
      unsupported host architectures from building the device runtime. This
      caused failures when trying to build on 32-bit hosts for example.
      
      Fixes #56699
      
      Reviewed By: tianshilei1992
      
      Differential Revision: https://reviews.llvm.org/D130509
      8c626fc0
    • Roy Sundahl's avatar
      [asan][test] Additional test requiring weak symbol for dyld64. · 1850a7a9
      Roy Sundahl authored
      Extension of D127929
      
      rdar://80997227
      
      Differential Revision: https://reviews.llvm.org/D130499
      1850a7a9
    • Daniel Bertalan's avatar
      Reland "[lld-macho] Implement -load_hidden" · 595fc59f
      Daniel Bertalan authored
      This flag was introduced in ld64-609. It instructs the linker to link to
      a static library while treating its symbols as if they had hidden
      visibility. This is useful when building a dylib that links to static
      libraries but we don't want the symbols from those to be exported.
      
      Closes #51505
      
      This reland adds bitcode file handling, so we won't get any compile
      errors due to BitcodeFile::forceHidden being unused.
      
      Differential Revision: https://reviews.llvm.org/D130473
      595fc59f
    • Siva Chandra Reddy's avatar
    • Andrew Brown's avatar
      [WebAssembly] Use `localexec` as default TLS model for non-Emscripten targets · 3696a789
      Andrew Brown authored
      Only Emscripten supports dynamic linking with threads. To use
      thread-local storage for other targets, this change defaults to the
      `localexec` model.
      
      Differential Revision: https://reviews.llvm.org/D130053
      3696a789
    • Siva Chandra Reddy's avatar
      [libc] Add dirent.h functions opendir, readdir, closedir and dirfd. · 35ea84ad
      Siva Chandra Reddy authored
      Reviewed By: lntue
      
      Differential Revision: https://reviews.llvm.org/D130459
      35ea84ad
    • Matt Arsenault's avatar
      RegAllocGreedy: Add a command line flag for reverseLocalAssignment · 62531518
      Matt Arsenault authored
      Introduce a flag like for some of the other target heuristic controls
      to help with experimentation.
      62531518
    • Matt Arsenault's avatar
      AMDGPU: Adjust register allocation priority values down · cb0c71e8
      Matt Arsenault authored
      Set the priorities consistently to number of registers in the tuple -
      1. Previously we started at 1, and also tried to give SGPR higher
      values than VGPRs. There's no point in assigning SGPRs higher values
      now that those are allocated in a separate regalloc run.
      
      This avoids overflowing the 5 bits used for the class priority in the
      allocation heuristic for 32 element tuples. This avoids some cases
      where smaller registers unexpectedly get prioritized over larger.
      cb0c71e8
    • Joseph Huber's avatar
      [OpenMP] Remove noinline attributes in the device runtime · d61d72da
      Joseph Huber authored
      We previously used the `noinline` attributes to specify some defintions
      which should be kept alive in the runtime. These were then stripped
      immediately in the OpenMPOpt module pass. However, Since the changes in
      D130298, we not explicitly state which functions will have external
      visiblity in the bitcode library. Additionally the OpenMPOpt module pass
      should run before the inliner pass, so this shouldn't make a difference
      in whether or not the functions will be alive for the initial pass of
      OpenMPOpt. This should simplify the interface, and additionally save
      time spend on scanning funciton names for noinline.
      
      Reviewed By: jdoerfert
      
      Differential Revision: https://reviews.llvm.org/D130368
      d61d72da
    • Sanjay Patel's avatar
      [Passes] add a tail-call-elim pass near the end of the opt pipeline · bfb9b8e0
      Sanjay Patel authored
      We call tail-call-elim near the beginning of the pipeline,
      but that is too early to annotate calls that get added later.
      
      In the motivating case from issue #47852, the missing 'tail'
      on memset leads to sub-optimal codegen.
      
      I experimented with removing the early instance of
      tail-call-elim instead of just adding another pass, but that
      appears to be slightly worse for compile-time:
      +0.15% vs. +0.08% time.
      "tailcall" shows adding the pass; "tailcall2" shows moving
      the pass to later, then adding the original early pass back
      (so 1596886802 is functionally equivalent to 180b0439dc ):
      https://llvm-compile-time-tracker.com/index.php?config=NewPM-O3&stat=instructions&remote=rotateright
      
      Note that there was an effort to split the tail call functionality
      into 2 passes - that could help reduce compile-time if we find
      that this change costs more in compile-time than expected based
      on the preliminary testing:
      D60031
      
      Differential Revision: https://reviews.llvm.org/D130374
      bfb9b8e0
    • Peter Klausler's avatar
      [flang] Allow restricted specific intrinsic functions as implicitly-interfaced... · 95f4ca7f
      Peter Klausler authored
      [flang] Allow restricted specific intrinsic functions as implicitly-interfaced procedure pointer targets
      
      The predicate "CanBeCalledViaImplicitInterface()" was returning false for
      restricted specific intrinsic functions (e.g., SIN) because their procedure
      characteristics have the elemental attribute; this leads to a bogus semantic
      error when one attempts to use them as proc-targets in procedure pointer
      assignment statements when the left-hand side of the assignment is a procedure
      pointer with an implicit interface.  However, these restricted specific intrinsic
      functions have always been allowed as special cases for such usage -- it is
      as if they are elemental when it is necessary for them to be so, but not
      when it's a problem.
      
      Differential Revision: https://reviews.llvm.org/D130386
      95f4ca7f
    • Peter Klausler's avatar
      [flang][runtime] Reset unit frame buffer when re-opening · ae1d5f4d
      Peter Klausler authored
      An OPEN statement that implies closing a connection must invalidate
      the unit's frame buffer so as to prevent stale data from the old
      connection from being read into the newly-connected unit.
      
      Differential Revision: https://reviews.llvm.org/D130430
      ae1d5f4d
    • Daniel Bertalan's avatar
      9bf1c6da
    • Daniel Bertalan's avatar
      [lld-macho] Implement -load_hidden · 4c79e1a3
      Daniel Bertalan authored
      This flag was introduced in ld64-609. It instructs the linker to link to
      a static library while treating its symbols as if they had hidden
      visibility. This is useful when building a dylib that links to static
      libraries but we don't want the symbols from those to be exported.
      
      Closes #51505
      
      Differential Revision: https://reviews.llvm.org/D130473
      4c79e1a3
    • Craig Topper's avatar
      [RISCV] Add more test cases for select with (setge X, C) condition. · f04ae437
      Craig Topper authored
      InstCombine and SelectionDAG will tend to canonicalize these conditions
      to (setgt X, C-1). C-1 might be more costly to materialize than C would
      have been.
      f04ae437
    • Kiran Chandramohan's avatar
      [Flang][OpenMP] Initial support for integer reduction in worksharing-loop · 7bb1151b
      Kiran Chandramohan authored
      Lower the Flang parse-tree containing OpenMP reductions to the OpenMP
      dialect. The OpenMP dialect models reductions with,
      1) A reduction declaration operation that specifies how to initialize, combine,
      and atomically combine private reduction variables.
      2) The OpenMP operation (like wsloop) that supports reductions has an array of
      reduction accumulator variables (operands) and an array attribute of the same
      size that points to the reduction declaration to be used for the reduction
      accumulation.
      3) The OpenMP reduction operation that takes a value and an accumulator.
      This operation replaces the original reduction operation in the source.
      
      (1) is implemented by the `createReductionDecl` in OpenMP.cpp,
      (2) is implemented while creating the OpenMP operation,
      (3) is implemented by the `genOpenMPReduction` function in OpenMP.cpp, and
      called from Bridge.cpp. The implementation of (3) is not very robust.
      
      NOTE 1: The patch currently supports only reductions for integer type addition.
      NOTE 2: Only supports reduction in the worksharing loop.
      NOTE 3: Does not generate atomic combination region.
      NOTE 4: Other options for creating the reduction operation include
      a) having the reduction operation as a construct containing an assignment
      and then handling it appropriately in the Bridge.
      b) we can modify `genAssignment` or `genFIR(AssignmentStmt)` in the Bridge to
      handle OpenMP reduction but so far we have tried not to mix OpenMP
      and non-OpenMP code and this will break that.
      I will try (b) in a separate patch.
      NOTE 5: OpenMP dialect gained support for reduction with the patches:
      D105358, D107343. See https://discourse.llvm.org/t/rfc-openmp-reduction-support/3367
      for more details.
      
      Reviewed By: awarzynski
      
      Differential Revision: https://reviews.llvm.org/D130077
      
      
      
      Co-authored-by: default avatarPeixin-Qiao <qiaopeixin@huawei.com>
      7bb1151b
    • Dmitri Gribenko's avatar
      [clang][dataflow] Rename iterators from IT to It · c0c9d717
      Dmitri Gribenko authored
      The latter way to abbreviate is a lot more common in the LLVM codebase.
      
      Reviewed By: sgatev, xazax.hun
      
      Differential Revision: https://reviews.llvm.org/D130423
      c0c9d717
    • Siva Chandra Reddy's avatar
      [libc] Add a simple StringStream class. · 5edc7ce2
      Siva Chandra Reddy authored
      This class will be used in future changes to construct simple strings.
      
      Reviewed By: michaelrj
      
      Differential Revision: https://reviews.llvm.org/D130334
      5edc7ce2
    • Eric Li's avatar
      [clang][dataflow] Fix MapLattice::insert() to not drop return value · 29d35ece
      Eric Li authored
      Fix `MapLattice` API to return `std::pair<iterator, bool>`,
      allowing users to detect when an element has been inserted without
      performing a redundant map lookup.
      
      Differential Revision: https://reviews.llvm.org/D130497
      29d35ece
    • Justin Brooks's avatar
      [Kaleidoscope] Fix DWARF function creation example · fb95b8dc
      Justin Brooks authored
      The full code listing was fixed in fdaeb0c6
      
      Reviewed By: dblaikie
      
      Differential Revision: https://reviews.llvm.org/D130217
      fb95b8dc
    • Peter Klausler's avatar
      [flang] Dial some errors down to warnings for ASSOCIATED() · 90c4eda3
      Peter Klausler authored
      When a procedure pointer is associated with a procedure target, f18
      will emit hard error messages if the pointer is incompatible with the
      target in a way that would cause the program to not work if the
      procedure pointer were actually called.  However, in the context of
      the ASSOCIATED() intrinsic, the compiler should not consider a query
      to be a compilation-time error if the pointer and the target are
      incompatible.  The standard gives us sufficient wiggle room here
      to treat these cases as warnings.
      
      Attempts to use ASSOCIATED to test whether a procedure pointer is
      associated with a data object, or vice versa, remain errors.
      
      Differential Revision: https://reviews.llvm.org/D130384
      90c4eda3
    • Christopher Bate's avatar
      894641e9
    • Corentin Jabot's avatar
    • Jean Perier's avatar
      [flang] Runs FIR SimplifyRegionLitePass pass after calling the inliner · 244bd7cb
      Jean Perier authored
      In flang pipeline, the inliner calls createCanonicalizerPass with the region
      simplification disabled. The inliner pass does canonicalization even if
      no inlining happens. After canonicalization, FIR lite region simplification
      must be called to get rid of unreachable regions.
      This code exposes the need to run SimplifyRegionLitePass after the inliner is
      called with FIR pipeline.
      
      Differential Revision: https://reviews.llvm.org/D130484
      244bd7cb
    • Mike Urbach's avatar
      [mlir] Update Python CMake version requirement. · e0af5032
      Mike Urbach authored
      The minimum required version is now 3.19 due to the usage of some
      more recent features. Update the version check and error message
      accordingly. Also remove some logic that behaved differently before
      3.18, since we can assume we are now on version 3.19+.
      
      Reviewed By: stella.stamenova
      
      Differential Revision: https://reviews.llvm.org/D130171
      e0af5032
    • Warren Ristow's avatar
      [Reassociate][NFC] Use an appropriate dyn_cast for BinaryOperator · 3bbd380a
      Warren Ristow authored
      In D129523, it was noted that there is are some questionable naked casts
      from Instruction to BinaryOperator, which could be addressed by doing a
      dyn_cast directly to BinaryOperator, avoiding the need for the later cast.
      This cleans up that casting.
      
      Reviewed By: nikic, spatel, RKSimon
      
      Differential Revision: https://reviews.llvm.org/D130448
      3bbd380a
    • Vladislav Dzhidzhoev's avatar
      [GlobalISel][DebugInfo] Remove debug info with zero line from constants inserted at entry block · fc93ba06
      Vladislav Dzhidzhoev authored
      Emission of constants having DebugLoc with line 0 causes significant increase of debug_line section size for some source files.
      
      To illustrate, we can compare section sizes of several files from llvm test-suite, built with SelectionDAG vs GlobalISel, on Aarch64 (macOS), using -O0 optimization level:
      
      | Source path                                                    | SDAG text sz | GISel text sz | SDAG debug_line sz |  GISel debug_line sz
      | -------------------------------------------------------------- | ------------ | ------------- | ------------------ | --------------------
      | `SingleSource/Regression/C/gcc-c-torture/execute/strlen-2.c`   | 15320        | 660           | 14872              | 6340
      | `SingleSource/Regression/C/gcc-c-torture/execute/20040629-1.c` | 33640        | 26300         | 2812               | 6693
      | `SingleSource/Benchmarks/Misc/flops-4.c`                       | 1428         | 1196          | 594                | 1008
      | `MultiSource/Benchmarks/MiBench/consumer-typeset/z31.c`        | 2716         | 964           | 809                | 903
      | `MultiSource/Benchmarks/Prolangs-C/gnugo/showinst.c`           | 2534         | 2502          | 189                | 573
      
      For instance, here is a fragment of `flops-4.c.o` debug line section dump
      
      ```
      Address            Line   Column File   ISA Discriminator Flags
      ------------------ ------ ------ ------ --- ------------- -------------
      0x0000000000000000    174      0      1   0             0  is_stmt
      0x0000000000000010      0      0      1   0             0
      0x0000000000000018    185      4      1   0             0  is_stmt prologue_end
      0x000000000000001c      0      0      1   0             0
      0x0000000000000024    186      4      1   0             0  is_stmt
      0x000000000000002c    189     10      1   0             0  is_stmt
      0x0000000000000030      0      0      1   0             0
      0x0000000000000038    207     11      1   0             0  is_stmt
      0x0000000000000044    208     11      1   0             0  is_stmt
      0x0000000000000048      0      0      1   0             0
      0x0000000000000058    210     10      1   0             0  is_stmt
      0x000000000000005c      0      0      1   0             0
      0x0000000000000060    211     10      1   0             0  is_stmt
      0x0000000000000064      0      0      1   0             0
      0x000000000000006c    212     10      1   0             0  is_stmt
      0x0000000000000070      0      0      1   0             0
      0x000000000000007c    213     10      1   0             0  is_stmt
      0x0000000000000080      0      0      1   0             0
      0x0000000000000088    214     10      1   0             0  is_stmt
      0x000000000000008c      0      0      1   0             0
      0x0000000000000094    215     10      1   0             0  is_stmt
      ```
      
      Lot of zero lines are produced by constants (global values) having DebugLoc with line 0.
      It seems that they're not significant for debugging experience.
      
      With the commit applied, total size of debug_line sections of llvm shared libraries has reduced by 2.5%.
      Change of debug line section size of files listed above:
      
      | Source path                                                    | GISel debug_line sz | Patch debug_line sz
      | -------------------------------------------------------------- | ------------------- | --------------------
      | `SingleSource/Regression/C/gcc-c-torture/execute/strlen-2.c`   | 6340                | 1465
      | `SingleSource/Regression/C/gcc-c-torture/execute/20040629-1.c` | 6693                | 3782
      | `SingleSource/Benchmarks/Misc/flops-4.c`                       | 1008                | 609
      | `MultiSource/Benchmarks/MiBench/consumer-typeset/z31.c`        | 903                 | 841
      | `MultiSource/Benchmarks/Prolangs-C/gnugo/showinst.c`           | 573                 | 190
      
      Reviewed By: dblaikie
      
      Differential Revision: https://reviews.llvm.org/D127488
      fc93ba06
    • Peter Klausler's avatar
      [flang] Better error message for NULL() actual argument for dummy allocatable · 85a40ce6
      Peter Klausler authored
      f18 intentionally does not support the spottily-implemented language extension
      in which one can pass NULL() for an allocatable dummy argument.  This is perhaps
      a sanctioned side effect in other compilers of the fact that they pass distinct
      "base address" and "descriptor address" physical arguments.
      
      Make the error message in this case more specific to the circumstances, and
      add a note to Extensions.md to clarify that this behavior is intended.
      
      (We could, with some effort in lowering, support passing NULL for an INTENT(IN)
      allocatable dummy, but let's see whether such nonconforming usage appears
      in a real application before spending any more time on it.)
      
      Differential Revision: https://reviews.llvm.org/D130380
      85a40ce6
    • Vladislav Dzhidzhoev's avatar
      Fix assertion in SmallDenseMap constructor with reserve from non-power-of-2 buckets count · 2c84b923
      Vladislav Dzhidzhoev authored
      `SmallDenseMap` constructor with reserve gets an arbitrary `NumInitBuckets` value and passes it below to `init` method.
      
      If `NumInitBuckets` is greater then `InlineBuckets`, then `SmallDenseMap` initializes to large representation passing `NumInitBuckets` below to `DenseMap` initialization. `DenseMap::initEmpty` method asserts that initial buckets count must be a power of 2.
      
      Proposed solution is to update `NumInitBuckets` value in `SmallDenseMap` constructor till the next power of 2. It should satisfy both `DenseMap` preconditions and required minimum buckets count for reservation.
      
      Reviewed By: atrick
      
      Differential Revision: https://reviews.llvm.org/D129825
      2c84b923
    • Igor Zhukov's avatar
      Use `<stdatomic.h>` with MSVC and C++ · ba49d39b
      Igor Zhukov authored
      and use fallback only for C.
      
      It fixes the isssue with clang-cl:
      
      ```
      #include <stdatomic.h>
      #include <stdbool.h>
      #ifdef __cplusplus
      #include <atomic>
      using namespace std;
      #endif
      
      int main() {
          atomic_bool b = true;
      }
      ```
      
      ```
      $ clang-cl /TC main.cpp
      # works
      ```
      ```
      $ clang-cl /TP /std:c++20 main.cpp
      
      stdatomic.h(70,6): error: conflicting types for 'atomic_thread_fence'
      void atomic_thread_fence(memory_order);
           ^
      atomic(166,24): note: previous definition is here
      extern "C" inline void atomic_thread_fence(const memory_order _Order) noexcept {
      
      ...
      
      fatal error: too many errors emitted, stopping now [-ferror-limit=]
      20 errors generated.
      ```
      Many errors but
      `<stdatomic.h>` has many macros to built-in functions.
      ```
      #define atomic_thread_fence(order) __c11_atomic_thread_fence(order)
      ```
      and MSVC `<atomic>` has real functions.
      and the built-in functions are redefined.
      
      Reviewed By: #libc, aaron.ballman, Mordante
      
      Differential Revision: https://reviews.llvm.org/D130419
      ba49d39b