[lldb] Fix UbSan decorator (#177964)
the ubsan decorator previously assumes the platform is macOS.
macOS has an extra underscore in symbols names match two or more.
uses the llvm-nm that is built instead of the system's nm.
[MLIR][OpenMP] Simplify OpenMP device codegen
After removing host operations from the device MLIR module, it is no longer
necessary to provide special codegen logic to prevent these operations from
causing compiler crashes or miscompilations.
This patch removes these now unnecessary code paths to simplify codegen logic.
Some MLIR tests are now replaced with Flang tests, since the responsibility of
dealing with host operations has been moved earlier in the compilation flow.
MLIR tests holding target device modules are updated to no longer include now
unsupported host operations.
mktool: Update to 1.5.3.
This release switches to using openssl on appropriate platforms to be
consistent with pkgsrc norms. Users may still build using the default features
to get a more portable binary that bundles the webpki-roots and provide a tool
that is useful for bootstrapping.
Main change since 1.4.2 is that 'mktool fetch' now uses temporary files and
atomic renames, and is the only fetch tool for pkgsrc that currently avoids
checksum mismatches when pbulk or bob start simultaneous builds that use the
same distfile.
Tested in a full from-scratch bulk build.
[Flang][OpenMP] Minimize host ops remaining in device compilation
This patch updates the function filtering OpenMP pass intended to remove host
functions from the MLIR module created by Flang lowering when targeting an
OpenMP target device.
Host functions holding target regions must be kept, so that the target regions
within them can be translated for the device. The issue is that non-target
operations inside these functions cannot be discarded because some of them hold
information that is also relevant during target device codegen. Specifically,
mapping information resides outside of `omp.target` regions.
This patch updates the previous behavior where all host operations were
preserved to then ignore all of those that are not actually needed by target
device codegen. This, in practice, means only keeping target regions and mapping
information needed by the device. Arguments for some of these remaining
operations are replaced by placeholder allocations and `fir.undefined`, since
they are only actually defined inside of the target regions themselves.
[3 lines not shown]
[mlir] Fix integer overflow in ShapedType::getNumElements and `makeCanonicalStridedLayoutExpr` (#178395)
Add to `ShapedTypeInterface` a new `tryGetNumElements()` API which
returns `std::optional<int64_t>` - returns `std::nullopt` on overflow
instead of UB, using `llvm::checkedMul` for proper overflow detection.
`getNumElements()` now uses this new API to assert on overflow.
Also fix `AffineExpr` canonicalization to avoid crashing on overflow
using `llvm::checkedMul`.
Fixes #178362
Fixes #177816
---------
Co-authored-by: Claude Opus 4.5 <noreply at anthropic.com>