[flang][OpenMP] Lower target in_reduction (#199967)
This patch carries `in_reduction` through `omp.target` for host
execution.
The lowering looks up the task-reduction private storage with
`__kmpc_task_reduction_get_th_data` and binds the target region argument
to that private pointer. This makes uses inside the target region refer
to the task-private reduction storage instead of continuing to use the
original variable.
This also fixes the `omp::TargetOp::build(TargetOperands)` path so
`in_reduction` operands are preserved instead of being dropped.
On the Flang side, `target in_reduction` list items are added to the
target map entries when needed, giving the translation a matching mapped
value to rewrite.
### Stack / review order
[21 lines not shown]
[TableGen] V is always a TypedInit, so use cast (#209208)
No need to dyn_cast. It is functionally impossible for V to not be a
TypedInit at this point.
/etc/rc.d/unbound: Fix order of migration and trust anchor setup.
Add some comments explaining the order, and make sure we propagate
various failures back to the caller.
Based on a patch by Erik LaBine.
PR bin/60447: unbound rc.d fails on fresh install before
configuration migration can run
[lit] Remove external shell tests for shtest-format
fail.txt was redundant with an internal shell test.
Move the other tests into the internal shell directory as they are not
redundant.
Reviewers: arichardson, jh7370, hnrklssn, ilovepi
Pull Request: https://github.com/llvm/llvm-project/pull/209552
[compiler-rt] Drop support for using the external shell
The lit external shell is going to be removed soon, so drop support for
using it to run the compiler-rt tests.
Reviewers: petrhosek, ilovepi, thurstond
Pull Request: https://github.com/llvm/llvm-project/pull/209626
[clang-tools-extra] Drop option to use external shell
The external shell is going to be removed from lit soon, so drop the
option to enable using it.
Reviewers: petrhosek, compnerd, ilovepi
Pull Request: https://github.com/llvm/llvm-project/pull/209625
[Flang] Drop option to use external shell for testing
The external shell will be deleted soon, so drop the option to enable
the use of it for testing flang/flang-rt.
Reviewers: petrhosek, clementval, ilovepi
Pull Request: https://github.com/llvm/llvm-project/pull/209624
[lit] Drop explicitly setting execute_external=False
That parameter will be going away soon.
Reviewers: jh7370, arichardson, hnrklssn, ilovepi
Pull Request: https://github.com/llvm/llvm-project/pull/209570
[LLVM] Drop ability to use external shell
The external shell is getting removed soon, so drop the ability to force
the use of it for running LLVM tests.
Reviewers: ilovepi, petrhosek, arichardson
Pull Request: https://github.com/llvm/llvm-project/pull/209569
[lld] Remove ability to use the external shell
The external shell is going to get removed soon, so remove the ability
to force the use of it for lld tests.
Reviewers: ilovepi, MaskRay, petrhosek
Pull Request: https://github.com/llvm/llvm-project/pull/209568
Relocate migrated container origins out of legacy .ix-virt
## Problem
Incus containers are ZFS clones of an image snapshot. The incus->container auto-migration relocated each container from `<pool>/.ix-virt/containers/<name>` to `<pool>/.truenas_containers/containers/<name>` with a bare `zfs rename` and did nothing else. A `zfs rename` does not change a clone's `origin`, so a migrated container stayed a clone of a snapshot still living inside `.ix-virt`. `.ix-virt` was visible in the UI and not delete-guarded, so deleting it recursively destroyed those origin snapshots and cascaded into the dependent migrated clones — silently destroying migrated containers.
## Solution
Relocate each container's origin image dataset out of `.ix-virt` before renaming the container, so no migrated container depends on anything under `.ix-virt`.
- **Shared relocation helper** — `container.relocate_container_origin` reads a container's live `origin`; if it points at an image under `.ix-virt/images` or `.ix-virt/deleted/images`, it renames that image dataset into the native `.truenas_containers/images/` tree, tags it `truenas:origin=incus-migration`, and sets `canmount=noauto`. All fan-out clones auto-repoint on the rename; an origin already outside `.ix-virt` is left alone; a relocation failure leaves the container wholly inside `.ix-virt` (best-effort, skip).
- **Migration path** — the incus->container migration calls the helper immediately before renaming each container, and skips any container whose base image cannot be relocated.
- **Repair migration** — new `0020_repair_incus_clone_origins` runs the same relocation over existing `container.container` rows for systems that already ran the old migration.
- **Delete guard** — `.truenas_containers` is added to `INTERNAL_PATHS` so it cannot be deleted out from under running containers; the plugin's own snapshot/clone/destroy calls that touch it now pass `bypass=True`.
- **Image garbage collection** — on container delete, a relocated origin image is destroyed once its last clone is gone, keyed on the `truenas:origin` tag so native image-cache datasets are never reaped.
- **Safer deletion** — `do_delete` destroys the dataset first (recursively, matching the apps stack, so a container that has snapshots is deletable) and removes the database and libvirt records only once the dataset is confirmed gone, so a failed destroy never orphans the dataset with no row pointing at it; an already-missing dataset is tolerated so a container whose data was lost to the old cascade can still be removed cleanly.
- **Force delete** — deleting a running container is now refused unless `force=True`, which stops the container first, mirroring the VM delete flow.
[flang][OpenMP] Lower target in_reduction
Enable host lowering for target in_reduction in Flang and MLIR OpenMP
translation.
Model target in_reduction through the matching map entry, force
address-preserving implicit mapping for Flang in_reduction list items, and emit
the host-side task-reduction lookup with __kmpc_task_reduction_get_th_data. The
runtime entry point takes and returns a generic, default-address-space pointer,
so normalize a non-default-address-space captured pointer to the generic address
space before the call and cast the returned private pointer back to the map
block argument's address space, mirroring the in_reduction handling on
omp.taskloop. On the target device, in_reduction is handled as a regular
map(tofrom) variable. The byref modifier, two-argument initializers, cleanup
regions, and the remaining Flang COMMON/EQUIVALENCE/privatized-variable cases
continue to be diagnosed.
Add Flang lowering, MLIR verifier/translation, and LLVM IR tests for the
supported host path, including a non-default-address-space case, and the
remaining unsupported cases.