LLVM/project 0cb237dclang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/CodeGen CIRGenBuiltin.cpp

[CIR] Add AtomicFenceOp and signal/thread fence builtins and required helpers (#168346)

This PR adds the AtomicFenceOp and signal/thread fence builtins.
DeltaFile
+181-0clang/test/CIR/CodeGen/atomic-thread-fence.c
+35-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+32-0clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+22-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+270-04 files

LLVM/project c87602fclang/lib/CIR/Analysis FallThroughWarning.cpp, clang/test/CIR/Analysis fallthrough_switch.c fallthrough_1.c

[CIR] Added switch support
DeltaFile
+106-0clang/lib/CIR/Analysis/FallThroughWarning.cpp
+105-0clang/test/CIR/Analysis/fallthrough_switch.c
+1-3clang/test/CIR/Analysis/fallthrough_1.c
+1-3clang/test/CIR/Analysis/fallthrough_2.c
+213-64 files

LLVM/project fd85d17llvm/include/llvm/IR RuntimeLibcalls.td, llvm/lib/CodeGen TargetLoweringBase.cpp

DAG: Use RuntimeLibcalls to legalize vector frem calls

This continues the replacement of TargetLibraryInfo uses in codegen
with RuntimeLibcallsInfo started in 821d2825a4f782da3da3c03b8a002802bff4b95c.
The series there handled all of the multiple result calls. This
extends for the other handled case, which happened to be frem.

For some reason the Libcall for these are prefixed with "REM_", for
the instruction "frem", which maps to the libcall "fmod".
DeltaFile
+36-80llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
+49-4llvm/lib/IR/RuntimeLibcalls.cpp
+23-13llvm/test/Transforms/Util/DeclareRuntimeLibcalls/sleef.ll
+22-13llvm/test/Transforms/Util/DeclareRuntimeLibcalls/armpl.ll
+22-0llvm/lib/CodeGen/TargetLoweringBase.cpp
+11-11llvm/include/llvm/IR/RuntimeLibcalls.td
+163-1211 files not shown
+167-1217 files

LLVM/project 5a3e770llvm/include/llvm/CodeGen SelectionDAG.h, llvm/lib/CodeGen/SelectionDAG LegalizeDAG.cpp TargetLowering.cpp

DAG: Add overload of getExternalSymbol using RTLIB::LibcallImpl
DeltaFile
+7-8llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+4-4llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+5-0llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+1-2llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+1-0llvm/include/llvm/CodeGen/SelectionDAG.h
+18-145 files

LLVM/project 7afeea4llvm/test/CodeGen/AArch64 wineh-pac.ll

Autogenerate llvm/test/CodeGen/AArch64/wineh-pac.ll (#170925)

Using custom CHECK lines doesn't really help here.
DeltaFile
+56-54llvm/test/CodeGen/AArch64/wineh-pac.ll
+56-541 files

LLVM/project a55221dclang/lib/Driver/ToolChains Darwin.cpp, clang/test/Driver darwin-link-libcxx.cpp experimental-library-flag.cpp

[clang] Revert changes to prefer the toolchain-provided libc++.dylib

This patch reverts the change that made clang prefer the toolchain
libc++.dylib when there is one (#170303), and the subsequent test
workaround we landed to fix bots (#170912).

We are seeing some failure on macOS LLDB bots that need to be
investigated, and that will require more time than I can spare
before the end of today.

This reverts commits bad1a88963 and 190b8d0b.
DeltaFile
+0-84clang/test/Driver/darwin-link-libcxx.cpp
+3-41clang/lib/Driver/ToolChains/Darwin.cpp
+0-15compiler-rt/cmake/config-ix.cmake
+3-5clang/test/Driver/experimental-library-flag.cpp
+2-2clang/test/Driver/darwin-header-search-libcxx.cpp
+0-0clang/test/Driver/Inputs/basic_darwin_toolchain_static/usr/lib/libc++.a
+8-1475 files not shown
+8-14711 files

LLVM/project f04fe66lld/docs/ELF linker_script.rst

apply suggestions
DeltaFile
+2-2lld/docs/ELF/linker_script.rst
+2-21 files

LLVM/project 7982688compiler-rt/test/profile/Linux instrprof-debug-info-correlate-debuginfod.c

[Profile] Fix debuginfod test with internal shell

The recent relanding of the internal shell broke one of the debuginfod
tests as it is not tested by any upstream buildbot due to the use of
curl. Rewriting the test to not use subshells is pretty simple.
DeltaFile
+5-2compiler-rt/test/profile/Linux/instrprof-debug-info-correlate-debuginfod.c
+5-21 files

LLVM/project 58c8f57compiler-rt CMakeLists.txt

[compiler-rt] Add CMake flag for AArch64 Linux with 39-bit VA. (#167028)

Sanitizers currently assume AArch64 Linux has 48-bit VA. Followup
patches will add checks for this flag to asan and hwasan.
DeltaFile
+7-0compiler-rt/CMakeLists.txt
+7-01 files

LLVM/project 0e0ec4cllvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp

Revert "AMDGPU/PromoteAlloca: Simplify how deferred loads work (#170510)"

This reverts commit 22a2c27a0aa0d3aa5d4222f6e766646166450543.

Failure on clang-hip-vega20: https://lab.llvm.org/buildbot/#/builders/123/builds/31779
DeltaFile
+46-34llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+46-341 files

LLVM/project de86696llvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp, llvm/test/CodeGen/AMDGPU promote-alloca-multidim.ll promote-alloca-negative-index.ll

Revert "AMDGPU/PromoteAlloca: Always use i32 for indexing (#170511)"

This reverts commit f558c30146e51d5ef72bf3d4b3f0e86ca19e4b99.

Failure on clang-hip-vega20: https://lab.llvm.org/buildbot/#/builders/123/builds/31779
DeltaFile
+13-15llvm/test/CodeGen/AMDGPU/promote-alloca-multidim.ll
+6-7llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+4-8llvm/test/CodeGen/AMDGPU/promote-alloca-negative-index.ll
+1-1llvm/test/CodeGen/AMDGPU/promote-alloca-vector-to-vector.ll
+24-314 files

LLVM/project d8e52c0llvm/test/Transforms/LoopVectorize vplan-printing.ll

[VPlan] Use strict whitespace checks for VPlan printing test.

Use --strict-whitespace for vplan-printing.ll to catch stray
whitespaces. The test updates show a few places where we currently emit
those.
DeltaFile
+37-37llvm/test/Transforms/LoopVectorize/vplan-printing.ll
+37-371 files

LLVM/project b78fd58flang/test/Semantics dosemantics12.f90 kinds02.f90, flang/test/Semantics/OpenACC acc-atomic-validity.f90 acc-reduction-validity.f90

[flang][NFC] Strip trailing whitespace from tests (11 of 14)

Only some fortran source files in flang/test/Semantics have been
modified. The remaining files will be cleaned up in subsequent commits.
DeltaFile
+14-14flang/test/Semantics/dosemantics12.f90
+6-6flang/test/Semantics/kinds02.f90
+4-4flang/test/Semantics/OpenACC/acc-atomic-validity.f90
+3-3flang/test/Semantics/dosemantics11.f90
+3-3flang/test/Semantics/dosemantics05.f90
+2-2flang/test/Semantics/OpenACC/acc-reduction-validity.f90
+32-3217 files not shown
+50-5123 files

LLVM/project aa5e8c5clang/lib/Headers amo.h, clang/lib/Sema SemaPPC.cpp

[PowerPC] Add support for AMO store builtins
DeltaFile
+108-0clang/test/CodeGen/PowerPC/ppc-amo-header.c
+89-0clang/lib/Headers/amo.h
+63-0clang/test/CodeGen/PowerPC/builtins-ppc-amo.c
+32-0llvm/test/CodeGen/PowerPC/amo-enable.ll
+28-0clang/lib/Sema/SemaPPC.cpp
+24-0clang/test/CodeGen/PowerPC/builtins-amo-err.c
+344-06 files not shown
+398-212 files

LLVM/project a1eff73libc/src/string string_length.h

Include inline_strlen.h on aarch64 only if the target has vector instrucions (#170892)

DeltaFile
+2-1libc/src/string/string_length.h
+2-11 files

LLVM/project b464d77llvm/lib/Target/RISCV RISCVSchedSiFive7.td RISCVScheduleV.td

[RISCV] LMUL lists for indexed and strided loads (#169756)

Create additional lists representing valid LMULs for strided and indexed
load of particular element sizes.
DeltaFile
+5-7llvm/lib/Target/RISCV/RISCVSchedSiFive7.td
+8-0llvm/lib/Target/RISCV/RISCVScheduleV.td
+4-4llvm/lib/Target/RISCV/RISCVSchedTTAscalonD8.td
+17-113 files

LLVM/project 216caeaflang/lib/Lower/OpenMP Clauses.cpp ClauseProcessor.cpp, llvm/include/llvm/Frontend/OpenMP ClauseT.h

[flang][OpenMP] Store list of expressions in InitializerT

The INITIALIZER clause holds a stylized expression that can be
intiantiated with different types. Currently, the InitializerT
class only holds one expression, which happens to correspond to
the first type in the DECLARE_REDUCTION type list.

Change InitializerT to hold a list of expressions instead, one
for each type. Keep the lowering code unchanged by picking the
first expression from the list.
DeltaFile
+13-11flang/lib/Lower/OpenMP/Clauses.cpp
+3-2flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+2-1llvm/include/llvm/Frontend/OpenMP/ClauseT.h
+18-143 files

LLVM/project 4c59219libc/src/__support/FPUtil/x86_64 FEnvImpl.h fenv_x86_common.h, libc/test/UnitTest FEnvSafeTest.cpp

[libc][fenv] Refactor x86 fenv implementations to make it work for various fenv_t. (#165015)

DeltaFile
+205-603libc/src/__support/FPUtil/x86_64/FEnvImpl.h
+259-0libc/src/__support/FPUtil/x86_64/fenv_x86_common.h
+194-0libc/src/__support/FPUtil/x86_64/fenv_x87_utils.h
+166-0libc/src/__support/FPUtil/x86_64/fenv_mxcsr_utils.h
+137-0libc/src/__support/FPUtil/x86_64/fenv_x87_only.h
+43-19libc/test/UnitTest/FEnvSafeTest.cpp
+1,004-62214 files not shown
+1,090-69420 files

LLVM/project f558c30llvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp, llvm/test/CodeGen/AMDGPU promote-alloca-multidim.ll promote-alloca-negative-index.ll

AMDGPU/PromoteAlloca: Always use i32 for indexing (#170511)

Create more canonical code that may even lead to slightly better
codegen.
DeltaFile
+15-13llvm/test/CodeGen/AMDGPU/promote-alloca-multidim.ll
+7-6llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+8-4llvm/test/CodeGen/AMDGPU/promote-alloca-negative-index.ll
+1-1llvm/test/CodeGen/AMDGPU/promote-alloca-vector-to-vector.ll
+31-244 files

LLVM/project 22a2c27llvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp

AMDGPU/PromoteAlloca: Simplify how deferred loads work (#170510)

The second pass of promotion to vector can be quite simple. Reflect that
simplicity in the code for better maintainability.
DeltaFile
+34-46llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+34-461 files

LLVM/project bad1a88clang/test/Driver darwin-link-libcxx.cpp

[clang] Temporarily disable Darwin test for linking against libc++ on non-darwin systems (#170912)

Disable the test added in #170303, which breaks bots that don't use ld
as their linker. This is a temporary and narrow disablement of the test
until we can make it more general again, to get the bots green.

Co-authored-by: Louis Dionne <ldionne.2 at gmail.com>
DeltaFile
+3-0clang/test/Driver/darwin-link-libcxx.cpp
+3-01 files

LLVM/project ecf4927lldb/source/Host/windows ProcessLauncherWindows.cpp

[lldb] Fix Windows build after 6b51e26d39fa (#170917)

DeltaFile
+1-1lldb/source/Host/windows/ProcessLauncherWindows.cpp
+1-11 files

LLVM/project 93d64a5llvm/lib/Target/SPIRV SPIRVModuleAnalysis.cpp SPIRVLegalizerInfo.cpp, llvm/test/CodeGen/SPIRV/extensions/SPV_NV_shader_atomic_fp16_vector atomicrmw_faddfsub_vec_float16.ll atomicrmw_fminfmax_vec_float16.ll

[SPIRV] Add `<2 x half>` and `<4 x half>` atomics via `SPV_NV_shader_atomic_fp16_vector` (#170213)

This adds support for the `SPV_NV_shader_atomic_fp16_vector` extension,
and then uses it to enable lowering of atomic add, sub, min and max on 2
and 4 component vectors of FP16, which are rather common options in ML
workloads. Even though `bfloat16` also works in practice, we do not
enable it since it's not specified in the extension (which might need
updating / promoting to KHR at least). A `TODO` is also inserted in
`SPIRVModuleAnalysis.cpp' regarding the need to upgrade its ample usage
of `report_fatal_error`; I have a WiP patch for that, but it still needs
a bit of baking. Finally, a paired patch will be necessary in the
Translator, as it's not aware of the extension either - I'll update this
review to reference the PR once I create it.
DeltaFile
+47-0llvm/test/CodeGen/SPIRV/extensions/SPV_NV_shader_atomic_fp16_vector/atomicrmw_faddfsub_vec_float16.ll
+45-0llvm/test/CodeGen/SPIRV/extensions/SPV_NV_shader_atomic_fp16_vector/atomicrmw_fminfmax_vec_float16.ll
+41-0llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
+3-2llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp
+3-1llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
+3-0llvm/lib/Target/SPIRV/SPIRVSymbolicOperands.td
+142-32 files not shown
+146-38 files

LLVM/project 4c50d83clang/test/Driver darwin-link-libcxx.cpp

Require darwin
DeltaFile
+3-0clang/test/Driver/darwin-link-libcxx.cpp
+3-01 files

LLVM/project 3ac8417clang/lib/Driver/ToolChains Darwin.cpp, clang/test/Driver darwin-link-libcxx.cpp experimental-library-flag.cpp

Reapply "[clang][Darwin] Prefer the toolchain-provided libc++.dylib if there i…"

This reverts commit 12a532cc430c3b89483ce9cc89bbfc7bea8541e5.
DeltaFile
+81-0clang/test/Driver/darwin-link-libcxx.cpp
+41-3clang/lib/Driver/ToolChains/Darwin.cpp
+15-0compiler-rt/cmake/config-ix.cmake
+5-3clang/test/Driver/experimental-library-flag.cpp
+2-2clang/test/Driver/darwin-header-search-libcxx.cpp
+0-0clang/test/Driver/Inputs/basic_darwin_toolchain_static/usr/lib/libc++experimental.a
+144-85 files not shown
+144-811 files

LLVM/project 9dc9c14.github CODEOWNERS

[NFC] Become CODEOWNER of AMDGPULowerBufferFatPointers (#167953)

DeltaFile
+3-0.github/CODEOWNERS
+3-01 files

LLVM/project 7470d72llvm/lib/Target/AArch64 AArch64TargetTransformInfo.cpp AArch64Subtarget.h, llvm/test/Transforms/LoopUnroll/AArch64 apple-unrolling.ll

[AArch64] Add isAppleMLike helper to check for M cores and aligned CPUs. (#170553)

Add a new isAppleMLike helper, that returns true if the core is part of
the Apple M core family or Apple A14 or later. Used to apply cost
decisions consistently to those groups of cores.

The function is now a single place to update when new cores are added.
It also makes sure we apply unrolling decisions for newer Apple cores to
Apple A17.

PR: https://github.com/llvm/llvm-project/pull/170553
DeltaFile
+2-201llvm/test/Transforms/LoopUnroll/AArch64/apple-unrolling.ll
+4-13llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+15-0llvm/lib/Target/AArch64/AArch64Subtarget.h
+1-10llvm/lib/Target/AArch64/AArch64Subtarget.cpp
+22-2244 files

LLVM/project 12a532cclang/lib/Driver/ToolChains Darwin.cpp, clang/test/Driver darwin-link-libcxx.cpp experimental-library-flag.cpp

Revert "[clang][Darwin] Prefer the toolchain-provided libc++.dylib if there i…"

This reverts commit 190b8d0b4f19e1c3d68c5d153ec7be71a9969192.
DeltaFile
+0-81clang/test/Driver/darwin-link-libcxx.cpp
+3-41clang/lib/Driver/ToolChains/Darwin.cpp
+0-15compiler-rt/cmake/config-ix.cmake
+3-5clang/test/Driver/experimental-library-flag.cpp
+2-2clang/test/Driver/darwin-header-search-libcxx.cpp
+0-0clang/test/Driver/Inputs/basic_darwin_toolchain_static/usr/lib/libc++experimental.a
+8-1445 files not shown
+8-14411 files

LLVM/project 03c3716flang/include/flang/Parser parse-tree.h, flang/lib/Semantics canonicalize-do.cpp check-omp-loop.cpp

[flang][OpenMP] Reject END DO on construct that crosses label-DO (#169714)

In a label-DO construct where two or more loops share the same
teminator, an OpenMP construct must enclose all the loops if an
end-directive is present. E.g.

```
  do 100 i = 1,10
!$omp do
    do 100 j = 1,10
    100 continue
!$omp end do    ! Error, but ok if this line is removed
```

Fixes https://github.com/llvm/llvm-project/issues/169536.
DeltaFile
+28-5flang/lib/Semantics/canonicalize-do.cpp
+19-0flang/lib/Semantics/check-omp-loop.cpp
+1-1flang/include/flang/Parser/parse-tree.h
+1-1flang/test/Parser/OpenMP/atomic-label-do.f90
+1-1flang/test/Parser/OpenMP/cross-label-do.f90
+1-0flang/test/Semantics/OpenMP/loop-association.f90
+51-86 files

LLVM/project d07af13llvm/lib/MC GOFFObjectWriter.cpp

Fix formatting
DeltaFile
+1-2llvm/lib/MC/GOFFObjectWriter.cpp
+1-21 files