[cmake] FindLibXml2: keep user-provided LIBXML2_DEFINITIONS (#221294)
LLVM's `FindLibXml2.cmake` (added in #166867) unconditionally does
`set(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})` and puts
`PC_LIBXML_CFLAGS_OTHER` on the imported targets. CMake's own
`FindLibXml2` module only takes pkg-config's flags when the library it
found is the one pkg-config describes; otherwise it keeps whatever
`LIBXML2_DEFINITIONS` the user passed and exposes it through
`INTERFACE_COMPILE_OPTIONS`.
This matters when cross-compiling against a static libxml2 on Windows.
Passing `-DLIBXML2_DEFINITIONS=-DLIBXML_STATIC
-DLIBXML2_LIBRARIES=.../libxml2s.lib` worked with LLVM 22 (CMake's
module): the define reached both the `xmlReadMemory` configure check and
the consumers of `LibXml2::LibXml2`. With LLVM 23 it is silently
dropped, `xmlexports.h` declares the API `__declspec(dllimport)`, the
check fails to link against the static library and
`LLVM_ENABLE_LIBXML2=FORCE_ON` aborts with `Failed to configure
libxml2`. (pkg-config on the Linux host finds the host's libxml2, so
[20 lines not shown]
11990 DHCP client support for "Classless Static Route" option
Reviewed by: Andy Fiddaman <illumos at fiddaman.net>
Reviewed by: Gordon Ross <gordon.w.ross at gmail.com>
Reviewed by: C Fraire <cfraire at me.com>
Approved by: Robert Mustacchi <rm at fingolfin.org>
[libc] Update printf_core::Writer to template on character type. (#220669)
This is motivated by working toward `swprintf`.
The primary goal is to enable a `CharT` template type parameter on
`printf_core::Writer`. This requires refactoring how the "overflow
write" logic is set up to get around the limitation on function template
partial specialization.
Key changes to `printf_core::Writer` and friends:
* Separate the overflow write logic from `WriteBuffer` into an
`OverflowWriter` template where specializations handle dispatch, and
remove the `WriteBuffer` subclasses.
* Rename from `WriteMode` to `OverflowMode` to try and shorten the
enumerators with minimal loss to clarity, and reduce the number of modes
to only two: `DROP_OVERFLOW` and `CALLBACK`.
* The number of dynamic function calls for flushing and resizing use
cases stays the same by templating the callback on a `WriteSink`.
[3 lines not shown]
[ConstantTime] Move the CT_SELECT expansion into a helper
The CT_SELECT case in ExpandNode was around 180 lines. Move it to
SelectionDAGLegalize::ExpandCTSELECT and name the operands, so the case is
three lines. Pure code motion: emitted assembly is unchanged for every RUN
line of the existing ct.select codegen tests.
Also use a temporary for the promoted SELECT so the call fits on one line
instead of wrapping after the assignment.
Co-Authored-By: Claude Opus 5 <noreply at anthropic.com>
[MLIR][ROCDL] Shard generated operation definitions (NFC) (#221729)
ROCDL generated operation definitions is amongst the slowest MLIR
translation unit. Generate eight definition shards, compile them as
separate sources, and use the generated sharded registration hook while
keeping custom parser and printer helpers in one implementation unit.
Assisted-by: Codex
audio/elevenlabs-cli: New port: Command-line interface for the ElevenLabs platform
The keyring crate's "vendored" feature makes libdbus-sys build a bundled
copy of D-Bus; files/patch-Cargo.toml drops it so the system library is
used instead. OPENSSL_NO_VENDOR does the same for openssl-sys.
The CLI exposes the whole ElevenLabs API as subcommands, so the generated
shell completions are about 6MB. They are gated behind a default-off
COMPLETIONS option; the man page is always installed.
[mlir][llvm] Add convergent attribute to llvm.inline_asm. (#221990)
Expose LLVM's convergent call-site attribute on the LLVM dialect
inline_asm op. This allows marking an inline asm block as convergent so
that divergence-aware passes do not move it relative to divergent
control flow.
[CIR][CMake] Configure MLIR as a dependency-only project
ClangIR requires MLIR, but enabling CIR currently requires users to list MLIR
explicitly in LLVM_ENABLE_PROJECTS. That also attaches all MLIR build, install,
unit-test, and lit targets to the corresponding LLVM aggregates.
When Clang is selected and CLANG_ENABLE_CIR is enabled, append MLIR to the
effective LLVM_ENABLE_PROJECTS list. The common project setup compares that
list with the cached user selection, so an explicit MLIR selection retains its
normal behavior while an implicit selection is configured with EXCLUDE_FROM_ALL.
This makes MLIR targets available for CIR dependency resolution without adding
MLIR's aggregate targets. Keep the existing standalone ClangIR restriction and
do not configure MLIR when CIR is disabled.
Validation:
- Configured Clang with CIR and implicit MLIR test support.
- Configured Clang and MLIR explicitly with CIR and tests enabled.
- Configured Clang without CIR and verified that MLIR remains disabled.
[4 lines not shown]
[CMake] Infer dependency-only projects from the cache
LLVM_ENABLE_PROJECTS historically treats projects enabled to satisfy another
project's dependency the same as projects selected by the user. Consequently,
implicit projects attach their complete build, install, and test suites to
LLVM's aggregate targets.
Keep the cache entry as the user-requested project roots and use the normal
LLVM_ENABLE_PROJECTS variable as the effective dependency closure. Projects in
the effective list but not the cache entry are configured with EXCLUDE_FROM_ALL.
Normalize the special all value before comparing the two sets.
This makes Flang's MLIR and Clang dependencies dependency-only without a second
project collection. It also applies the same rule to Clang when it is added for
LLDB. Forward the cached roots to cross-compilation and bootstrap configurations
so implicit projects do not become explicit in nested builds.
Let MLIR own its dependency-only test policy: configure test support libraries
for downstream consumers without creating MLIR unit tests or registering its
[10 lines not shown]
[MLIR][spirv] Shard generated operation definitions (NFC) (#221811)
Generate SPIR-V operation definitions in eight shards and use the
generated registration hook. Keep parser, printer, and verification
helpers in the existing implementation TU and expose them through a
private header.
Assisted-by: Codex
[AMDGPU] Route no-modifier reg-or-inline AsmParser operands through HwMode predicate
Convert the reg-or-inline operands with no modifiers (MFMA VGPR/AGPR
sources, VCSrc, v_pk_mov_b32, VOP scalar f64) from the fixed-class
isRegOrInlineNoMods to the HwMode-aware isRegOrInlineNoModsByHwMode, so an
odd-aligned tuple is rejected at the offending operand column instead of by
the validateVGPRAlign catch-all.
Co-Authored-By: Claude <noreply at anthropic.com>
[SPIRV] Add matrix type legalization for many float global opcodes (#220782)
fixes #220723
The issue in #220723 is that the global opcodes can not deduce the
element type when the input is a shuffle vector. This is the same issue
as #213783. All we have to do to fix this is to have deduceTypeFromUses
in the SPIRVPostLegalizer know that we need to look up the type from the
results register for these opcodes.
The secondary issue is that there were no matrix tests for any of these
global opcodes so I added them. I did not follow the template started by
the atan2 tests because those are overkill and testing way to much stuff
not related to opcode legalization.
Assisted on the tests by MAI-Code-1.1-Flash