[all-commits] [llvm/llvm-project] 5fdd09: [clang][CodeGen] Emit atomic IR in place of optimi...

Logikable via All-commits all-commits at lists.llvm.org
Mon Feb 12 09:33:21 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5fdd094837c6d8437803ebf3ccc91c3d494a2ac8
      https://github.com/llvm/llvm-project/commit/5fdd094837c6d8437803ebf3ccc91c3d494a2ac8
  Author: Logikable <seanluchen at google.com>
  Date:   2024-02-12 (Mon, 12 Feb 2024)

  Changed paths:
    M clang/lib/CodeGen/CGAtomic.cpp
    M clang/test/CodeGen/LoongArch/atomics.c
    M clang/test/CodeGen/PowerPC/quadword-atomics.c
    M clang/test/CodeGen/RISCV/riscv-atomics.c
    M clang/test/CodeGen/SystemZ/gnu-atomic-builtins-i128-8Al.c
    M clang/test/CodeGen/arm-atomics-m.c
    M clang/test/CodeGen/arm-atomics-m0.c
    M clang/test/CodeGen/atomic-ops-libcall.c
    M clang/test/CodeGen/atomic-ops.c
    M clang/test/CodeGen/atomics-inlining.c
    M clang/test/CodeGen/c11atomics.c
    M clang/test/CodeGenCXX/atomic-inline.cpp
    M clang/test/CodeGenOpenCL/atomic-ops-libcall.cl

  Log Message:
  -----------
  [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (#73176)

In the beginning, Clang only emitted atomic IR for operations it knew
the
underlying microarch had instructions for, meaning it required
significant
knowledge of the target. Later, the backend acquired the ability to
lower
IR to libcalls. To avoid duplicating logic and improve logic locality,
we'd like to move as much as possible to the backend.

There are many ways to describe this change. For example, this change
reduces the variables Clang uses to decide whether to emit libcalls or
IR, down to only the atomic's size.




More information about the All-commits mailing list