[OpenMP][clang] Apply atomic options to atomic compare
Thread denormal mode, fine-grained memory and remote memory options
through for atomic compare directivs.
Claude assisted with this patch.
[AMDGPU] Remove V_CNDMASK_B64_PSEUDO handling from SIFoldOperands. NFC. (#240324)
This is dead because the pseudo always gets expanded earlier, and broken
because it would have used V_MOV_B32 to move a 64-bit value.
netipsec: Do not leak the SAH when an SA is cloned
key_updateaddresses() gives the clone of an SA a new SAH reference when
the SA index comes from key_newsah() or key_getsah(), but nothing
releases the reference of the old SA: key_delsav() leaves the SAH alone,
because key_unlinksav() normally releases it, and an SA that is replaced
never goes through that. The SAH then stays allocated for good, after
its SAs are flushed and after the vnet is destroyed, as an SADB_UPDATE
with a new address does each time an IKE daemon moves an SA.
The old SA cannot release the reference when it is replaced, since a
sender that still holds it reads its SAH. Release it in key_delsav()
instead. When only the NAT-T config changes, the clone used to take over
the reference of the old SA; take a new one in that case as well, so that
every SA holds its own.
Reviewed by: kib, markj
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D61101
[libc] Apply scheduler attributes on thread creation (#225674)
POSIX specifies that pthread_create should apply the scheduling policy
and parameters given in the attributes object (if PTHREAD_EXPLICIT_SCHED
is set). Linux's clone syscall doesn't support setting scheduling
parameters directly, so we have to apply them from userspace via
sched_setscheduler after the thread is created.
To make sure the thread doesn't start running user code with the wrong
scheduling parameters (and to allow returning an error if
sched_setscheduler fails without leaving a half-running thread), I've
added a startup handshake using the clear_tid futex on the child stack:
- the child waits on the futex if explicit scheduling was requested
- the parent calls setschedparam, and then signals the child to either
continue (running) or abort (exit)
- if the call fails, the child exits immediately, the parent reaps it
via Thread::wait(), and returns the error code to the caller
Assisted-by: Gemini
[OpenMP][clang] Add ompx_fast_fp_atomics and ompx_safe_fp_atomics hints
Add omp_sync_hint_t extensions that override
-f[no-]atomic-ignore-denormal-mode (-m[no-]unsafe-fp-atomics) for a single
atomic construct. The safe hint takes precedence if both are given.
This is an upstreaming/copy-paste of downstream code and release notes.
Claude assisted with this patch.
[libc] Use CheckedPtr/make_unique in the regex code (#238366)
The regex code was written before we had unique_ptr, and so it did all
of its memory management by hand (AllocChecker + new/delete, with
scope_exit guards for the error paths). This replaces that with
make_unique, and stores the results in cpp::unique_ptr members.
Specific changes:
- ExprPool now holds its blocks, byte sets and hash table in
unique_ptr<T[]> members, which means the destructor can be defaulted.
Since unique_ptr does not know the size of the array, the capacity of
each array is now tracked in a separate field (previously it was implied
by the span size).
- make_unique<T[]> value-initializes the array, so the explicit
inline_memset of the hash table is gone.
- ParsedAtomStack and regcomp no longer need scope guards to clean up on
the error paths.
regfree still does a plain delete, as regex_t::__internal is a void
[18 lines not shown]
[InstCombine] Simplify `llvm.vector.shuffle` with constant or length 1 mask (#240231)
When a dynamic shuffle has a mask that can is const, it can lower to a
`shufflevector` instruction which is faster on some architectures (and
has real codegen lowering until
https://github.com/llvm/llvm-project/pull/240222 and friends all merge).
[flang][OpenMP] Add explicit triple to test (NFC) (#240298)
To avoid ABI differences across targets. This is irrelevant to the
purpose of the test.
Fixup for https://github.com/llvm/llvm-project/pull/227954 to fix a test
failure on s390x.
[lldb][NativePDB] Read the columns of line tables (#238603)
A CodeView line table has a column entry for every line entry when it
was emitted with columns (`DebugLinesHasColumns`, clang's
`-gcolumn-info`). `ParseLineTable` ignores them and gives every entry
column 0, so breakpoints by line and column can't resolve and stop
locations never show a column.
This patch takes the start column of each line entry from the column
entries when there are as many of them as line entries.
Fixes `TestBreakpointByLineAndColumn` (whose Makefile already passes
`-gcolumn-info`) with PDB debug info.
rdar://191741255
Hexagon: Fix HexagonOptAddrMode::processAddBases losing Changed (#240397)
processAddBases could rewrite one addi via updateAddBases and then
return false when a later addi in the list failed the usedInLoadStore
check. If nothing else changed, runOnMachineFunction then skipped
Liveness::resetKills, leaving stale kill flags. This was previously
hidden by the clearKillFlags call in updateAddBases removed in #239894,
and caused CodeGen/Hexagon/autohvx/addi-offset-opt-addr-mode.ll to fail
machine verification in EXPENSIVE_CHECKS builds.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[CIR][AMDGPU] Look through address_space views when forwarding indirect args (#239158)
Summary:
- `CIRGen` loads AMDGPU locals through an `address_space` cast of their
addrspace(5) `alloca`.
- `forwardableIndirectLoad` required the load address to have the
parameter's type, so a `byref` argument was copied into a fresh slot
instead of passing the `alloca`.
- Now pass the `alloca` instead of copying into a new `byref` slot.
- `forwardableIndirectLoad` becomes `forwardableIndirectAddr` and
returns the cast's source when it has the parameter's type.
Relates to: https://github.com/llvm/llvm-project/issues/220471
Assisted by: claude opus 5.5
mvc:ApiControllerBase - increase server sent events limit to 15, browser seems to lock at 7, but in general we don't want to deplete our resource pool with streams (current max processes is 40).
[mlir][spirv] Fix invalid placeholder in FuncOpVectorUnroll (#240370)
FuncOpVectorUnroll uses an arith.constant from getZeroAttr as a
placeholder for each argument it does not unroll. Since #238629,
getZeroAttr returns null for types such as tensor<8x8xvector<4xi8>>,
so the pattern builds an arith.constant with no value. The greedy driver
erases the dead placeholder later, but expensive checks verify the IR
right after the pattern and fail:
error: 'arith.constant' op requires attribute 'value'
The placeholder's value is never read. Use a zero-operand
unrealized_conversion_cast instead, which works for any type.
func-signature-vector-unroll.mlir already covers this case.
Fixes https://lab.llvm.org/buildbot/#/builders/241/builds/1796
[InstCombine] Canonicalise Vector Shuffle that clears upper bits
Currently, shuffle vectors that are equivalent to preserving lane 0 and clearing the uppers lanes of a vector result in different shuffle vectors and masks
Recognise and canonicalise the shuffleVectors to the same form allowing for easier recognition in the backend
OpenSSH: Update to 10.5p1
This release contains security fixes and small bugfixes.
Full release notes are available at
https://www.openssh.com/txt/release-10.5.
Selected items from the release notes:
Security
========
* ssh-agent(1): fix an interaction between agent locking and the
session-bind at openssh.com extension that is used to identify
forwarded agents. These binding requests were refused when the
agent was locked, with the result that operations that were
intended to be limited to local use only could be performed
remotely, including the ability to add PKCS#11 tokens and make
use of keys that had destination restrictions applied.
[33 lines not shown]