[MachineSink] Prevent attempts to sink-and-fold into the same instruction more than once (#188048)
When sinking an instruction, we check if the destination instruction can
fold the source instruction into its address mode. If the destination
instruction contains more than one use of the register being sunk, we
won't be able to remove the original instruction, so we should not
attempt to sink.
This also prevents a compiler crash when the destination instruction is
deleted after the first sink-and-fold, and we attempt to sink-and-fold
into it again.
Fixes https://github.com/llvm/llvm-project/issues/187785
squid6: security fixes
Backport fixes for:
SQUID-2026:1 Denial of Service in ICP Request handling (CVE-2026-33526)
SQUID-2026:2 Denial of Service in ICP Request handling (CVE-2026-32748)
SQUID-2026:3 Out of Bounds Read in ICP message handling (CVE-2026-33515)
[MLIR][OpenMP] Unify device shared memory logic
This patch creates a utils library for the OpenMP dialect with functions
used by MLIR to LLVM IR translation as well as the stack-to-shared pass
to determine which allocations must use local stack memory or device
shared memory.
[MLIR][OpenMP][OMPIRBuilder] Improve shared memory checks
This patch refines checks to decide whether to use device shared memory or
regular stack allocations. In particular, it adds support for parallel regions
residing on standalone target device functions.
The changes are:
- Shared memory is introduced for `omp.target` implicit allocations, such as
those related to privatization and mapping, as long as they are shared across
threads in a nested parallel region.
- Standalone target device functions are interpreted as being part of a Generic
kernel, since the fact that they are present in the module after filtering
means they must be reachable from a target region.
- Prevent allocations whose only shared uses inside of an `omp.parallel` region
are as part of a `private` clause from being moved to device shared memory.