LLVM/project a9a6edbllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/PhaseOrdering/X86 avg.ll

[SLP]Vectorize single-user instructions as the last-attempt seeds

Instructions with the single user cost one extract per lane, so they are
vectorized after all other roots in the function are exhausted, grouped by
the key/subkey pairs. Loads, addresses, compares and the operations, folded
away or contracted into the scalar FMA, are excluded. The rejected bundles
and the members of the priced minimal nodes are not retried, unless the
tree was dropped by the repacking overhead rather than by the members.

Reviewers: hiraditya, RKSimon, bababuck

Pull Request: https://github.com/llvm/llvm-project/pull/212579
DeltaFile
+301-86llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+145-94llvm/test/Transforms/PhaseOrdering/X86/avg.ll
+33-66llvm/test/Transforms/SLPVectorizer/X86/intrinsic.ll
+49-30llvm/test/Transforms/SLPVectorizer/insert-element-build-vector.ll
+48-30llvm/test/Transforms/SLPVectorizer/insert-element-build-vector-inseltpoison.ll
+35-36llvm/test/Transforms/SLPVectorizer/X86/reused-mask-with-poison-index.ll
+611-34238 files not shown
+1,020-73144 files

LLVM/project ab4f210clang/include/clang/Basic OffloadArch.h, clang/lib/Basic Cuda.cpp

