Changes

Summary

  1. Fix buildbots after https://reviews.llvm.org/D115073. (details)
  2. [flang][runtime] Add ragged array runtime functions (details)
  3. [OpenMP] Disable libomptarget profiling by default if built via the "runtimes" setup (details)
  4. [InstCombine] add tests for div with select-of-constants divisor; NFC (details)
  5. [InstCombine] add tests for div/rem with 0 select arm; NFC (details)
  6. [InstCombine] try to fold rem with constant dividend and select-of-constants divisor (details)
  7. [NFC][OpenMP] Prepare amdgpu plugin for asynchronous implementation of target region launch (details)
Commit 220854a47bdc0c281dbaafb54411ec65e76212b3 by gclayton
Fix buildbots after https://reviews.llvm.org/D115073.
The file was modifiedlldb/unittests/Utility/DataEncoderTest.cpp (diff)
Commit 6116ff297f52c32fbe617c5dcea33c54c2c274ee by clementval
[flang][runtime] Add ragged array runtime functions

This patch adds the runtime function to allocate and
deallocate ragged arrays.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: klausler

Differential Revision: https://reviews.llvm.org/D114534

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
The file was addedflang/unittests/Runtime/Ragged.cpp
The file was addedflang/runtime/ragged.cpp
The file was addedflang/include/flang/Runtime/ragged.h
The file was modifiedflang/runtime/CMakeLists.txt (diff)
The file was modifiedflang/unittests/Runtime/CMakeLists.txt (diff)
Commit db32c4f45625dddc2c5cb683adf3d9cab7a9732f by martin
[OpenMP] Disable libomptarget profiling by default if built via the "runtimes" setup

In the "runtimes" setup, the runtime (e.g. OpenMP) can be built for
a target entirely different from the current host build (where LLVM
and Clang are built). If profiling is enabled, libomptarget links
against LLVMSupport (which only has been built for the host).

Thus, don't enable profiling by default in this setup.

This should allow relanding D113253.

Differential Revision: https://reviews.llvm.org/D114083
The file was modifiedopenmp/CMakeLists.txt (diff)
Commit cfde8a6c9da284ccd048fcbf38d4c2470d614d2c by spatel
[InstCombine] add tests for div with select-of-constants divisor; NFC

Similar patterns as tests for:
D115173
(and we might want to make a single patch for all of these).
The file was modifiedllvm/test/Transforms/InstCombine/div.ll (diff)
Commit 51d3cb0ab15de7acb7131b5f967cf7fc84def99e by spatel
[InstCombine] add tests for div/rem with 0 select arm; NFC

More coverage for D115173 and its div sibling. These are
existing transforms handled by simplifyDivRemOfSelectWithZeroOp().
The file was modifiedllvm/test/Transforms/InstCombine/div.ll (diff)
The file was modifiedllvm/test/Transforms/InstCombine/rem.ll (diff)
Commit f65be726ab50ff13ccafd2f134599edb33cb1e7e by spatel
[InstCombine] try to fold rem with constant dividend and select-of-constants divisor

We avoid this fold in the more general cases where we use `FoldOpIntoSelect`.
That's because -- unlike most binary opcodes -- 'rem' can't usually be
speculated with a variable divisor since it can have immediate UB. But in
the case where both arms of the select are constants, we can safely evaluate
both sides and eliminate 'rem' completely.

This should fix:
https://llvm.org/PR52102

The same optimization for 'div' is planned as a follow-up patch.

Differential Revision: https://reviews.llvm.org/D115173
The file was modifiedllvm/test/Transforms/InstCombine/rem.ll (diff)
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp (diff)
Commit d9b1d827d2e9ae135901b6eccf25a05ef49f38af by jonathanchesterfield
[NFC][OpenMP] Prepare amdgpu plugin for asynchronous implementation of target region launch

At present, amdgpu plugin merges both asynchronous and synchronous kernel launch implementations into a single synchronous version.
This patch prepares the plugin for asynchronous implementation by:
- Privatizing actual kernel launch code (valid in both cases) into an anonymous namespace base function

Actual separation of kernel launch code (async vs sync) is a following patch.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D115267
The file was modifiedopenmp/libomptarget/plugins/amdgpu/src/rtl.cpp (diff)