[Offload][Omp] Do all geometry computations in 64-bit (#243507)
As discussed in #243452, currently, geometry computation is using a mix
of 32 and 64 bit integers, which require to cross the boundary multiple
times, making it confusing and error-prone.
This PR changes it so all the computation is in 64-bits after widening
some of the inputs. The result is also narrowed at the very end to
conform with the liboffload accepted sizes (and after checking we
wouldn't truncate the value).
Assisted by Claude.
[SPIR-V] Enable extended LLT in GlobalISel (#240752)
Let LLTs tell float from int so the PostLegalizer type fallback can stop
giving int types to float values, as patched case by case in, for
example, #238510 and #213785
zino-argus-glue: Add a package version 0.5.1 of the zino/argus glue service.
This is a glue service for integration between Argus, the alert
aggregation server, and Zino, the network state monitor provided
by Sikt.
[SPIR-V] Widen icmp on non-power-of-two vectors (#238513)
Align the G_ICMP legalizer rule with G_FCMP, which already widens to the
next power of two
Otherwise icmp on <5 x i32> fails to legalize
[libc] Add internal locale structures and config options (#211470)
Add internal category data structures and static locale objects for C
and UTF-8 locales. Introduce LIBC_CONF_DEFAULT_LOCALE and
LIBC_CONF_DISABLE_RUNTIME_LOCALE configuration options.
When LIBC_CONF_DISABLE_RUNTIME_LOCALE is set, the locale subsystem is
designed to eliminate all runtime overhead. Indirection through locale_t
objects and thread-local state lookups are bypassed in favour of direct,
compile-time constant lookups, allowing all runtime locale machinery and
dynamic objects to be elided for embedded environments.
Assisted-by: Automated tooling, human reviewed.
www/py-django-i18nfield: Update to 1.11.0
1.5.0 imports django.utils.six and ugettext, removed in Django 3.0 and
4.0, so the package fails to import. 1.11.0 no longer uses them.
* Switch to the PEP517 build framework to make the port future-proof.
* Add the Django dependency; the port had no RUN_DEPENDS.
While here, add concurrent to USE_PYTHON, add LICENSE_FILE and switch
to the more preferred DISTVERSION.
PR: 300163
Approved by: maintainer timeout (14+ days)
MFH: 2026Q4
Co-Authored-By: Kai Knoblich <kai at FreeBSD.org>
(cherry picked from commit 4e1406063d80cff529f4ad6456885a48371b56dc)
www/py-django-hierarkey: Update to 2.0.2
1.0.3's hierarkey.forms imports ugettext_lazy, removed in Django 4.0.
2.0.2 no longer uses it.
* Switch to USE_PYTHON=pep517 to make the port future-proof.
* Add the Django dependency, which the port did not list.
While here:
* Add concurrent to USE_PYTHON.
* Also add LICENSE_FILE.
* Fix portlint warnings.
* Switch to the more preferred DISTVERSION.
PR: 300162
Approved by: maintainer timeout (14+ days)
MFH: 2026Q4
Co-Authored-By: Kai Knoblich <kai at FreeBSD.org>
[2 lines not shown]
www/py-django-countries: Update to 9.1.0
5.3 imports django.utils.six, removed in Django 3.0, so the package
fails to import. 9.1.0 no longer uses it.
* Switch to the PEP517 build framework and patch out the upper bound
of py-uv-build to be able to build with newer versions of it.
* Fix LICENSE (5.3 already had the same MIT text; BSD2CLAUSE was a
mislabel) and add LICENSE_FILE.
* Point WWW at the GitHub project to get actual upstream info.
* Set NO_ARCH because the package doesn't contain any architecture
specific files.
While here, add concurrent to USE_PYTHON and switch to the more
preferred DISTVERSION.
[6 lines not shown]
www/py-django-advanced-filters: Update to 2.0.0
1.3.0 imports ugettext_lazy and django.conf.urls.url, both removed in
Django 4.0, so the admin mixin fails to import. 2.0.0 no longer uses
them (its changelog lists Django 3.2 and 4.0 support).
* Switch to USE_PYTHON=pep517 to make the port future-proof.
While here:
* Add python to CATEGORIES and concurrent to USE_PYTHON.
* Also add LICENSE_FILE.
* Switch to the more preferred DISTVERSION.
* Expand pkg-descr.
PR: 300160
Approved by: maintainer timeout (14+ days)
MFH: 2026Q4
Co-Authored-By: Kai Knoblich <kai at FreeBSD.org>
[2 lines not shown]
[libc] Add <arpa/nameser.h> with the RFC 1035 constants (#243501)
This patch adds the <arpa/nameser.h> header with the NS_* constants
based on RFC 1035 (NS_PACKETSZ, NS_MAXCDNAME, NS_HFIXEDSZ, etc.). I've
left out the compatibility aliases (PACKETSZ, HFIXEDSZ, ...) and the
rest of the header (ns_msg, ns_rr, ns_initparse, ...) for now.
I've put the constants into a llvm-libc-macros header instead of the
yaml file, as I expect the getaddrinfo implementation to need them for
building DNS queries and parsing the responses. For the same reason, I'm
also adding a proxy header in hdr/, even though nothing uses it yet.
I'm enabling the header on linux aarch64, riscv and x86_64, where the
rest of our networking headers are. It goes into the regular (not
experimental) list, as there's nothing incomplete about the constants
themselves. I don't add a test, as this is just a bunch of constant
definitions.
Assisted-by: Claude
[libc] Harden regerror null check and use string_view (#242402)
POSIX permits calling regerror with a null buffer when errbuf_size is 0
to query the required buffer length, but passing a null buffer with a
non-zero errbuf_size is undefined behaviour. Previously, regerror
silently skipped writing when errbuf was null and errbuf_size was
non-zero, diverging from the null-pointer hardening in regcomp, regexec,
and regfree.
Guard errbuf with LIBC_CRASH_ON_NULLPTR when errbuf_size > 0 while
preserving size queries when errbuf_size == 0. Return cpp::string_view
directly from the message lookup lambda so literal lengths fold at
compile time without a runtime strlen scan.
Assisted-by: Automated tooling, human reviewed.
[X86] Expand vector atomicrmw through a cmpxchg loop (#230788)
Fixes #226002.
`shouldExpandAtomicRMWInIR` returned None for the operations
xchg/add/sub when the operand
was a vector whose size did not exceed the native width of 64 bits (if
size > native_size). A <2 x i32> is 64 bits, so it skipped that check
and reached type legalization stage as an `ATOMIC_LOAD_ADD` node with a
vector result, which aborts with "do not know how to widen the result of
this operator".
x86 has no native atomic RMW instruction for vectors, so this patch
always expands them to a `cmpxchg` loop. `AtomicExpandPass` already
bitcasts the vector to an integer of the same width.
128-bit vectors use `cmpxchg16b` when `+cx16` is available and otherwise
fall back to libcalls such as `__atomic_*_16` (typically implemented
with a lock; correct but slower).
[5 lines not shown]
[libc][math] Expand polyeval.h with array, loop, and Estrin evaluation.
Add array-based, non-unrolled loop, and right-heavy Estrin polynomial
evaluation helpers to fputil:
- Add array overloads with optional OFFSET template parameter for
polyeval and altpolyeval, using sub_multiply for altpolyeval and
supporting both value (<= sizeof(double)) and const-ref (> sizeof(double))
coefficient types.
- Add loop_polyeval and loop_altpolyeval with LIBC_LOOP_NOUNROLL for
code-size-sensitive evaluations.
- Add estrin_polyeval (array and variadic overloads) using a precomputed
dyadic power table and a minimum-depth right-heavy binary tree.
- Add unit tests in polyeval_test.cpp covering float, double,
DoubleDouble, DyadicFloat<128>, and Frac128 across rounding modes and
evaluation-order sensitivity.
[libc][math] Rename PolyEval.h to polyeval.h.
Rename src/__support/FPUtil/PolyEval.h to polyeval.h to match lowercase
snake_case header naming, and update includes, CMake, and Bazel rules.
[libc][math] Use multiply_sub and sub_multiply across math headers.
Replace negated multiply_add calls (multiply_add(a, b, -c), multiply_add(-b, c, a),
and multiply_add(b, -c, a)) across FPUtil and math implementation headers with
multiply_sub and sub_multiply.
[libc][math] Add multiply_sub and sub_multiply to multiply_add.h.
- Add fputil::multiply_sub (x * y - z) and fputil::sub_multiply (x - y * z)
alongside fputil::multiply_add (x * y + z).
- Use template-based hardware FMA dispatch and size-aware inline overloads so
explicit multiply_add<T> calls also use hardware FMA when available.
- Add NumberPair<T> add/sub overloads in double_double.h, and matching
multiply_sub and sub_multiply overloads for DoubleDouble and DyadicFloat.
- Add unit tests in libc/test/src/__support/FPUtil/multiply_add_test.cpp.
[ARM] Emit clrex wherever it's available in emitAtomicCmpXchgNoStoreLLBalance (#242972)
This method previously just checked for hasV7Ops, but CLREX is available
in Arm state in v6K and in Thumb state wherever v7clrex is present,
including v8-M Baseline.
[mlir][vector] Add `getDefaultUnrollTargetShape` to `VectorUnrollOpInterface` (#242315)
Add an interface hook that provides a default target shape for `Vector`
unrolling when no shape callback is configured through
`UnrollVectorOptions`. Explicit caller configuration takes precedence.
Move the shape-selection logic from `TestVectorUnrollingPatterns` into
the interface and the corresponding `Vector` operations. This simplifies
the test pass and keeps operation-specific defaults alongside the
operations that define them.
These defaults are intended primarily for testing. Callers with
performance requirements should continue to configure target shapes
through `UnrollVectorOptions`.
The test pass now uses the type-dependent contraction default regardless
of the `unroll-based-on-type` option.
Also group the unrolling interface methods consistently within
[2 lines not shown]
[flang][OpenMP] Remove unused OmpStructureChecker::GetLoopIndex (NFC) (#243370)
The last caller was removed on November 16, 2026 in commit
30dd629584112f7d01e5d6af6efa1b892e86153d.
Assisted-by: Antigravity
[VPlan] Use uitofp for the index of FP derived IVs (#240743)
expandVPDerivedIV converts the index of an FP derived IV with sitofp,
but the index is an unsigned iteration count. With an i32 canonical IV,
an index of 2^31 or more gives wrong FP induction values. Use uitofp,
and update the cost to match.
Depends on #240741.
Assisted-by: Claude Code
[CIR] Canonicalize code that cir.goto and cir.switch enter
Since #225814, MLIR's greedy driver skips every operation in a block
that the entry block of its region does not reach. Until the goto solver
runs, cir.goto is not a CFG edge. So cir-canonicalize no longer rewrites
the code after a cir.label that only gotos reach, nor the blocks only
that code reaches. In C this is most error paths. In ten isl source
files, 722 of the 737 labels start a block with no predecessors. A
cir.case after a break, return or goto has no predecessor either,
although its cir.switch jumps to it.
Add GotoAnalysis, which answers whether control can reach an operation
when those jumps are counted. Control enters a region at its entry block
and at each operation that is or holds a cir.label, or a cir.case below
its cir.switch. From there it follows the CFG. As a rewriter listener,
it keeps its results while the IR changes and updates them on the next
query, so merging blocks needs no rescan.
cir-canonicalize passes the analysis to MLIR's greedy driver as its
[6 lines not shown]
[mlir] Let callers decide reachability in the greedy rewriter
Since #225814, the greedy rewriter skips an operation whose block has no
CFG path from the entry block of its region: values there may form SSA
cycles, on which folds and patterns can crash or loop. Some dialects
transfer control without CFG edges. In ClangIR, cir.goto enters its
cir.label and cir.switch enters its nested cir.case operations until
later passes turn them into branches, so the code they enter looks
unreachable and the CIR canonicalizer stops rewriting it.
Add GreedyRewriteConfig::setReachability, a function the worklist asks
instead of the CFG whether an operation is reachable. The caller must
not report an operation reachable whose operands may form an SSA cycle.
The region-based entry points still erase blocks that have no CFG path
from the entry, so the function matters to applyOpPatternsGreedily.
Assisted-by: Claude Code (claude-opus-5-5).
[libc++abi] Use a strong enums or bools in private_typeinfo.h (#230769)
The enum values for the kind of path we currently have is moved into an
`enum class path_kind`. We now only track whether a derived type _might_
be derived from a static type instead of whether it might be, we know it
to be, or we know it not to be, since that's the only information we
care about. For that we can use a `bool` instead.
[PowerPC] Use the 16-byte stack and vector alignment on FreeBSD (#232336)
FreeBSD uses the ELFv2 ABI on both byte orders, so it has the same
16-byte stack alignment as Linux. The explicit vector alignment is a
backend workaround that does not depend on the OS. There is no
reason for the layouts to differ.
sound: Retire OSSV4_EXPERIMENT
Added in 2006 (b611c801f0ac) but these stubs are still not implemented
or specified by 4Front.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D61671