Changes

Summary

  1. [scudo] Add initialization for TSDRegistrySharedT (details)
  2. [ORC] Introduce C API for adding object buffers directly to an object layer. (details)
  3. [OpenMP] Fix non-determinism in clang copyin codegen (details)
  4. [ORC] Add missing library dependency on IRReader. (details)
  5. [BPF][Test] Disable codegen test on AIX (details)
  6. [SelectionDAG][Mips][PowerPC][RISCV][WebAssembly] Teach computeKnownBits/ComputeNumSignBits about atomics (details)
  7. [OpenMP][NFC] Refactor Clang OpenMP tests using update_cc_test_checks (details)
Commit 6fac34251d015b2f196dfb46dd015a914b8d6340 by kostyak
[scudo] Add initialization for TSDRegistrySharedT

Fixes compilation on Android which has a TSDSharedRegistry object in the config.

Reviewed By: cryptoad, vitalybuka

Differential Revision: https://reviews.llvm.org/D101951
The file was modifiedcompiler-rt/lib/scudo/standalone/tsd_shared.h
Commit 7b73cd684a8d5fb44d34064200f10e2723085c33 by Lang Hames
[ORC] Introduce C API for adding object buffers directly to an object layer.

This can be useful for clients constructing custom JIT stacks: If the C API
for your custom stack exposes API to obtain a reference to an object layer
(e.g. LLVMOrcLLJITGetObjLinkingLayer) then the newly added
LLVMOrcObjectLayerAddObjectFile and LLVMOrcObjectLayerAddObjectFileWithRT
functions can be used to add objects directly to that layer.
The file was modifiedllvm/include/llvm-c/Orc.h
The file was modifiedllvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp
Commit f97b843d8819f824dcc1b6afa746ce9a7a386db3 by georgakoudis1
[OpenMP] Fix non-determinism in clang copyin codegen

Codegen for OpeMP copyin has non-deterministic IR output due to the unspecified evaluation order in a codegen conditional branch, which makes automatic test generation unreliable. This patch refactors codegen code to avoid this non-determinism.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D101952
The file was modifiedclang/lib/CodeGen/CGStmtOpenMP.cpp
Commit abdd14a2d785226fde54ae81d897fdf4f2fec946 by Lang Hames
[ORC] Add missing library dependency on IRReader.
The file was modifiedllvm/unittests/ExecutionEngine/Orc/CMakeLists.txt
Commit 6bdfcb165e66a3f59fcf8e51ea0f2ecc0e3a32d5 by Jinsong Ji
[BPF][Test] Disable codegen test on AIX

https://reviews.llvm.org/D101194 changed the default getMultiarchTriple in toolchain.
So -march=bpf on AIX will get triple of bpf-ibm-aix now,
this is unexpected and causing test failures.

BPF on AIX is not supported (yet), disable the codegen test on AIX in lit cfg.

Reviewed By: yonghong-song

Differential Revision: https://reviews.llvm.org/D101866
The file was modifiedllvm/test/CodeGen/BPF/lit.local.cfg
Commit 6c80361b8474535852afb2f7201370fb5f410091 by jrtc27
[SelectionDAG][Mips][PowerPC][RISCV][WebAssembly] Teach computeKnownBits/ComputeNumSignBits about atomics

Unlike normal loads these don't have an extension field, but we know
from TargetLowering whether these are sign-extending or zero-extending,
and so can optimise away unnecessary extensions.

This was noticed on RISC-V, where sign extensions in the calling
convention would result in unnecessary explicit extension instructions,
but this also fixes some Mips inefficiencies. PowerPC sees churn in the
tests as all the zero extensions are only for promoting 32-bit to
64-bit, but these zero extensions are still not optimised away as they
should be, likely due to i32 being a legal type.

This also simplifies the WebAssembly code somewhat, which currently
works around the lack of target-independent combines with some ugly
patterns that break once they're optimised away.

Re-landed with correct handling in ComputeNumSignBits for Tmp == VTBits,
where zero-extending atomics were incorrectly returning 0 rather than
the (slightly confusing) required return value of 1.

Reviewed By: RKSimon, atanasyan