clang: Replace Is*OffloadArch free functions with OffloadArch methods (#213363)
DeltaFile
+29-19clang/unittests/Basic/OffloadArchTest.cpp
+6-6clang/lib/Driver/Driver.cpp
+0-9clang/include/clang/Basic/OffloadArch.h
+4-4clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
+2-2clang/lib/Basic/Cuda.cpp
+1-1clang/lib/Driver/ToolChains/Clang.cpp
+42-411 files not shown
+43-427 files

LLVM/project 08a8739lldb/bindings/interface SBValueListExtensions.i SBValueExtensions.i, lldb/bindings/python python-extensions.swig python.swig

[lldb][Python] Inline `lldb_iter` for better type inference (#214000)

Currently, the `lldb_iter` helper is used for providing `__iter__` in
the Python bindings:
```python
def lldb_iter(obj, getsize, getelem):
    """A generator adaptor to support iteration for lldb container objects."""
    size = getattr(obj, getsize)
    elem = getattr(obj, getelem)
    for i in range(size()):
        yield elem(i)
```

A type checker or LSP can't see through this function. Currently, that's
no problem, because it doesn't know the return type of any Swig wrapper,
but when we add type annotations (hopefully with Swig 4.5 in #213463),
`__iter__` remains untyped. So iterating through the wrappers won't show
the correct type.

As the functionality is fairly simple, it's easier to inline it. That's
what this PR does. Then a type checker can infer the return type.
DeltaFile
+0-12lldb/bindings/python/python.swig
+6-3lldb/bindings/interface/SBTargetExtensions.i
+6-3lldb/bindings/interface/SBModuleExtensions.i
+2-1lldb/bindings/python/python-extensions.swig
+2-1lldb/bindings/interface/SBValueListExtensions.i
+2-1lldb/bindings/interface/SBValueExtensions.i
+18-2119 files not shown
+56-4025 files

LLVM/project 1f69a16llvm/lib/Target/X86 X86TargetTransformInfo.cpp, llvm/test/Transforms/SLPVectorizer/X86 reduced-value-stored.ll

[CostModel][X86] getArithmeticReductionCost - ensure we test the vXi1 reductions types before legalisation (#211043)

Pre-AVX512 these will be legalized to wider vector types and might match
against other reductions tables.

Noticed while working on improving logic reductions, but hit a case
with/without popcnt for bool sum reduction patterns - I've added a AVX2
test pass to check the (corrected) costs are still working
DeltaFile
+36-46llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+43-19llvm/test/Transforms/SLPVectorizer/X86/reduced-value-stored.ll
+79-652 files

LLVM/project cafd36bclang/include/clang/CIR LoweringHelpers.h, clang/include/clang/CIR/Dialect/IR CIROps.td

[NFC][CIR] Propagate SymbolTables better (#213972)

This came up during self-build, we are spending a lot of time in some
cases looking up using the global symbol table, which does no caching.
Previously we'd propagated this in a few places, but this patch removes
all uses of SymbolTable::lookup and adds the cache everywhere.

This involved changing the tablegen to include it in each of our
rewriters, plus the CirAttr lowering everywhere.

The only thing we have to take care of is to make sure we invalidate the
cache/update the cache whenever we add something with a name (see
createLLVMFuncOpIfNotExist).

This is NFC, as it isn't observable, other than being a build time
improvement.
DeltaFile
+47-34clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+26-28clang/lib/CIR/Lowering/LoweringHelpers.cpp
+6-8clang/include/clang/CIR/LoweringHelpers.h
+5-2clang/utils/TableGen/CIRLoweringEmitter.cpp
+0-6clang/include/clang/CIR/Dialect/IR/CIROps.td
+1-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.h
+85-786 files

LLVM/project c9f2ba2llvm/lib/Target/RISCV RISCVMacroFusionXQCI.td, llvm/test/CodeGen/RISCV macro-fusions-xqci.mir

[RISCV] Fix Xqci Fusions with Frame Indexes (#213815)

Pre-RA, the ADDI can contain a frame index rather than a register, which
causes `getReg()` to assert. These were missing the `CheckIsRegOperand`
that most other fusions have.
DeltaFile
+17-0llvm/test/CodeGen/RISCV/macro-fusions-xqci.mir
+6-1llvm/lib/Target/RISCV/RISCVMacroFusionXQCI.td
+23-12 files

LLVM/project 6326f14clang/lib/CIR/Dialect/Transforms CallConvLoweringPass.cpp, clang/lib/CIR/Dialect/Transforms/TargetLowering CIRABIRewriteContext.cpp

[CIR] Lower variadic calls in CallConvLowering for x86_64 (#213315)

CallConvLowering classified each function once from its declared
signature and reused that classification at every call site. An argument
passed through an ellipsis has no entry in the callee's parameter list,
so on x86_64 an ellipsis argument that needed an extension attribute, a
register coercion, or a byval slot was emitted unchanged whenever the
callee's declared parameters happened to need no rewrite, and reported
NYI when they did.

An ellipsis argument competes for the same registers as a declared one,
so the same two-eightbyte record goes in a register pair early in the
list and byval once the integer registers are gone. Variadic call sites
under the x86_64 driver are now classified from the call's own operand
types, and the declared parameter count reaches
`llvm::abi::FunctionInfo::create` as its `NumRequired` argument, which
is what lets the classifier tell a named argument from one passed
through the ellipsis. Today that flag only decides whether a large
vector goes in a register, and the CIR type bridge admits no vector

    [25 lines not shown]
DeltaFile
+299-0clang/test/CIR/CodeGen/call-conv-lowering-x86_64-variadic.c
+242-37clang/lib/CIR/Dialect/Transforms/CallConvLoweringPass.cpp
+240-0clang/test/CIR/Transforms/abi-lowering/x86_64-variadic-nyi.cir
+209-0clang/test/CIR/Transforms/abi-lowering/x86_64-variadic-call.cir
+62-0clang/test/CIR/Transforms/abi-lowering/x86_64-indirect-try-call.cir
+29-22clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
+1,081-598 files not shown
+1,204-7814 files

FreeBSD/ports 08e73f1mail/thunderbird-esr Makefile distinfo

mail/thunderbird-esr: update to 153.0.2

Release Notes:
  https://www.thunderbird.net/en-US/thunderbird/153.0.2esr/releasenotes/

(cherry picked from commit f8c861d2fa3167afb798578fad1f2f9affc8742b)
DeltaFile
+3-3mail/thunderbird-esr/distinfo
+1-1mail/thunderbird-esr/Makefile
+4-42 files

FreeBSD/ports 8b5d41bmail/thunderbird Makefile distinfo

mail/thunderbird: update to 153.0.2

Release Notes:
  https://www.thunderbird.net/en-US/thunderbird/153.0.2/releasenotes/

(cherry picked from commit a44d0f9f4a1f85ce968a2ffa02cf62b744c38bcb)
DeltaFile
+3-3mail/thunderbird/distinfo
+2-2mail/thunderbird/Makefile
+5-52 files

FreeBSD/ports a047473net/liferea Makefile distinfo

net/liferea: update to 1.16.3

Release Notes:
  https://github.com/lwindolf/liferea/releases/tag/v1.16.13
DeltaFile
+3-3net/liferea/distinfo
+1-1net/liferea/Makefile
+4-42 files

HardenedBSD/src 821937dlib/libc/stdlib memalignment.3, share/man/man4 iflib.4

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+109-45sys/net/iflib.c
+15-41sys/fs/p9fs/p9fs_vfsops.c
+0-27sys/fs/nfsclient/nfs_clrpcops.c
+11-5share/man/man5/pf.conf.5
+10-1share/man/man4/iflib.4
+2-2lib/libc/stdlib/memalignment.3
+147-1213 files not shown
+150-1269 files

HardenedBSD/src b1e81f6lib/libc/stdlib memalignment.3, share/man/man4 iflib.4

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+109-45sys/net/iflib.c
+15-41sys/fs/p9fs/p9fs_vfsops.c
+0-27sys/fs/nfsclient/nfs_clrpcops.c
+11-5share/man/man5/pf.conf.5
+10-1share/man/man4/iflib.4
+2-2lib/libc/stdlib/memalignment.3
+147-1213 files not shown
+150-1269 files

FreeBSD/ports f8c861dmail/thunderbird-esr Makefile distinfo

mail/thunderbird-esr: update to 153.0.2

Release Notes:
  https://www.thunderbird.net/en-US/thunderbird/153.0.2esr/releasenotes/
DeltaFile
+3-3mail/thunderbird-esr/distinfo
+1-1mail/thunderbird-esr/Makefile
+4-42 files

HardenedBSD/ports 81f9dcbmisc/mc6 pkg-plist, misc/qwen-code pkg-plist

Merge branch 'freebsd/main' into hardenedbsd/main
DeltaFile
+811-999net-im/deltachat-desktop/files/packagejsons/pnpm-lock.yaml
+0-802misc/qwen-code/pkg-plist
+631-9misc/qwen-code/files/package-lock.json
+399-0misc/mc6/pkg-plist
+167-179security/arti/distinfo
+82-88security/arti/Makefile.crates
+2,090-2,077131 files not shown
+3,224-2,662137 files

Linux/linux 562bfb5security/integrity/ima ima_appraise.c ima_main.c

Merge tag 'integrity-v7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity

Pull integrity fixes from Mimi Zohar:
 "Two IMA bug fixes: one addresses a potential integer underflow, the
  other instantiates two LSM hooks"

* tag 'integrity-v7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity:
  ima: Instantiate file_truncate and path_truncate hooks
  ima: fix out-of-bounds read in xattr_verify()
DeltaFile
+39-0security/integrity/ima/ima_main.c
+7-2security/integrity/ima/ima_appraise.c
+46-22 files

FreeBSD/ports a44d0f9mail/thunderbird Makefile distinfo

mail/thunderbird: update to 153.0.2

Release Notes:
  https://www.thunderbird.net/en-US/thunderbird/153.0.2/releasenotes/
DeltaFile
+3-3mail/thunderbird/distinfo
+2-2mail/thunderbird/Makefile
+5-52 files

LLVM/project 70ecc5bllvm/test/CodeGen/AMDGPU llvm.amdgcn.intersect_ray.ll, llvm/test/CodeGen/AMDGPU/GlobalISel orn2.ll legalize-extract.mir

Revert "[GlobalISel] Combine merge-unmerge with mixed scalar and vector types" (#214010)

Reverts llvm/llvm-project#213086
DeltaFile
+0-177llvm/test/CodeGen/AMDGPU/GlobalISel/artifact-combiner-unmerge-values.mir
+34-18llvm/test/CodeGen/AMDGPU/llvm.amdgcn.intersect_ray.ll
+34-18llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.intersect_ray.ll
+16-5llvm/test/CodeGen/AMDGPU/GlobalISel/andn2.ll
+12-8llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-extract.mir
+15-4llvm/test/CodeGen/AMDGPU/GlobalISel/orn2.ll
+111-2302 files not shown
+122-2448 files

LLVM/project 5009622llvm/lib/Transforms/InstCombine InstCombineSelect.cpp, llvm/test/Transforms/InstCombine minmax-fp-loop-carried.ll

[InstCombine]Fold fcmp+select to min/max if its zero sign is missing

Look through phis, chained selects and the loop back edge to the
select itself and fold if no use can observe the sign of zero of the
result. This restores the fold for loop-carried and unrolled running
min/max values (fcsel -> fminnm on AArch64) lost to the signed zero
handling fix in matchSelectPattern (#210077).

Reviewers: nikic, dtcxzyw

Pull Request: https://github.com/llvm/llvm-project/pull/213133
DeltaFile
+242-0llvm/test/Transforms/InstCombine/minmax-fp-loop-carried.ll
+31-6llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+273-62 files

LLVM/project 2a2addellvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.fdot2.bf16.bf16.ll

[AMDGPU][GISel] Add RegBankLegalize rules for llvm.amdgcn.fdot2.bf16.bf16 (#214013)
DeltaFile
+76-3llvm/test/CodeGen/AMDGPU/llvm.amdgcn.fdot2.bf16.bf16.ll
+1-1llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+77-42 files

FreeBSD/ports 17e8548security/arti Makefile Makefile.crates

security/arti: Update to 2.5.1
DeltaFile
+167-179security/arti/distinfo
+82-88security/arti/Makefile.crates
+2-3security/arti/Makefile
+251-2703 files

HardenedBSD/ports 17e8548security/arti Makefile Makefile.crates

security/arti: Update to 2.5.1
DeltaFile
+167-179security/arti/distinfo
+82-88security/arti/Makefile.crates
+2-3security/arti/Makefile
+251-2703 files

LLVM/project af14456openmp/runtime/src kmp_invoke_microtask.cpp

[OpenMP] Simplify generic microtask dispatch (#214004)

Replace the generic microtask dispatcher's handwritten function-pointer
types and calls with a variadic-template helper and a macro for each
supported argument count.

The dispatcher still casts each microtask to the exact fixed-arity
signature required by platforms such as WebAssembly. This is intended as
a refactor only: the existing limit of 15 microtask arguments and the
diagnostic for larger argument counts remain unchanged.

This reduces the repetitive code and makes future changes to the
supported argument range easier to review.

Split out from #211071
DeltaFile
+39-110openmp/runtime/src/kmp_invoke_microtask.cpp
+39-1101 files

LLVM/project 5382f7dllvm/lib/Target/AArch64 AArch64TargetTransformInfo.cpp, llvm/test/Analysis/CostModel/AArch64 masked_compress_load.ll

[CostModel][AArch64] Add initial costs for `masked.compressstore` (#213712)

This adds an initial cost model for `masked.compressstore`. The tests
are based on `masked_expand_load.ll`, which covers all configurations
for the `expand`/`compact` instructions.

Note: Right now, we only report valid costs for `masked.compressstore`
operations that can be lowered with SVE1 (as that's all we handle ISEL
for at the moment).
DeltaFile
+281-0llvm/test/Analysis/CostModel/AArch64/masked_compress_load.ll
+15-1llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+296-12 files

LLVM/project 2c52baallvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.cvt.scalef32.sr.pk16.ll llvm.amdgcn.cvt.scale.pk.ll

[AMDGPU][GISel] RegBankLegalize rules for CVT Scale and SR intrinsics
DeltaFile
+352-172llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scalef32.sr.pk.ll
+236-116llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scalef32.pk.gfx950.ll
+115-119llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scalef32.pk.ll
+165-65llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scale.pk.ll
+55-27llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scalef32.sr.pk16.ll
+56-25llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+979-5246 files not shown
+1,015-56212 files

LLVM/project f134fb4llvm/include/llvm/Transforms/Utils LoopPeel.h, llvm/lib/Transforms/Scalar LoopUnrollPass.cpp

[LoopPeel] Peel last iteration to enable load widening

In loops that contain multiple consecutive small loads (e.g., 3 bytes
loading i8's), peeling the last iteration makes it safe to read beyond
the accessed region, enabling the use of a wider load (e.g., b32) for
all other N-1 iterations.

Patterns such as:
```
  %a = load i8, ptr %p
  %b = load i8, ptr %p+1
  %c = load i8, ptr %p+2
  ...
  %p.next = getelementptr i8, ptr %p, 3
```

Can be transformed to:
```
  %wide = load b32, ptr %p     ; Read 4 bytes

    [19 lines not shown]
DeltaFile
+652-131llvm/test/Transforms/LoopUnroll/AArch64/peel-last-iteration-load-widening.ll
+324-10llvm/lib/Transforms/Utils/LoopPeel.cpp
+51-16llvm/test/Transforms/LoopUnroll/AArch64/peel-last-iteration-load-widening-be.ll
+55-0llvm/test/Transforms/LoopUnroll/AArch64/peel-last-iteration-load-widening-disabled.ll
+6-0llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
+6-0llvm/include/llvm/Transforms/Utils/LoopPeel.h
+1,094-1571 files not shown
+1,098-1577 files

FreeBSD/ports 099c07fsysutils/consolekit2 Makefile, sysutils/consolekit2/files patch-src_ck-sysdeps-unix.c

sysutils/consolekit2: Fix XDG_RUNTIME_DIR setting to match what pam_xdg.so sets

PR:             276084
DeltaFile
+60-0sysutils/consolekit2/files/patch-src_ck-sysdeps-unix.c
+1-1sysutils/consolekit2/Makefile
+61-12 files

HardenedBSD/ports 7481795. GIDs, x11/sddm Makefile

x11/sddm: Make it possible to start the greeter under KWin Wayland session

PR:             296052
DeltaFile
+10-0x11/sddm/files/sddm.conf.default
+3-3x11/sddm/Makefile
+1-1GIDs
+1-0x11/sddm/files/sddm-greeter.default
+15-44 files

HardenedBSD/ports 099c07fsysutils/consolekit2 Makefile, sysutils/consolekit2/files patch-src_ck-sysdeps-unix.c

sysutils/consolekit2: Fix XDG_RUNTIME_DIR setting to match what pam_xdg.so sets

PR:             276084
DeltaFile
+60-0sysutils/consolekit2/files/patch-src_ck-sysdeps-unix.c
+1-1sysutils/consolekit2/Makefile
+61-12 files

HardenedBSD/ports 6745284math/stp Makefile

math/stp: Use more accurate fix for the TLS problem

Reported by:    kib
DeltaFile
+1-1math/stp/Makefile
+1-11 files

FreeBSD/ports 6745284math/stp Makefile

math/stp: Use more accurate fix for the TLS problem

Reported by:    kib
DeltaFile
+1-1math/stp/Makefile
+1-11 files