LLVM/project 5916063 — lld/MachO Relocations.h InputFiles.cpp, lld/test/MachO undef-spell-corrector.s arm64-stubs.s

[lld][MachO] Pool relocation storage per input section

Compilers split input sections into many subsections, and each subsection currently grows its own relocation vector. In a Chromium link, that means 3.41 million small allocations for 51.3 million relocations. Allocation dominates parallel relocation parsing: glibc grows worker arenas with `mprotect`, and the workers contend on the process's `mmap_lock`.

## Design

I allocate one relocation array per input Section and let its subsections borrow slices of it. Chromium then needs 82,210 arrays. The arrays come from a thread-local bump allocator, which this PR adds to `lld/Common`: the existing thread-local allocators are typed and construct and destroy their elements, which a buffer filled by placement does not want.

Compilers emit relocations by descending address, so each subsection's relocations arrive one after another. `ld -r` output may not be sorted: the parser checks the order as it goes, and on the first out-of-order relocation it sorts the section's relocations and parses them again, holding back diagnostics until it can no longer start over. A slice that later passes append to moves to a buffer of its own.

The parser fills each array from the back, so relocations end up in ascending address order, both across subsections and within each one. A SUBTRACTOR still precedes its paired UNSIGNED. Upstream stores each subsection's relocations in descending order, and the thunk pass walks them in reverse to visit branches by ascending address. With ascending storage, the relocation scan and the thunk pass both read a section's relocations front to back, and the thunk pass becomes a forward loop.

Passes that act on relocations in storage order now do so in ascending address order within a subsection. GOT, stub and binding entries are therefore created in source order, as are undefined-symbol diagnostics and `-why_live` output. The affected tests are updated; only the order of entries changes.

## Measurements

Both tables compare this PR, merged into `main` at 950baabb7fdf, against that commit. They give means and cbdr 95% confidence intervals over 30 interleaved paired rounds at the default thread count.

Linux (AMD Ryzen 7 7700):

    [36 lines not shown]
DeltaFile
+146-22lld/test/MachO/unsorted-relocations.yaml
+90-41lld/MachO/InputFiles.cpp
+71-0lld/MachO/Relocations.h
+14-3lld/test/MachO/invalid/invalid-relocation-pcrel.yaml
+7-7lld/test/MachO/arm64-stubs.s
+6-6lld/test/MachO/undef-spell-corrector.s
+334-7920 files not shown
+396-13426 files

LLVM/project cf40f87 — llvm/lib/Target/Mips MipsSEISelLowering.cpp MipsMSAInstrInfo.td, llvm/test/CodeGen/Mips/msa arithmetic_float.ll 3rf_4rf.ll

