[lldb][AIX] Added PlatformAIX plugin (#121273)
This PR is in reference to porting LLDB on AIX.
Link to discussions on llvm discourse and github:
1. https://discourse.llvm.org/t/port-lldb-to-ibm-aix/80640
2. https://github.com/llvm/llvm-project/issues/101657
The complete changes for porting are present in this draft PR:
https://github.com/llvm/llvm-project/pull/102601
Details:
--------------
Adding PlatformAIX plugin for a basic lldb build support. The 1st commit
is the original version as in the draft PR which is a PlatformLinux
copy. I have removed some of the code in the next commits.
Please let me know all the other changes required to push the
PlatformAIX changes and avoid any duplication.
[MLIR][ROCDL] Fix accessedOperands for Rocdl_RawPtrBufferLoadOp (#127983)
`getAccessedOperands` should return all accessed pointer operands. In
the case for BufferLoads this is the source buffer and not the result.
[MLIR][ROCDL] Add op for raw.ptr.buffer.load.lds (#127988)
This PR adds raw.ptr.buffer.load.lds op to ROCDL to expose buffer loads
directly to LDS.
The op is converted to the corresponding intrinsic call during the
translation from MLIR to LLVM IR.
[mlir][Parser] Fix crash when resolving invalid operands with missing location (#128163)
When `resolveOperands` reports an error and no valid `SMLoc` was
provided, report the error at the beginning of the op instead of
crashing.
```
Assert `Ptr >= BufStart && Ptr <= Buffer->getBufferEnd()' in llvm/lib/Support/SourceMgr.cpp:llvm::SourceMgr::SrcBuffer::getLineNumberSpecialized failed
```
E.g., this is currently the case when parsing the following op with a
type but without any operands:
```
let assemblyFormat = "$str (`,` $args^)? attr-dict (`:` type($args)^)?";
```
Reported error (with this PR):
```
within split at mlir/test/IR/invalid-ops.mlir:122 offset :4:1: error: custom op 'test.variadic_args_types_split' number of operands and types do not match: got 0 operands and 1 types
[13 lines not shown]
[Flang][OpenMP] Allow host evaluation of loop bounds for distribute
This patch adds `target teams distribute [simd]` and equivalent construct nests
to the list of cases where loop bounds can be evaluated in the host, as they
represent Generic-SPMD kernels for which the trip count must also be evaluated
in advance to the kernel call.
[MLIR][OpenMP] Support target SPMD
This patch implements MLIR to LLVM IR translation of host-evaluated loop
bounds, completing initial support for `target teams distribute parallel do
[simd]` and `target teams distribute [simd]`.
[OpenMPIRBuilder] Split calculation of canonical loop trip count, NFC
This patch splits off the calculation of canonical loop trip counts from the
creation of canonical loops. This makes it possible to reuse this logic to, for
instance, populate the `__tgt_target_kernel` runtime call for SPMD kernels.
This feature is used to simplify one of the existing OpenMPIRBuilder tests.
[TTI][AArch64] Detect OperandInfo from scalable splats. (#122469)
Pulled out of #122236, this allows Splats constants to be recognized by
getOperandInfo, allowing "better" costs for instructions like divides by
constants to be produced (which are expanded into mul+add+shift). Some
of the costs are not very accurate yet, but the comparison of scalar vs
fixed-width vs scalable for the same div can become more accurate,
especially with patches like #122236.
[MLIR][NVVM] Add Ops for tcgen05 cp and shift (#127798)
PR #127669 adds intrinsics for tcgen05.cp/shift.
This PR adds NVVM Dialect Ops for the same.
lit tests are added to verify the lowering
to the intrinsics.
Signed-off-by: Durgadoss R <durgadossr at nvidia.com>
[Flang][OpenMP] Allow host evaluation of loop bounds for distribute
This patch adds `target teams distribute [simd]` and equivalent construct nests
to the list of cases where loop bounds can be evaluated in the host, as they
represent Generic-SPMD kernels for which the trip count must also be evaluated
in advance to the kernel call.
[MLIR][OpenMP] Support target SPMD
This patch implements MLIR to LLVM IR translation of host-evaluated loop
bounds, completing initial support for `target teams distribute parallel do
[simd]` and `target teams distribute [simd]`.
[OpenMPIRBuilder] Split calculation of canonical loop trip count, NFC
This patch splits off the calculation of canonical loop trip counts from the
creation of canonical loops. This makes it possible to reuse this logic to, for
instance, populate the `__tgt_target_kernel` runtime call for SPMD kernels.
This feature is used to simplify one of the existing OpenMPIRBuilder tests.
[MLIR][OpenMP] Host lowering of distribute-parallel-do/for
This patch adds support for translating composite `omp.parallel` +
`omp.distribute` + `omp.wsloop` loops to LLVM IR on the host. This is done by
passing an updated `WorksharingLoopType` to the call to `applyWorkshareLoop`
associated to the lowering of the `omp.wsloop` operation, so that
`__kmpc_dist_for_static_init` is called at runtime in place of
`__kmpc_for_static_init`.
Existing translation rules take care of creating a parallel region to hold the
workshared and workdistributed loop.
[OpenMPIRBuilder] Add support for distribute-parallel-for/do constructs
This patch adds codegen for `kmpc_dist_for_static_init` runtime calls, used to
support worksharing a single loop across teams and threads. This can be used to
implement `distribute parallel for/do` support.
[MLIR][OpenMP] Host lowering of standalone distribute
This patch adds MLIR to LLVM IR translation support for standalone
`omp.distribute` operations, as well as `distribute simd` through ignoring
SIMD information (similarly to `do/for simd`).
Co-authored-by: Dominik Adamski <dominik.adamski at amd.com>