[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
[MC] Declare the MCTargetOptions command line options in TableGen
Move RegisterMCTargetOptionsFlags options into a private `MCToolOptions`
struct, different from MCCLOptions since `MCToolOptions` requires tool
opt-in. RegisterMCToolOptions, renamed from RegisterMCTargetOptionsFlags
(LLVMOption and clang driver use "flags" for boolean options), registers
the struct, so `clang -mllvm -crel` remains an error.
Remove the getters without outside readers. llc reads `MCRelaxAll`
instead of `getExplicitRelaxAll`, so `-mc-relax-all=false` no longer
warns with a non-object file type.
LLM-aided
mail/vandelay: JMAP account migration and backup utility
Vandelay is a one-shot account migration utility for JMAP from the
Stalwart Labs team (the authors of mail/stalwart). It imports an
account from JMAP, IMAP, CalDAV, CardDAV, WebDAV, ManageSieve,
Maildir++, Google Takeout, Microsoft Exchange Server (EWS) or Exchange
Online (Graph) into a self-contained local SQLite archive, and exports
that archive into a target JMAP server. Both steps are resumable, so
the archive also works as a per-account backup.
PR: 300376
[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
[MC] Declare the MCTargetOptions command line options in TableGen
Move RegisterMCTargetOptionsFlags options into a private `MCToolOptions`
struct, different from MCCLOptions since `MCToolOptions` requires tool
opt-in. RegisterMCToolOptions, renamed from RegisterMCTargetOptionsFlags
(LLVMOption and clang driver use "flags" for boolean options), registers
the struct, so `clang -mllvm -crel` remains an error.
Remove the getters without outside readers. llc reads `MCRelaxAll`
instead of `getExplicitRelaxAll`, so `-mc-relax-all=false` no longer
warns with a non-object file type.
LLM-aided
[CodeGen][MC] Pass a LibraryOptionsContext to the MC option readers. NFC (#239919)
Rename `InitMCTargetOptionsFromFlags` to `getMCTargetOptions` and
`InitTargetOptionsFromCodeGenFlags` to `getTargetOptions`. Most of these
options take values, so "Flags" is a misnomer.
These functions and `getABIName` now take the `LibraryOptionsContext` to
read from. A per-context option declared in TableGen has no global value.
LLM-aided
[CIR][X86] Add support for addcarryx and subborrow builtins (#239685)
Lower __builtin_ia32_addcarryx_u32/u64 and
__builtin_ia32_subborrow_u32/u64
to the llvm.x86.addcarry.* and llvm.x86.subborrow.* intrinsics, matching
classic CodeGen.
These builtins support `_addcarryx_*` (adxintrin.h) as well as
`_addcarry_*` and
`_subborrow_*` (adcintrin.h) intrinsics, which previously were NYI.
The tests add ClangIR RUN lines to the existing
clang/test/CodeGen/X86/{adx,adc}-builtins.c: `-fclangir -emit-llvm` runs
checked
against the existing CHECK lines, and `-fclangir -emit-cir` runs with
new CIR
checks.
Assisted-by: Claude Code (Claude Opus 5.5)
[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