[Mips] Fix `fma` argument swap bug (#245047)

The `llvm.fma` intrinsic computes `a*b + c`, the MIPS `fmadd`
instruction computes `a + b*c`.

- [MSA
docs](https://jnastarot.io/arch_index/pdf/MD00868-1D-MSA64-AFP-01.12.pdf#page=181)
- langref does not explicitly define the argument order, but [there is
this
comment](https://github.com/llvm/llvm-project/blob/1bd1774757f8fb19c0a06f84cbb53076b75eafbb/llvm/include/llvm/CodeGen/ISDOpcodes.h#L522-L523)
DeltaFile
+14-0llvm/test/CodeGen/Mips/msa/3rf_4rf.ll
+4-4llvm/test/CodeGen/Mips/msa/arithmetic_float.ll
+6-2llvm/lib/Target/Mips/MipsMSAInstrInfo.td
+4-2llvm/lib/Target/Mips/MipsSEISelLowering.cpp
+28-84 files

FreeBSD/ports c95d9d0 — audio/easyeffects Makefile

audio/easyeffects: Add missing dependencies
DeltaFile
+1-0audio/easyeffects/Makefile
+1-01 files

FreeBSD/ports c432742 — sysutils/calamares Makefile

sysutils/calamares: Add missing dependencies
DeltaFile
+2-1sysutils/calamares/Makefile
+2-11 files

FreeBSD/ports 50e8e19 — net-p2p/tremotesf Makefile

net-p2p/tremotesf: Add missing dependencies
DeltaFile
+2-1net-p2p/tremotesf/Makefile
+2-11 files

FreeBSD/ports eb8c707 — deskutils/copyq Makefile

deskutils/copyq: Add missing dependencies
DeltaFile
+2-1deskutils/copyq/Makefile
+2-11 files

FreeBSD/ports 8650ecd — x11/lightdm-kde-greeter Makefile

x11/lightdm-kde-greeter: Add missing dependencies
DeltaFile
+2-1x11/lightdm-kde-greeter/Makefile
+2-11 files

FreeBSD/ports a0617f9 — x11-themes/Kvantum Makefile

x11-themes/Kvantum: Add missing dependencies
DeltaFile
+2-1x11-themes/Kvantum/Makefile
+2-11 files

LLVM/project 68f57fb — mlir/lib/Dialect/Tosa/IR TosaOps.cpp, mlir/lib/Dialect/Tosa/Transforms TosaValidation.cpp

[mlir][tosa] Move reshape num elements check into verifier (#243920)

In https://github.com/llvm/llvm-project/pull/239046 the element count
check was moved to the validation pass as part of the migrations for
https://github.com/llvm/llvm-project/issues/233457. However, the check
is not dependent on the values of the 'shape' input, therefore making
the check local to the operations and, as a result, valid for checking
in the verifier. This ensures invalid IR is detected earlier.

Small cleanup in validation to align error if comment with the
specification for easier reference.
DeltaFile
+23-0mlir/test/Dialect/Tosa/verifier.mlir
+0-10mlir/test/Dialect/Tosa/tosa-validation-invalid.mlir
+1-9mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp
+9-0mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
+33-194 files

FreeBSD/ports 5db24ea — mail/rspamd Makefile distinfo, mail/rspamd/files patch-CMakeLists.txt

mail/rspamd: Update to 4.3.1

Adds the dynconf framework: runtime overrides of plugin options,
actions and scores with file and Redis backends, managed through
rspamadm configdump --dynamic and new controller endpoints.  Selected
symbols can be timed on every scan and stored in ClickHouse, and RBL
rules get a per-message cap on DNS requests.

Fixes include all DKIM results being hidden by one unresolved
signature, SPF reporting a malformed domain as a DNS failure, external
scanners passing error replies as clean, forked workers drawing the
same random sequences, and use-after-free bugs in lua_tcp.

Incompatible changes: the legacy dynamic_conf file and Redis hash are
imported into dynconf once (the file is renamed), time intervals are
parsed strictly ("500ms" is now milliseconds, unknown units are
rejected), and the order of unsorted task URLs differs between
processes.


    [4 lines not shown]
DeltaFile
+11-0mail/rspamd/files/patch-CMakeLists.txt
+7-0mail/rspamd/pkg-plist
+3-3mail/rspamd/distinfo
+1-1mail/rspamd/Makefile
+22-44 files

FreeBSD/ports 1e357b3 — japanese/fcitx5-hazkey Makefile distinfo

japanese/fcitx5-hazkey: fix build on powerpc64le

The bundled llama.cpp also redefines bool to _Bool on POWER9, which
breaks the C++ files. Pull in the upstream fix for that too.
DeltaFile
+3-1japanese/fcitx5-hazkey/distinfo
+2-1japanese/fcitx5-hazkey/Makefile
+5-22 files

FreeBSD/ports 350518a — misc/pytorch pkg-plist

misc/pytorch: fix packaging on !amd64

The 2.15.0 update regenerated pkg-plist on amd64 and dropped the
%%AMD64%% markers again. The bundled oneDNN and ittapi files are only
installed on amd64.
DeltaFile
+64-64misc/pytorch/pkg-plist
+64-641 files

FreeBSD/ports 4da8812 — misc/mcp-inspector distinfo.powerpc64le distinfo.powerpc64

misc/mcp-inspector: fix powerpc64* distinfo

bae77909aea6 replaced them with copies of distinfo.aarch64, so every
entry pointed to mcp-inspector/aarch64 and fetch failed. Restore the
files from 319a0707ad01.

Approved by:    portmgr (blanket)
DeltaFile
+1,335-1,335misc/mcp-inspector/distinfo.powerpc64le
+1,335-1,335misc/mcp-inspector/distinfo.powerpc64
+2,670-2,6702 files

FreeBSD/ports fda46c9 — www/nyxt/files patch-__build_idna_decode.lisp

www/nyxt: fix build on powerpc64le

SBCL 2.6.10 found another bug in idna's dead preserve-case code,
nconc is used there on a vector.
DeltaFile
+17-1www/nyxt/files/patch-__build_idna_decode.lisp
+17-11 files

FreeBSD/ports 3cf61e9 — security/dropbear Makefile

security/dropbear: fix GROUP1 and SHA1_96 options, add TRACE

GROUP1 and SHA1_96 are disabled by default upstream, so enabling them
did nothing. SHA1_96 also needs SHA1, otherwise connections using it
die with "HMAC error". MD5 is gone upstream, so remove it.

TRACE builds in the debug output enabled with -v.

PR:             300936
Submitted by:   Toshimichi Masubuchi <t.masub at gmail.com>
DeltaFile
+11-10security/dropbear/Makefile
+11-101 files

FreeBSD/ports a945d40 — sysutils/rust-coreutils Makefile Makefile.crates, sysutils/rust-coreutils/files symlink-install-helper.sh.in patch-src_uucore_src_lib_mods_locale.rs

sysutils/rust-coreutils: update to 0.13.0

Install manual pages and shell completions. Install libstdbuf.so
instead of having stdbuf unpack it to a temporary directory on every
run. Add NLS option and CPE information. Drop the locale patch, it's
upstream now.

Changelog:      https://github.com/uutils/coreutils/releases/tag/0.13.0
DeltaFile
+3,076-2,630sysutils/rust-coreutils/pkg-plist
+229-305sysutils/rust-coreutils/distinfo
+113-151sysutils/rust-coreutils/Makefile.crates
+43-28sysutils/rust-coreutils/Makefile
+0-36sysutils/rust-coreutils/files/patch-src_uucore_src_lib_mods_locale.rs
+0-2sysutils/rust-coreutils/files/symlink-install-helper.sh.in
+3,461-3,1526 files

FreeBSD/ports 4d370c9 — devel/hs-git-annex/files patch-__cabal__deps_blake3-0.3.1_blake3.cabal

devel/hs-git-annex: fix build on powerpc64*

blake3, which git-annex now uses, builds its x86 SIMD code on every
architecture. Backport hs-blake3 2a3b564ad9, which only builds it on x86.
DeltaFile
+50-0devel/hs-git-annex/files/patch-__cabal__deps_blake3-0.3.1_blake3.cabal
+50-01 files

FreeBSD/ports 3b25e62 — textproc/elasticsearch95 Makefile, textproc/elasticsearch95/files patch-build-tools_src_main_java_org_elasticsearch_gradle_Architecture.java

textproc/elasticsearch95: enable on powerpc64*

Approved by:    portmgr (blanket)
DeltaFile
+17-0textproc/elasticsearch95/files/patch-build-tools_src_main_java_org_elasticsearch_gradle_Architecture.java
+8-1textproc/elasticsearch95/Makefile
+25-12 files

FreeBSD/ports 7d8d19d — lang/gnustep-base distinfo Makefile

lang/gnustep-base: fix NSDate on big-endian

Small NSDate objects are stored as tagged pointers using bit-fields laid
out for little-endian. On powerpc64 the tag ends up in the wrong bits, so
depending on the current time dates turn into bogus pointers and GNUstep
tools like autogsdoc crash. Pull the upstream fix.

Approved by:    portmgr (blanket)
DeltaFile
+4-1lang/gnustep-base/Makefile
+3-1lang/gnustep-base/distinfo
+7-22 files

FreeBSD/ports ac1f5e2 — science/miss3d Makefile

science/miss3d: enable on powerpc64*

It builds fine on both powerpc64 and powerpc64le.

Approved by:    portmgr (blanket)
DeltaFile
+1-1science/miss3d/Makefile
+1-11 files

FreeBSD/ports 8d31028 — science/medcoupling Makefile

science/medcoupling: enable on powerpc64*

It builds fine on both powerpc64 and powerpc64le.

Approved by:    portmgr (blanket)
DeltaFile
+1-1science/medcoupling/Makefile
+1-11 files

FreeBSD/ports 018da92 — science/mgis Makefile

science/mgis: enable on powerpc64*

It builds fine on both powerpc64 and powerpc64le.

Approved by:    portmgr (blanket)
DeltaFile
+1-1science/mgis/Makefile
+1-11 files

LLVM/project 92e474e — llvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp, llvm/test/CodeGen/X86 var-permute-128.ll pext-vector-512.ll

[DAG] isGuaranteedNotToBeUndefOrPoison - always handle Constant/ConstantFP nodes (#245062)

Similar to the other DAG value tracking methods - always process
Constant/ConstantFP nodes, don't limit them to MaxRecursionDepth like
heavy nodes.
DeltaFile
+4-10llvm/test/CodeGen/X86/freeze-vector.ll
+5-5llvm/test/CodeGen/X86/pext-vector-512.ll
+5-5llvm/test/CodeGen/X86/pext-vector-256.ll
+5-5llvm/test/CodeGen/X86/pext-vector-128.ll
+4-4llvm/test/CodeGen/X86/var-permute-128.ll
+2-5llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+25-346 files

FreeBSD/ports 50fd1c1 — net/tcpslice Makefile distinfo

net/tcpslice: update to 1.9
DeltaFile
+3-3net/tcpslice/distinfo
+1-1net/tcpslice/Makefile
+4-42 files

LLVM/project c191e2c — mlir/lib/Conversion/SPIRVToLLVM SPIRVToLLVM.cpp, mlir/test/Conversion/SPIRVToLLVM arithmetic-ops-to-llvm.mlir

[mlir][SPIR-V] Add SPIRVToLLVM conversion for spirv.Dot (#244376)
DeltaFile
+25-1mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
+14-0mlir/test/Conversion/SPIRVToLLVM/arithmetic-ops-to-llvm.mlir
+39-12 files

LLVM/project eb71d6d — mlir/docs SPIRVToLLVMDialectConversion.md, mlir/lib/Conversion/SPIRVToLLVM SPIRVToLLVM.cpp

[mlir][SPIR-V] Add SPIRVToLLVM conversion for MemoryBarrier (#242806)
DeltaFile
+33-0mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
+22-0mlir/test/Conversion/SPIRVToLLVM/barrier-ops-to-llvm.mlir
+0-1mlir/docs/SPIRVToLLVMDialectConversion.md
+55-13 files

LLVM/project 45ae80e — mlir/include/mlir/Dialect/SPIRV/IR SPIRVBase.td SPIRVMemoryOps.td, mlir/test/Dialect/SPIRV/IR memory-ops.mlir

[mlir][SPIR-V] Add PtrEqual and PtrNotEqual ops (#242824)
DeltaFile
+90-0mlir/include/mlir/Dialect/SPIRV/IR/SPIRVMemoryOps.td
+58-0mlir/test/Dialect/SPIRV/IR/memory-ops.mlir
+12-0mlir/test/Target/SPIRV/memory-ops.mlir
+3-0mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
+163-04 files

LLVM/project d64ee52 — .github/workflows libc-fullbuild-tests.yml

Move it into a new job so that the original remains untouched
DeltaFile
+8-0.github/workflows/libc-fullbuild-tests.yml
+8-01 files

LLVM/project b1d0d52 — .github/workflows libc-fullbuild-tests.yml

[lic] Enable baremetal Armv6-M no-FP premerge tests
DeltaFile
+1-1.github/workflows/libc-fullbuild-tests.yml
+1-11 files

LLVM/project 4fa0e45 — libc/cmake/caches/arm-testing armv6m-none-eabi.cmake

[libc] Prepare a new armv6m-none-eabi.cmake to run tests (#243454)

Create a new CMake cache file in a dedicated Arm-specific folder for
testing configurations. This specific testing configuration is for
Armv6-M.

All the configurations are based on what Arm Toolchain for Embedded uses
for its downstream testing, and are known to work.
DeltaFile
+54-0libc/cmake/caches/arm-testing/armv6m-none-eabi.cmake
+54-01 files