[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
[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
[lldb] Add Policy infrastructure (#195762)
Add a generic thread-local policy stack and a Policy struct that
describes what view of the process a thread should see (private reality
vs public illusion) and what operations it is allowed to perform.
This is the infrastructure for replacing ad-hoc host thread identity
checks (CurrentThreadIsPrivateStateThread, IsOnThread, etc.) with a
unified, composable mechanism. No behavioral changes yet -- adoption
will follow in subsequent patches.
rdar://176223894
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
Adding the Formal Semantics Working Group to regular syncs. (#196154)
Adding the Formal Semantics Working Group to regular syncs.
The meeting notes google document also includes the meeting link, meeting times (timezones) and link to RFC and discord channel.
Update to version 9.2.449.
Changes:
- patch 9.2.0449: Make proto fails in non GTK builds
- patch 9.2.0448: Vim9: dangling cmdline pointer after skip_expr_cctx()
- patch 9.2.0447: cindent does not ignore comments
- patch 9.2.0446: runtime(netrw): off-by-one bug in s:NetrwUnMarkFile()
- patch 9.2.0445: win_fix_scroll() called before win_comp_pos() in command_height()
- patch 9.2.0444: Cannot set 'path' option via modeline
- patch 9.2.0443: GUI: cancelling save dialog overwrites or discards unnamed buffer
- patch 9.2.0442: completion: i_CTRL-X_CTRL-V doesn't use dict from customlist
- runtime(autopkgtest): update syntax script
- Fix wrong comment in getchar.c
- patch 9.2.0441: statusline: click handler not called on multi-line statusline
- patch 9.2.0440: MS-Windows: cursor flicker during update_screen()
- patch 9.2.0439: completion: info popup not removed in cmdline mode
- patch 9.2.0438: tests: test_plugin_termdebug is flaky
- runtime(doc): Tweak documentation style
- Fix a few more typos
[68 lines not shown]
[LoopPeel] prevent estimated trip count overflow before peel (#195610)
`if (*EstimatedTripCount + AlreadyPeeled <= MaxPeelCount)` case in
`LoopPeel` can have a possible overflow with the `EstimatedTripCount`
value, which causes a hang with `opt`. Added
`llvm::checkedAddUnsigned()` to prevent this, along with a new
regression from the IR reproducer of #173169.
[AArch64][GlobalISel] Clean up and extend BF16 tests. NFC (#196175)
This attempts to fill in the gap between the different bf16 test files,
making
sure they all contain the same tests.
[clang] correctly handle +/- features when matching modules (#195743)
By sorting and then comparing, we made +sse2 -sse2 equal to
-sse2 +sse2, where the former has sse2 disabled, and the latter
enabled. I verified this is actually the case by compiling the
following:
```
#ifdef __SSE2__
#error X
#endif
```
nuageinit: only parse user_data as yaml when necessary
This fixes a regression introduced in cae280931c9e which prevents
user_data as a shell script to be used
PR: 295062
Reported by: Ross McKelvie <ross at exitzero.uk>
MFC After: 1 day
[SPIRV] Support `Volatile` memory semantics operand in atomic load/store (#195978)
The Vulkan memory model supports the `Volatile` memory semantics being
used with atomic operations. This patch adds the support to the SPIR-V
backend.
When the memory model is OpenCL, the `Volatile` memory semantics is not
supported. In this case, we ignore it and emit a regular `OpAtomicLoad`
or `OpAtomicStore` instruction. It should be safe, because the atomic
operations aren't eliminated anyway.
Assisted-by: Claude Opus 4.6 <noreply at anthropic.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.
feat: acpi: install Darwin _OSI on Apple hardware
Apple firmware checks _OSI("Darwin") during ACPI init and sets
OSYS=0x2710, making OSDW() return 1. Many device methods gate
behind OSDW() for GPU visibility, Thunderbolt, and power management.
Add hw.acpi.apple_darwin_osi tunable (default 1) that installs the
Darwin interface and disables Windows vendor strings on Apple hardware,
matching Linux and FreeBSD behavior.
Register apple_fw in the kernel build system (sys/conf/files).
The apple_fw driver reads the tunable and falls back to a late fixup
(re-evaluate PINI or direct OSYS poke) when the early path missed,
while respecting the user's choice when the tunable is disabled.
[BOLT] Gadget scanner: add less strict version of tail call checker
During tail call, it may be worth making sure the link register is as
trusted as during a regular call, though it may require inserting
expensive checking code by the compiler.
On the other hand, with pac-ret hardening enabled, there should be no
reason not to protect tail-calling functions at least as well as those
exited via regular return instruction.
This commit splits tail call checker into two versions: the basic one
which is suitable to make sure regular `PAC*` + `AUT*` are emitted as
needed, and the strict one, that additionally ensures the authentication
(if any) succeeded.