[AMDGPU] Validate forced lit64() on VOP3 instructions
Lit64 cannot be used with VOP3* but we did not validate it
in case it can be encoded as lit32, but forced with the
operand modifier.
[libc][stdlib] Use structure bindings instead of output params (#196169)
Refactored alloc_and_copy to return cpp::optional<AllocResult> instead
of using reference-to-pointer output parameters. The combination of char
**& parameters with array new/delete is known to trigger a segfault in
GCC 12's waccess GIMPLE pass.
The AllocResult struct holds the two allocated arrays (storage and
ownership). Call sites use structured bindings to unpack the result
after checking for nullopt.
Hopefully fixes the build failure in PR #195260 on the
libc-x86_64-debian-gcc-fullbuild-dbg builder.
Assisted-by: Automated tooling, human reviewed.
[mlir] Interface-ify updating starting positions on vector.transfer_* (#195186)
This commit adds methods to VectorTransferOpInterface that allow
transfer operations to be queried for whether their base memref (or
tensor) and permutation map can be updated in some particular way and
then for performing this update. This is part of a series of changes
designed to make passes like fold-memref-alias-ops more generic,
allowing downstream operations, like IREE's transfer_gather, to
participate in them without needing to duplicate patterns.
In order to test this new method, migrate FoldMemrefAliasOps to use
these methods to fold memref.subview, memref.expand_shape,and
memref.collapse_shape into tranfer_read and transfer_write.
AI note: the tranfer_read / transfer_write patterns, which are taken
from a previous PR, were written with Claude 4.5.
---------
Co-authored-by: Erick Ochoa Lopez <eochoalo at amd.com>
Co-authored-by: Erick Ochoa Lopez <erick.ochoalopez at amd.com>
nuageninit: modify the test to show the issue fixed inc316ec259011
Ensure the script used is invalid when parsed by libyaml which
highlight the issue revealed in PR295062
while at here validate the mode of the file is properly changed
PR: 295062
MFC After: 1 day
Reland "[LTO][LLD] Prevent invalid LTO libfunc transforms (#164916)" (#196177)
This reverts commit 24154a55d698a98e7b6d2aae1778b79f15ce5b09.
The issue that lead to this being reverted was subtle, but entirely
downstream. Note that by making LTO DCE more conservative, this patch
may uncover latent undefined references caused by build system issues.
emulators/dosbox-staging: add mt32emu support
Add port option MT32EMU which provides Roland MT-32 emulation support by using
mt32emu from the Munt project. Enable this option by default.
PR: 284635
devel/libmt32emu: New port: Emulate Roland MT-32, CM-32L and LAPC-I synthesiser modules
mt32emu is part of the Munt project. It represents a C/C++ library named
libmt32emu which allows to emulate (approximately) the Roland MT-32, CM-32L and
LAPC-I synthesiser modules.
WWW: https://munt.sourceforge.net
PR: 284634
Co-authored-by: Max Brazhnikov <makc at FreeBSD.org>
[reland] [lit] [compiler-rt] Add llvm-lit global command cache to speed up test config (#196152)
Re-lands #195888
Fixes two issues:
- `date -Ins` is not available on older macOS versions (I think
pre-15.4). This caused the new `test_cache` test to fail. Switched to
just using `date` + a sleep (with a comment explaining why). Even if the
sleep is too long/short, the test should still pass.
- `functools.cache` is not available on Python 3.8. I've moved the
`_memoize` helper out of TestRunner.py into util.py, and switched to it
instead. I had to make a small change to the memoize helper to support
arbitrary args/kwargs.
[clang][ssaf] Add `clang-ssaf-analyzer` (#196124)
This patch introduces `clang-ssaf-analyzer`, a new SSAF tool that runs whole-program analyses over an `LUSummary` and writes the resulting `WPASuite` to an output file.
[Clang] Produce deterministic hash for anonymous namespaces. (#194542)
This change adds a path substitution for the main module file during
anonymous namespace hash generation using the prefix map specified by
-fmacro-prefix-map option. That ensures deterministic symbol mangling
for reproducible builds.
---------
Co-authored-by: Corentin Jabot <corentinjabot at gmail.com>
[AMDGPU] Validate forced lit64() on VOP3 instructions
Lit64 cannot be used with VOP3* but we did not validate it
in case it can be encoded as lit32, but forced with the
operand modifier.
kobj: Use M_WAITOK in kobj_init
Blocking allocation is safe in all of the current callers of kobj_init
(most of them do a M_WAITOK malloc of the structure passed as the
first argument to kobj_init just before calling it). kobj_init
doesn't return an error code but instead panics if the nested malloc
in kobj_class_compile1 fails, so using M_WAITOK here is more robust.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D56625
mlx5en: destroy TIR before DEK during TLS RX teardown
Reorder the TLS RX teardown sequence so the TIR is destroyed before
the DEK. DESTROY_TIR for a TLS-enabled TIR issues a TRA RX fence
that drains all in-flight packets from the crypto pipeline. If the
DEK is destroyed first, packets still in flight hit a TPT encryption
error (vendor syndrome 0x55) because the key they reference is
already gone.
Reviewed by: kib
Sponsored by: Nvidia networking
MFC after: 1 week
editors/nano: update to 9.0
Improvements:
- With M-< and M-> the viewport can be scrolled sideways.
- When the cursor nears the edge, all lines are scrolled sideways.
- M-Left, M-Right, M-Up, and M-Down have become rebindable.
- Immediately stopping a recording retains the existing macro.
- Clicking in the scrollbar crudely navigates in the buffer.
[flang][FIRToMemRef] lower `fir.coordinate_of` on static-extent arrays to indexed memref (#195404)
`fir.coordinate_of` on static array components (e.g. A%v(i)) was falling
back to a rank-0 scalar memref, losing index information and blocking
saffine parallelization. Lower these to a properly-shaped memref<dims x
T> with explicit indices. Dynamic arrays and struct-element arrays keep
the existing scalar fallback.
[clang][modules] Fix UAF in `InProcessModuleCache` (#196117)
Writing to the module cache would invalidate the read buffer. If the
timing works out just right, this is a use-after-free bug. This PR
prevents that situation by using two buffers in the module cache entry,
and adds a unit test that would previously fail under address sanitizer.
[OpenMP][NFC] Simplify rounding operations (#196155)
Summary:
There were a lot of these cases that did rounding up / down. Make
helpers for them and simplify.
[CIR][OpenMP][MLIR] Allow passing of vfs::FileSystem through ModuleTranslation (#195451)
This change optionally allows passing a pointer to a vfs::FileSystem
through ModuleTranslation down to the OpenMPToLLVMTranslation. This will
prevent IO sandbox errors when enabling OpenMP target regions in CIR,
since accessing the file system must go through the proper API.
Assisted-by: Cursor / claude-4.6-opus-high