Interfaces: Assignments - minor cleanup in "Prefix delegation size", make field required to avoid none and blank both being valid options. Since "none" was the previous default, let's keep it that way for now.
Initialize targets before creating a LibraryOptionsContext. NFC (#233041)
Initialize the targets to register their library options, before parsing
command line arguments.
This prepares for removing the T::Global fallback in
`LibraryOptionsContext::get<T>()`.
(The -mtriple change of llvm-split was originally added for
AMDGPU --lto-partitions #83128)
[LTO,lld] Set -mllvm library options in the LTO context. NFC (#233026)
Follow-up to #231407: move tools off cl::ParseCommandLineOptions, which
sets the libraries' `XXXOptions::Global`, to
`cl::parseCommandLineOptions(LibraryOptionsContext &, ...)`.
lto::Config::LibraryOptions replays into every LLVMContext that LTO
creates: the regular LTO context, each ThinLTO backend, and split code
generation.
This prepares for removing the T::Global fallback in
LibraryOptionsContext::get<T>().
LLM-aided
[FuzzMutate] Parse fuzzer options into a context. NFC (#233035)
Move tools off cl::ParseCommandLineOptions, which sets the libraries'
`XXXOptions::Global`, to
`cl::parseCommandLineOptions(LibraryOptionsContext &, ...)`.
Create LibraryOptionsContext after initializing the targets (which may
register library options).
This prepares for removing the T::Global fallback in
`LibraryOptionsContext::get<T>()`.
[LoongArch] Add shuffle and vector element cost hooks
The default BasicTTI costs a broadcast of <2 x double> as 3 and a
single-source permutation of 32/64-bit elements as up to 4, although
LSX/LASX need one [x]vreplvei/[x]vreplgr2vr/xvreplve0 or vshuf4i
instruction. Extracting element 0 of an FP vector is free since it is
the aliased FPR.
These overestimates made the SLP vectorizer reject the {x, y} lanes of
the rustc-perf nbody force loop, which needs two scalar splats per
iteration. With them the loop splits its divisions between the vector and
scalar dividers: 21.5 -> 16.0 cycles per pair on LA664.
rustc-perf nbody on LA664: instructions -11.1%, cycles -13.5%.
[ValueTracking] Infer x != y from (x - y) pred C when 0 pred C is false (#225200)
Generalize the `(a - b) == NonZero -> a != b` implication (#159792) to
`(a - b) pred C -> a != b` whenever `0 pred C` is false, and let
`findValuesAffectedByCondition` register the operands of `sub` in
ordered comparisons with a constant, so that assumes and dominating
conditions can use it.
Alive2: https://alive2.llvm.org/ce/z/r_x-R-
Fixes #223345.
Assisted-by: Claude
pkgconf: update to 3.0.9.
Changes from 3.0.8 to 3.0.9:
----------------------------
* Build fixes:
- The Autotools build now includes and runs the spdxtool utility API tests,
ensuring that they are included in release tarballs.
Patch by commitmaniac.
MC: Remove MCAsmInfo::ExceptionsType
The exception model now comes from the module, and the MCAsmInfo
predicates that depend on it take the model as a parameter. The
target's default model is still available from
Triple::getDefaultExceptionHandling.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
WebAssembly: Use reportFatalUsageError for eh option errors
Avoid using the deprecated report_fatal_error, and add missing
error test coverage.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
CodeGen: Remove TargetOptions::ExceptionModel
The exception model now comes only from the "exception-model" module
flag. Remove the TargetOptions field and its copy into MCAsmInfo, so
MCAsmInfo only knows the target's default model.
The WebAssembly model checks move from the TargetMachine constructor
into the Emscripten EH/SjLj lowering pass. Clang relied on the backend
to reject non-wasm models for wasm targets, so it now rejects them
itself.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
CodeGen: Read the exception model from the module flag
Module::getExceptionModel() now falls back to the triple's default
model instead of falling back to the TargetMachine.
The pass pipeline is built before the module is known, so schedule each
EH preparation pass when the target supports a model, and let the pass
check the module's model. Add TargetMachine::supportsExceptionModel so
the pass config can skip definitely irrelevant passes. SjLjEHPrepare is
now scheduled on every target with exception handling, and WinEHPrepare
only on COFF and Wasm targets. WinEHPrepare and WasmEHPrepare are
scheduled for Wasm by the base pass configs, replacing the WebAssembly
override.
This is almost the last step towards removing TargetOptions::ExceptionModel.
Co-authored-by: Claude Opus <noreply at anthropic.com>