Differential Revision: https://reviews.llvm.org/D101342
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrAtomics.td
The file was modifiedllvm/test/CodeGen/PowerPC/atomics-i8-ldst.ll
The file was modifiedllvm/test/CodeGen/PowerPC/atomics-i32-ldst.ll
The file was modifiedllvm/test/CodeGen/PowerPC/atomics-i64-ldst.ll
The file was modifiedllvm/test/CodeGen/RISCV/atomic-signext.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modifiedllvm/test/CodeGen/PowerPC/atomics-i16-ldst.ll
The file was modifiedllvm/test/CodeGen/Mips/atomic.ll
Commit 207b08a9130bd8167851f9e053f5d67bfd1969c8 by georgakoudis1
[OpenMP][NFC] Refactor Clang OpenMP tests using update_cc_test_checks

This patch refactors a subset of Clang OpenMP tests, generating checklines using the update_cc_test_checks script. This refactoring facilitates updating the Clang OpenMP code generation codebase by automating test generation.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D101849
The file was modifiedclang/test/OpenMP/distribute_simd_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_for_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_for_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/sections_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_collapse_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_generic_mode_codegen.cpp
The file was modifiedclang/test/OpenMP/declare_target_codegen_globalization.cpp
The file was modifiedclang/test/OpenMP/teams_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_teams_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_if_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_proc_bind_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_private_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_master_taskloop_simd_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_if_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/for_reduction_codegen_UDR.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_collapse_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_codegen.cpp
The file was modifiedclang/test/OpenMP/single_private_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_lambda_capturing.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_for_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/for_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_private_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_num_threads_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_collapse_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_simd_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_copyin_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/single_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_proc_bind_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/debug-info-openmp-array.cpp
The file was modifiedclang/test/OpenMP/for_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_if_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/task_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_dist_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/for_private_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_multi_target_parallel_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_parallel_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_collapse_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_codegen.cpp
The file was modifiedclang/test/OpenMP/sections_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_data_sharing.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_dist_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/tile_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_map_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_if_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_parallel_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_master_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_simd_private_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_sections_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_for_linear_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_parallel_reduction_codegen_tbaa_PR46146.cpp
The file was modifiedclang/test/OpenMP/sections_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_master_codegen.cpp
The file was modifiedclang/test/OpenMP/task_in_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/for_linear_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_private_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_copyin_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_collapse_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_dist_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_collapse_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_parallel_num_threads_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_for_debug_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_private_codegen.cpp
The file was modifiedclang/test/OpenMP/debug-info-complex-byval.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_for_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_if_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_num_teams_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_master_taskloop_codegen.cpp
The file was modifiedclang/test/OpenMP/task_if_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_nested_parallel_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_master_taskloop_simd_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/target_map_codegen_03.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/master_taskloop_in_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_private_codegen.cpp
The file was modifiedclang/test/OpenMP/taskloop_in_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_proc_bind_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_debug_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_private_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_for_lastprivate_conditional.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_codegen.cpp
The file was modifiedclang/test/OpenMP/ordered_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_private_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_num_threads_codegen.cpp
The file was modifiedclang/test/OpenMP/master_taskloop_simd_in_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_teams_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/target_codegen_global_capture.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_codegen.cpp
The file was modifiedclang/test/OpenMP/cancellation_point_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_private_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_order_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_private_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_private_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_private_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_collapse_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_teams_distribute_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_simd_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_if_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/taskloop_simd_in_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/single_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_if_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_teams_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_thread_limit_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_num_threads_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_distribute_parallel_generic_mode_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_dist_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/cancel_codegen.cpp
The file was modifiedclang/test/OpenMP/for_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_allocate_codegen.cpp
The file was modifiedclang/test/OpenMP/for_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_for_simd_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_if_codegen.cpp
The file was modifiedclang/test/OpenMP/vla_crash.c
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_num_threads_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_simd_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_codegen.cpp
The file was modifiedclang/test/OpenMP/sections_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_simd_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_private_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_parallel_for_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_sections_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_dist_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_master_taskloop_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/sections_private_codegen.cpp
The file was modifiedclang/test/OpenMP/openmp_win_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_codegen.cpp