SuccessChanges

Summary

  1. [llvm-libtool-darwin] Use Optional operator overloads. NFC (details)
  2. Refactor mlir-opt setup in a new helper function (NFC) (details)
  3. [GlobalISel] Enable copy-propagation in post-legalizer combiner. (details)
  4. Slightly relax the regex on lld version in test (NFC) (details)
  5. [JITLink][MachO] Use correct symbol scope when N_PEXT is set and N_EXT unset. (details)
  6. [libomptarget] Implement host plugin for amdgpu (details)
Commit 93c761f5e5b05c8ee54062f43d9c34bb75a0c2bb by smeenai
[llvm-libtool-darwin] Use Optional operator overloads. NFC

Use operator bool instead of hasValue and operator* instead of getValue
to simplify the code slightly.
The file was modifiedllvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
Commit 54ce3443149ce3d1e743a0b1f60ff08136fca843 by joker.eph
Refactor mlir-opt setup in a new helper function (NFC)

This will help refactoring some of the tools to prepare for the explicit registration of
Dialects.

Differential Revision: https://reviews.llvm.org/D86023
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
The file was modifiedmlir/lib/Support/MlirOptMain.cpp
The file was modifiedmlir/include/mlir/Support/MlirOptMain.h
The file was modifiedmlir/examples/standalone/standalone-opt/standalone-opt.cpp
Commit 7006bb69efb04f32e0a666e8a74f85d7fa745981 by Amara Emerson
[GlobalISel] Enable copy-propagation in post-legalizer combiner.

This cleans up copies that the legalizer or other combines leave around. They
can occasionally end up escaping as moves.

Differential Revision: https://reviews.llvm.org/D85964
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-copy-prop.mir
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/combine-sext-trunc-sextload.mir
The file was modifiedllvm/lib/Target/AArch64/AArch64Combine.td
Commit 22cbe40fa99795766f352c08a7c0748704c9d2d5 by joker.eph
Slightly relax the regex on lld version in test (NFC)

This makes the test introduced in 537f5483fe4e more robust with respect
to the actual version number. The previous regex restricted the version
to start with a leading `1` which was overly restrictive.
The file was modifiedlld/test/MachO/lc-build-version.s
Commit a49b05bb61f73eee3ebfa6c985c1d19356d383b5 by Lang Hames
[JITLink][MachO] Use correct symbol scope when N_PEXT is set and N_EXT unset.

MachOLinkGraphBuilder has been treating these as hidden, but they should be
treated as local.

Symbols with N_PEXT set and N_EXT unset are produced when hidden symbols are
run through 'ld -r' without passing -keep_private_externs. They will show up
under 'nm -m' as "was private extern", hence the name of the test cases.

Testcase commited as relocatable object to ensure that the test suite doesn't
depend on having 'ld -r' available.
The file was modifiedllvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp
The file was addedllvm/test/ExecutionEngine/JITLink/X86/Inputs/MachO_x86-64_was_private_extern.o
The file was addedllvm/test/ExecutionEngine/JITLink/X86/MachO_x86-64_was_private_extern.test
Commit d0b312955f12beba5b03c8a524a8456cb4174bd7 by jonchesterfield
[libomptarget] Implement host plugin for amdgpu

[libomptarget] Implement host plugin for amdgpu

Replacement for D71384. Primary difference is inlining the dependency on atmi
followed by extensive simplification and bugfixes. This is the latest version
from https://github.com/ROCm-Developer-Tools/amd-llvm-project/tree/aomp12 with
minor patches and a rename from hsa to amdgpu, on the basis that this can't be
used by other implementations of hsa without additional work.

This will not build unless the ROCM_DIR variable is passed so won't break other
builds. That variable is used to locate two amdgpu specific libraries that ship
as part of rocm:
libhsakmt at https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface
libhsa-runtime64 at https://github.com/RadeonOpenCompute/ROCR-Runtime
These libraries build from source. The build scripts in those repos are for
shared libraries, but can be adapted to statically link both into this plugin.

There are caveats.
- This works well enough to run various tests and benchmarks, and will be used
  to support the current clang bring up
- It is adequately thread safe for the above but there will be races remaining
- It is not stylistically correct for llvm, though has had clang-format run
- It has suboptimal memory management and locking strategies
- The debug printing / error handling is inconsistent

I would like to contribute this pretty much as-is and then improve it in-tree.
This would be advantagous because the aomp12 branch that was in use for fixing
this codebase has just been joined with the amd internal rocm dev process.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D85742
The file was addedopenmp/libomptarget/plugins/amdgpu/impl/msgpack.def
The file was addedopenmp/libomptarget/plugins/amdgpu/impl/data.h
The file was addedopenmp/libomptarget/plugins/amdgpu/CMakeLists.txt
The file was addedopenmp/libomptarget/plugins/amdgpu/impl/atmi_kl.h
The file was addedopenmp/libomptarget/plugins/amdgpu/impl/machine.cpp
The file was addedopenmp/libomptarget/plugins/amdgpu/impl/atmi_interop_hsa.cpp
The file was addedopenmp/libomptarget/plugins/amdgpu/impl/msgpack.cpp
The file was addedopenmp/libomptarget/plugins/amdgpu/impl/system.cpp
The file was addedopenmp/libomptarget/plugins/amdgpu/impl/machine.h
The file was addedopenmp/libomptarget/plugins/amdgpu/impl/atmi_interop_hsa.h
The file was addedopenmp/libomptarget/plugins/amdgpu/impl/msgpack.h
The file was addedopenmp/libomptarget/plugins/amdgpu/src/rtl.cpp
The file was addedopenmp/libomptarget/plugins/amdgpu/impl/atmi.cpp
The file was addedopenmp/libomptarget/plugins/amdgpu/impl/data.cpp
The file was addedopenmp/libomptarget/plugins/amdgpu/impl/atmi.h
The file was modifiedopenmp/libomptarget/plugins/CMakeLists.txt
The file was addedopenmp/libomptarget/plugins/amdgpu/impl/internal.h
The file was addedopenmp/libomptarget/plugins/amdgpu/impl/utils.cpp
The file was modifiedopenmp/libomptarget/src/rtl.cpp
The file was addedopenmp/libomptarget/plugins/amdgpu/impl/rt.h
The file was addedopenmp/libomptarget/plugins/amdgpu/impl/atmi_runtime.h