LLVM/project 860153e — llvm/include/llvm/IR RuntimeLibcalls.h, llvm/lib/IR RuntimeLibcalls.cpp

[RuntimeLibcalls] Model wchar_t arguments in libcall signatures

RuntimeLibcalls could describe int, size_t and several other C types
but had no way to describe wchar_t, so a libcall taking one could not
be declared with the correct parameter type and extension attribute.
The width of wchar_t is not a property of the triple alone: it can be
overridden by the wchar_size module flag, as -fshort-wchar does.

Add a WChar FuncArgType that converts to an integer of
Module::getWCharSize() bits, and derive its extension attribute in
RuntimeLibcallsInfo::getExtAttrForWCharParam.

Declare wmemset using the new type. A wchar_t as wide as int is
sign-extended wherever int is, so targets such as RISC-V, MIPS, PowerPC
and SystemZ now get signext on it, while AIX, z/OS and VE, where it is
unsigned, get zeroext.

Assisted-by: Claude
DeltaFile
+50-0llvm/lib/IR/RuntimeLibcalls.cpp
+39-0llvm/test/Transforms/Util/DeclareRuntimeLibcalls/wchar-default.ll
+29-0llvm/test/Transforms/Util/DeclareRuntimeLibcalls/wchar-short.ll
+5-0llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+5-0llvm/include/llvm/IR/RuntimeLibcalls.h
+4-0llvm/test/Transforms/Util/DeclareRuntimeLibcalls/windows.ll
+132-016 files not shown
+159-022 files

LLVM/project 7e639b7 — llvm/include/llvm/IR RuntimeLibcalls.h, llvm/lib/CodeGen TargetLoweringBase.cpp

