[mlir][vector] Update doc for vector.broadcast (nfc) (#239707)
Follow-up for #228727:
* Simplify the formula for computing the source index (no need for a
special case when source_dim == 1)
* Add more examples.
The examples were created by @yueshengys in #227574, thank you!
[Support] Pass tool options to parseCommandLineOptions
`RegisterMCToolOptions` adds `MCToolOptions` to the process-wide
registry. Once lld registers them, every later parse in the process
accepts `-crel`, including clang's `-mllvm`, which then ignores it.
Add a `parseCommandLineOptions` overload that takes the libraries a tool
opts in to. Replace `RegisterMCToolOptions` with `mc::getToolOptions`
and `codegen::getToolOptions`, which tools pass where they parse,
including lld's `-mllvm`, gold's `-plugin-opt`, and libLTO's debug
options. `RegisterCodeGenFlags` no longer registers the MC options.
`LibraryOptionsContext` records the library that parsed each argument,
so `assign` replays without looking up the registry, which does not
contain tool options.
LLM-aided
[Clang][OpenMP] Fix crash on task reduction of an array with a declare reduction that has no initializer (#239970)
Fixes #141228
`EmitOMPAggregateInit` set up a source pointer and PHI over the original
item for any `declare reduction`, but the task reduction init function
only passes that address when the `declare reduction` has an
`initializer`. For an array without one the `Address` was invalid and
tripped the assert.
Only the initializer reads `omp_orig`, so the source handling now keys
on `DRD->getInitializer()`, matching the check in
`emitReduceInitFunction`.
AI Aided.
[libc][math][c23] Add sinbf16 function (#185441)
This PR intends to add sinbf16 higher math function for bfloat16 type .
( The new header comments are updated using gemini flash 3.8 (low) )
Pass a number of bpf_insn to npf_bpf_compile, this should fix kern/60975.
Contrary to what the PR says, it broke loudly only in -current
when I tightened checks in bpfjit_generate_code on July 5th, 2026.
In stable releases it reads past the end of allocations but it generates
valid jitted code.
Why it works in stable releases:
- bpf_validate() checks that a rule ends with a valid RET and
that jumps don't jump past the last RET,
- bpfjit in stable releases doesn't check for a valid RET, it
relies on bpf_validate().
- bpfjit starts by (over)allocating a shadow bpfjit_insn array,
then scans (and goes past the end) instructions, builds CFG
and sets the "unreachable" flag in the shadow array. All
instructions after the last RET have unreachable set to true.
- bpfjit skips emitting any code when unreachable is true
[5 lines not shown]
acpi_apple: Fix sleep with non-sleepable lock held
Apple platform attach and detach functions are serialized with ordinary
mutex and contain code that executes malloc() that leads to INVARIANTS
warnings. Fix it through replacement of mutex with sx lock.
Fixes: d7d237ce731f ("acpi_apple: Apple platform ACPI driver")
Reviewed by: seuros
Differential Revision: https://reviews.freebsd.org/D61295
acpi_apple: Fix sleep with non-sleepable lock held
Apple platform attach and detach functions are serialized with ordinary
mutex and contain code that executes malloc() that leads to INVARIANTS
warnings. Fix it through replacement of mutex with sx lock.
Fixes: d7d237ce731f ("acpi_apple: Apple platform ACPI driver")
Reviewed by: seuros
Differential Revision: https://reviews.freebsd.org/D61295
Use proper naming for registering ether filtering hooks
get_etherpfil_head function name doesn't make sense in that context.
use register_etherpfil_hooks (plural) which registers one hook
(by calling the singular form (register_etherpfil_hook)
per interface at the ether layer.
No functional change intended
Thanks Edgar Fub
sys/vfs: skip DOCLOSE for incomplete spec vnodes
Several checkalias() callers discard the vnode passed to checkalias()
after moving its filesystem node to the returned alias. In the uncommon
block device alias case, checkalias() leaves that discarded vnode as a
shell: it uses spec_vops, but has no specinfo.
If vgonel() reclaims such a vnode while the caller still holds the last
reference, vclean(DOCLOSE) treats it as active and dispatches
VOP_CLOSE() to spec_close(), which expects v_specinfo to be present and
dereferences v_rdev.
Such shell vnodes do not represent an opened device instance, so there
is nothing to close through spec_vops. Skip DOCLOSE for spec_vops vnodes
without specinfo.
OK: beck@