[RuntimeLibcalls] Add WCharSize field to RuntimeLibcallsInfo (NFC) (#241679)

`convertToIRType()` will need to know `wchar_t` size.
Make it available via private field of RuntimeLibcallsInfo.

Assisted-by: Claude
DeltaFile
+13-11llvm/lib/IR/RuntimeLibcalls.cpp
+2-1llvm/include/llvm/IR/RuntimeLibcalls.h
+1-0llvm/lib/CodeGen/TargetLoweringBase.cpp
+16-123 files

LLVM/project 91179f8 — llvm/lib/IR Attributes.cpp

IR: Check for overlap before copying in AttributeSet::removeAttributes (#242957)

removeAttributes copied the whole set into an AttrBuilder to check if
the mask overlaps it, which it usually doesn't. Check the attributes
of directly with the mask and only build the AttrBuilder if something
needs to be removed.

callgrind instructions, opt -O3: kimwitu++ k.bc -0.16%, SPASS cnf.bc
-0.08%. CTMark instructions:u: ThinLTO -0.02% (kimwitu++ -0.06%)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+2-2llvm/lib/IR/Attributes.cpp
+2-21 files

LLVM/project 5ebf42e — lldb/source/Plugins/ObjectFile/Mach-O ObjectFileMachO.cpp, llvm/include/llvm/IR IntrinsicsAMDGPU.td

Merge branch 'main' into users/ellishg/objdump-relative-method-list-fix-ptr-size
DeltaFile
+791-1,543lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+752-1,412llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.320bit.ll
+604-1,128llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.256bit.ll
+0-1,166llvm/test/CodeGen/RISCV/GlobalISel/orc-b-combine.mir
+326-656llvm/include/llvm/IR/IntrinsicsAMDGPU.td
+287-564llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+2,760-6,469427 files not shown
+12,167-11,487433 files

LLVM/project b8142d0 — mlir/lib/Dialect/MemRef/Transforms CMakeLists.txt MemorySlotInterfacesImpl.cpp, mlir/lib/Dialect/Vector/Transforms MemorySlotInterfacesImpl.cpp

[mlir][memref] Promote buffers accessed via memref.copy (#232078)

This PR is a follow-up of #217793, which taught Mem2Reg to promote
buffers accessed through dynamic subviews and masked transfers.

This PR adds a `PromotableMemOpInterface` model for `memref.copy`. A
copy into the slot becomes a `vector.transfer_read` of the source, a
copy out becomes a `vector.transfer_write` to the target, and a copy
between two slots is rewritten one slot at a time so both buffers
disappear.

The transfers are built with
createReadOrMaskedRead/createWriteOrMaskedWrite. A copy from or to a
dynamically shaped memref now produces vector.mask {
vector.transfer_read/write }, and Mem2Reg promotes it through the
vector.mask model (#233705, #234251).
 
This PR also reorganizes the Mem2Reg tests. Since this logic spans the
MemRef and Vector dialects, there is no obvious dialect sub-directory

    [14 lines not shown]
DeltaFile
+302-0mlir/test/Transforms/Mem2Reg/memref-copy.mlir
+80-6mlir/lib/Dialect/MemRef/Transforms/MemorySlotInterfacesImpl.cpp
+2-2mlir/lib/Dialect/Vector/Transforms/MemorySlotInterfacesImpl.cpp
+1-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-0mlir/lib/Dialect/MemRef/Transforms/CMakeLists.txt
+386-85 files

FreeBSD/ports 37d9338 — Mk/Uses electron.mk

Mk/Uses/electron.mk: Add 45 to valid electron versions

This was missing in the commit which added devel/electron45.

Fixes:          e1d5a92cadde (devel/electron45: Add port: Build cross-platform desktop apps with JavaScript, HTML, and CSS)
DeltaFile
+1-1Mk/Uses/electron.mk
+1-11 files

LLVM/project dc3fabc — llvm/lib/Support StringRef.cpp

[Support] Name the vector width in rfindByte

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+4-3llvm/lib/Support/StringRef.cpp
+4-31 files

LLVM/project d227ef9 — compiler-rt/lib/scudo/standalone wrappers_c.cpp wrappers_c_checks.h, compiler-rt/lib/scudo/standalone/tests wrappers_c_test.cpp

[scudo] Relax aligned_alloc restrictions. (#237352)

The standard for aligned_alloc relaxed the restriction on the size
parameter. Update the code to only disallow non-power of two alignments.
DeltaFile
+16-1compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp
+0-6compiler-rt/lib/scudo/standalone/wrappers_c_checks.h
+1-1compiler-rt/lib/scudo/standalone/wrappers_c.cpp
+17-83 files

LLVM/project 828ca88 — llvm/docs/CommandGuide llvm-ir2vec.md, llvm/test/tools/llvm-ir2vec target-options.mir

[llvm-ir2vec] Add -mtriple and codegen flags for MIR input (#242993)

MIR without an IR section was parsed for the host triple and -mcpu was
rejected since codegen flags became library options
DeltaFile
+21-0llvm/test/tools/llvm-ir2vec/target-options.mir
+9-2llvm/tools/llvm-ir2vec/llvm-ir2vec.cpp
+9-0llvm/docs/CommandGuide/llvm-ir2vec.md
+39-23 files

OpenBSD/ports fJP0Mi7 — math/eigen3 distinfo Makefile, math/eigen3/patches patch-Eigen_src_Core_util_ConfigureVectorization_h

   Update to eigen3 3.4.1.

   From Brad, thanks
VersionDeltaFile
1.1+15-0math/eigen3/patches/patch-Eigen_src_Core_util_ConfigureVectorization_h
1.17+3-2math/eigen3/Makefile
1.5+2-2math/eigen3/distinfo
1.6+1-1math/eigen3/pkg/PLIST
+21-54 files

OpenBSD/ports b8EBt0E — graphics/blender distinfo Makefile, graphics/blender/patches patch-intern_ghost_intern_GHOST_WindowWayland_cc patch-intern_ghost_CMakeLists_txt

   Update to Blender 4.5.16.

   - Build atomic_ops without libatomic; drop atomic from WANTLIB.
   - Use the system Eigen (math/eigen3).
   - Garbage collect the ONLY_FOR_ARCHS comments; 32-bit archs
     are not coming back.

   from Brad, thanks
VersionDeltaFile
1.3+42-6graphics/blender/patches/patch-intern_ghost_intern_GHOST_SystemWayland_cc
1.1+16-0graphics/blender/patches/patch-intern_ghost_CMakeLists_txt
1.160+6-5graphics/blender/Makefile
1.3+4-2graphics/blender/patches/patch-intern_ghost_intern_GHOST_WindowWayland_cc
1.38+1-4graphics/blender/pkg/PLIST
1.42+2-2graphics/blender/distinfo
+71-196 files

LLVM/project d7db3cc — llvm/lib/Target/AMDGPU AMDGPUTargetTransformInfo.h AMDGPUInstCombineIntrinsic.cpp

[AMDGPU][NFC] Reduce simplifyAMDGCNMemoryIntrinsicDemanded arguments (#242200)

Follow-up to #240750, suggested in its review.
`simplifyAMDGCNMemoryIntrinsicDemanded` now takes only `IC`, `II` and
`DemandedElts`:
- it is a `GCNTTIImpl` member, like
`simplifyAMDGCNLaneIntrinsicDemanded`, so it reads the subtarget from
the class;
- `IsLoad` and the dmask operand index are derived from the intrinsic
(stores return void; image stores have the dmask after the stored
value).

No functional change.

Assisted-by: Claude Opus 5.5
DeltaFile
+15-23llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
+4-0llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
+19-232 files

LLVM/project 08177da — llvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU inline-asm-convergent-exec-use.ll

Revert "[AMDGPU] Add implicit EXEC use to convergent inline asm (#242981)" (#243343)

This reverts commit daba4935fe66785f5452a3280c65925223b1c888.

This is not how this should be implemented
DeltaFile
+0-34llvm/test/CodeGen/AMDGPU/inline-asm-convergent-exec-use.ll
+4-8llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+4-422 files

LLVM/project f522535 — llvm/lib/Target/AMDGPU GCNHazardRecognizer.cpp, llvm/test/CodeGen/AMDGPU hazard-shift64.mir

[AMDGPU] Ignore call clobbers in `fixShift64HiggRegBug` hazard check

The check for `fixShift64HighRegBug` checks the reg mask to find if
the next higher register is in use. This can give false positives.
Update it to only check for the actual registers which are used,
which is more conservative in some cases, but should help avoid miscompiles.

This bug was found due to a wrong result being computed in device libs with ASAN enabled.
DeltaFile
+4-3llvm/test/CodeGen/AMDGPU/hazard-shift64.mir
+3-1llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
+7-42 files

LLVM/project fc418bf — llvm/include/llvm/Support KnownFPClass.h, llvm/lib/Support KnownFPClass.cpp

[KnownFPClass][NFC] Move KnownFPClass::square out-of-line (#243342)

Moves `KnownFPClass::square` out-of-line. The only change is that
`applyOutputDenormalMode` is applied after `propagateNonNaN` and
`knownNot(fcNegative)`, but this change is unobservable.
DeltaFile
+15-0llvm/lib/Support/KnownFPClass.cpp
+2-8llvm/include/llvm/Support/KnownFPClass.h
+17-82 files

LLVM/project 6d63394 — llvm/test/CodeGen/AMDGPU hazard-shift64.mir

[NFC][AMDGPU] Pre-commit test for `fixShift64HighRegBug` fix
DeltaFile
+84-0llvm/test/CodeGen/AMDGPU/hazard-shift64.mir
+84-01 files

NetBSD/src 3BLxLEb — sys/arch/m68k/m68k genassym.cf

   Protect a few more things from _MODULE.
VersionDeltaFile
1.13+5-2sys/arch/m68k/m68k/genassym.cf
+5-21 files

LLVM/project 9df5085 — llvm/lib/Target/LoongArch LoongArchISelLowering.cpp, llvm/test/CodeGen/LoongArch/lasx scalar-load-to-vector.ll build-vector.ll

[LoongArch] Legalize BUILD_VECTOR into a broadcast when all non-undef elements are identical (#169755)

When a BUILD_VECTOR consists of the same element (ignoring undefs),
it is better emitting a broadcast instead of multiple insertions.

Some cases which suffer performance regressions or have no benefits are
excluded in this commit.
DeltaFile
+10-40llvm/test/CodeGen/LoongArch/lasx/build-vector.ll
+42-5llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+7-19llvm/test/CodeGen/LoongArch/lsx/build-vector.ll
+7-8llvm/test/CodeGen/LoongArch/lsx/scalar-load-to-vector.ll
+7-8llvm/test/CodeGen/LoongArch/lasx/scalar-load-to-vector.ll
+4-6llvm/test/CodeGen/LoongArch/lasx/ir-instruction/insertelement.ll
+77-864 files not shown
+89-10410 files

LLVM/project 602ecd3 — llvm/include/llvm/IR RuntimeLibcalls.h, llvm/lib/IR RuntimeLibcalls.cpp

[RuntimeLibcalls] Model wchar_t arguments in libcall signatures

RuntimeLibcalls could describe int, size_t and several other C types
but had no way to describe wchar_t, so a libcall taking one could not
be declared with the correct parameter type and extension attribute.
The width of wchar_t is not a property of the triple alone: it can be
overridden by the wchar_size module flag, as -fshort-wchar does.

Add a WChar FuncArgType that converts to an integer of
Module::getWCharSize() bits, and derive its extension attribute in
RuntimeLibcallsInfo::getExtAttrForWCharParam.

Declare wmemset using the new type. A wchar_t as wide as int is
sign-extended wherever int is, so targets such as RISC-V, MIPS, PowerPC
and SystemZ now get signext on it, while AIX, z/OS and VE, where it is
unsigned, get zeroext.

Assisted-by: Claude
DeltaFile
+50-0llvm/lib/IR/RuntimeLibcalls.cpp
+39-0llvm/test/Transforms/Util/DeclareRuntimeLibcalls/wchar-default.ll
+29-0llvm/test/Transforms/Util/DeclareRuntimeLibcalls/wchar-short.ll
+5-0llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+5-0llvm/include/llvm/IR/RuntimeLibcalls.h
+4-0llvm/test/Transforms/Util/DeclareRuntimeLibcalls/windows.ll
+132-016 files not shown
+159-022 files

LLVM/project 1332766 — llvm/include/llvm/IR RuntimeLibcalls.h, llvm/lib/CodeGen TargetLoweringBase.cpp

Store WCharSize in RuntimeLibcallsInfo instead
DeltaFile
+29-32llvm/lib/IR/RuntimeLibcalls.cpp
+9-5llvm/include/llvm/IR/RuntimeLibcalls.h
+6-4llvm/lib/Target/ARM/ARMISelLowering.cpp
+2-2llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
+2-2llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+3-1llvm/lib/CodeGen/TargetLoweringBase.cpp
+51-463 files not shown
+57-519 files

LLVM/project e354e54 — libcxx/include/__type_traits invoke.h, libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con F_incomplete.pass.cpp

[libc++] Turn std::__is_invocable_r back into a struct to restore lazy instantiation for short-circuiting (#242084)

The test is AI-generated.
DeltaFile
+19-0libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp
+1-1libcxx/include/__type_traits/invoke.h
+20-12 files

LLVM/project 9e7e532 — lld/MachO SyntheticSections.cpp ConcatOutputSection.cpp, lld/test/MachO arm64-thunk-visibility.s

[lld-macho] Keep branch-range extension thunks out of the symbol table

Make every branch-range extension thunk a local symbol. Until now,
thunks to external functions were added to the global symbol table as
private externs, and thunks to local functions had no symbol in the
output at all. This matches ld64 and ld-prime, which both emit every
branch island as a local symbol.

This also means that address assignment no longer adds anything to the
global symbol table, so code that reads it can run concurrently with
address assignment without any synchronization. A follow-up uses this to
prepare the export trie and the symbol table section while addresses are
being assigned.

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+5-14lld/MachO/ConcatOutputSection.cpp
+12-0lld/test/MachO/arm64-thunk-visibility.s
+8-0lld/MachO/SyntheticSections.cpp
+25-143 files

LLVM/project 8ee8e3e — lldb/include/lldb/Symbol Symtab.h, lldb/source/Plugins/SymbolFile/DWARF ManualDWARFIndex.cpp

[lldb] Remove empty/corrupt DataFileCache symtab/dwarf-index (#242081)

The symtab and dwarf-index DataFileCache files have the full filepath
and arch of the file used in the filename, and then in the contents of
the file there is a CacheSignature. The CacheSignature is intended to
change when the file is rebuilt, so we can detect that a binary has been
rebuilt and remove the old cached results.

This CacheSignature is performed in ManualDWARFIndex::Decode and
Symtab::Decode,

```
  bool Decode(const DataExtractor &data, lldb::offset_t *offset_ptr,
              bool &uuid_mismatch);
```

This method sets `uuid_mismatch=true` when that has been detected. It
returns false when the file is empty or corrupt. The callers only
handled the first case,

    [17 lines not shown]
DeltaFile
+69-0lldb/test/API/functionalities/module_cache/debug_index/TestDebugIndexCacheInvalidFile.py
+23-2lldb/test/API/functionalities/module_cache/symtab_state/TestSymtabState.py
+6-9lldb/source/Symbol/Symtab.cpp
+6-9lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
+3-8lldb/unittests/Symbol/SymtabTest.cpp
+1-6lldb/include/lldb/Symbol/Symtab.h
+108-341 files not shown
+109-367 files

LLVM/project 0f21117 — llvm/include/llvm/IR RuntimeLibcalls.h, llvm/lib/CodeGen DwarfEHPrepare.cpp

[RuntimeLibcalls] Take the module in libcall signature converters (NFC)

The converters that turn declaration C type descriptions into IR types
and attributes take a context, a triple and a data layout. A libcall
declaration can also depend on properties recorded in the module itself
rather than in the triple, so pass the module instead and derive all
three from it.

Change getDefaultFunctionTy, getFunctionTy, getVariableType and the
static helpers they use to take a Module, and update the callers. No
functional change intended.

Assisted-by: Claude
DeltaFile
+27-22llvm/lib/IR/RuntimeLibcalls.cpp
+4-7llvm/include/llvm/IR/RuntimeLibcalls.h
+4-6llvm/lib/Target/ARM/ARMISelLowering.cpp
+2-2llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
+2-2llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+2-2llvm/lib/CodeGen/DwarfEHPrepare.cpp
+41-413 files not shown
+45-479 files

LLVM/project da5bde5 — mlir/test/Integration/Dialect/Linalg/CPU test-tensor-e2e.mlir

[mlir][test] Lower SCF before arith in test-tensor-e2e.mlir (#243330)

Fixes a2ab97c563d8 (#241196).

Buffer deallocation now emits a @dealloc_helper with scf.for loops, and
lowering them in -convert-scf-to-cf creates arith ops after
-convert-arith-to-llvm has already run. Run -convert-scf-to-cf first, as
the sibling tests do.

Assisted-by: Gemini
DeltaFile
+1-1mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-e2e.mlir
+1-11 files

LLVM/project a5bda4b — llvm/lib/Target/RISCV RISCVVLOptimizer.cpp, llvm/test/CodeGen/RISCV/rvv vl-opt.mir vl-opt.ll

[RISCV] Fix VL optimizer crash on frame-index slide amount (#243340)

Fixes #237044.

`RISCVVLOptimizer` runs before PrologEpilogInserter, so an
alloca-derived
`vslidedown` slide amount reaches `getMinimumVLForVSLIDEDOWN_VX` as
`ADDI %stack.N, -1`. The helper called `getReg()` on the ADDI's first
operand
without checking that it is a register, which asserts on the frame
index.

Bail out when the operand is not a register. `VSLIDEDOWN` reads past VL,
so
the caller conservatively demands VLMAX, as before.

Tests:
- `CodeGen/RISCV/rvv/vl-opt.mir`: new frame-index MIR case (fails with
the

    [7 lines not shown]
DeltaFile
+21-0llvm/test/CodeGen/RISCV/rvv/vl-opt.ll
+16-0llvm/test/CodeGen/RISCV/rvv/vl-opt.mir
+1-0llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
+38-03 files

LLVM/project 535db5a — lldb/source/Plugins/ObjectFile/Mach-O ObjectFileMachO.cpp

[lldb] Share the nlist parser with the shared cache locals (#242604)

On embedded, ParseSymtab had a second copy of the nlist parser for the
local symbols that the shared cache keeps out of the mapped image. No
macOS build compiles that copy and it had drifted from the main one.

Hoist ParseSymbolLambda, add ParseNListsLambda for the two-pass walk,
and call it for both tables.

This changes behavior on embedded:

- The unmapped locals pick up the fixes the copy missed: the two-pass
merge, N_WEAK_REF, and the section check before recording a symbol
address.
- Symbol IDs are LC_SYMTAB indexes again. 4bddca306a45 restarted them at
zero after skipping the mapped locals, so they no longer matched the
indexes the stub lookup uses.
- The unmapped locals are parsed after LC_SYMTAB and numbered from
nsyms. They all had ID 0 before. Symtab::FindSymbolByID is a binary

    [2 lines not shown]
DeltaFile
+772-1,547lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+772-1,5471 files

LLVM/project 6d392b0 — llvm/include/llvm/CodeGen BasicTTIImpl.h, llvm/lib/Target/AArch64 AArch64TargetTransformInfo.cpp

[TTI] Pass TLibInfo to the getArithmeticInstrCost implementations
DeltaFile
+6-6llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+5-3llvm/include/llvm/CodeGen/BasicTTIImpl.h
+3-3llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
+3-3llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp
+3-2llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+2-2llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+22-1921 files not shown
+46-2927 files

LLVM/project f02d584 — .github/workflows prune-branches.yml

[GitHub] Disable prune unused branches workflow (#243351)

This is deleting people's branches despite PRs being open.

Fire fighting for #242951
DeltaFile
+0-2.github/workflows/prune-branches.yml
+0-21 files

HardenedBSD/src 032353d — lib/libthr/tests pthread_mutex_clocklock_test.c pthread_rwlock_clocklock_test.c, lib/libthr/thread thr_rwlock.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+528-0lib/libthr/tests/pthread_rwlock_clocklock_test.c
+489-0lib/libthr/tests/pthread_mutex_clocklock_test.c
+115-43sys/kern/kern_umtx.c
+143-6sys/kern/vfs_lookup.c
+62-45lib/libthr/thread/thr_rwlock.c
+63-14share/man/man3/pthread_mutex_timedlock.3
+1,400-10819 files not shown
+1,691-24725 files