LLVM/project ba4edd8llvm/lib/Target/AMDGPU GCNSubtarget.h SIISelLowering.cpp

[NFCI][AMDGPU] Use X-macro to reduce boilerplate in `GCNSubtarget.h`

`GCNSubtarget.h` contained a large amount of repetitive code following the pattern `bool HasXXX = false;` for member declarations and `bool hasXXX() const { return HasXXX; }` for getters. This boilerplate made the file unnecessarily long and harder to maintain.

This patch introduces an X-macro pattern `GCN_SUBTARGET_HAS_FEATURE` that consolidates 129 simple subtarget features into a single list. The macro is expanded twice: once in the protected section to generate member variable declarations, and once in the public section to generate the corresponding getter methods. This reduces the file by approximately 265 lines while preserving the exact same API and functionality. Features with complex getter logic or inconsistent naming conventions are left as manual implementations for future improvement.

Ideally, these could be generated by TableGen using `GET_SUBTARGETINFO_MACRO`, similar to the X86 backend. However, `AMDGPU.td` has several issues that prevent direct adoption: duplicate field names (e.g., `DumpCode` is set by both `FeatureDumpCode` and `FeatureDumpCodeLower`), and inconsistent naming conventions where many features don't have the `Has` prefix (e.g., `FlatAddressSpace`, `GFX10Insts`, `FP64`). Fixing these issues would require renaming fields in `AMDGPU.td` and updating all references, which is left for future work.
DeltaFile
+256-816llvm/lib/Target/AMDGPU/GCNSubtarget.h
+3-3llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+2-2llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+1-1llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
+262-8224 files

LLVM/project 35e200cllvm/test/CodeGen/AMDGPU wmma-nop-hoisting.mir

[AMDGPU] Pre-commit test for WMMA NOP hoisting optimization (#176745)

Add test showing current behavior where V_NOP instructions for WMMA
coexecution hazards are inserted inside loop bodies at the use-site. A
future patch will hoist these NOPs to loop preheaders to reduce
redundant execution.

---------

Co-authored-by: Christudasan Devadasan <christudasan.devadasan at amd.com>
DeltaFile
+56-0llvm/test/CodeGen/AMDGPU/wmma-nop-hoisting.mir
+56-01 files

LLVM/project e358638mlir/lib/Dialect/Linalg/Utils Utils.cpp, mlir/test/Dialect/Linalg/convolution roundtrip-convolution.mlir

[Linalg] Support i1 data type in matchConvolutionOpOfType utility (#176704)

-- Extend bodyMatcherForConvolutionOps to recognize arith.ori/arith.andi
   for i1 element types (in addition to add/mul for integer/float types)
   for accumulation and multiplication.
-- Similarly, extend bodyMatcherForSumPoolOps to recognize arith.ori for
   i1 accumulation (in addition to add for integer/float types).

Signed-off-by: Abhishek Varma <abhvarma at amd.com>
DeltaFile
+20-8mlir/lib/Dialect/Linalg/Utils/Utils.cpp
+26-0mlir/test/Dialect/Linalg/convolution/roundtrip-convolution.mlir
+46-82 files

LLVM/project 248dc97flang/lib/Lower/OpenMP OpenMP.cpp ClauseProcessor.cpp, flang/lib/Optimizer/OpenMP LowerWorkdistribute.cpp

rename threadLimitVals to threadLimitVars
DeltaFile
+6-6flang/lib/Lower/OpenMP/OpenMP.cpp
+5-5mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+5-5mlir/include/mlir/Dialect/OpenMP/OpenMPClauses.td
+4-4flang/lib/Optimizer/OpenMP/LowerWorkdistribute.cpp
+3-3mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+1-1flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+24-241 files not shown
+25-257 files

LLVM/project 7dc2cd4clang/lib/AST/ByteCode Interp.h, clang/test/AST/ByteCode shifts.cpp

[clang][bytecode] Handle corner condition for sign negation (#176390)

RHS = -RHS works for most cases, however, the behaviour when RHS is
INTXX_MIN is undefined. In these particular case(s), we should use
INTXX_MAX instead.

Fixes #176271.
DeltaFile
+3-1clang/lib/AST/ByteCode/Interp.h
+2-0clang/test/AST/ByteCode/shifts.cpp
+5-12 files

FreeBSD/ports 1d0ddf2www/newsraft distinfo Makefile

www/newsraft: Update to 0.35

Changelog:
https://codeberg.org/newsraft/newsraft/releases/tag/newsraft-0.35
DeltaFile
+3-3www/newsraft/distinfo
+1-1www/newsraft/Makefile
+4-42 files

LLVM/project fab5e02mlir/include/mlir/Dialect/OpenMP OpenMPClauses.td, mlir/lib/Dialect/OpenMP/IR OpenMPDialect.cpp

rename num_teams_vals to num_teams_vars
DeltaFile
+8-8mlir/include/mlir/Dialect/OpenMP/OpenMPClauses.td
+4-4mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+12-122 files

OpenBSD/src wU00tUHsys/dev/pci if_bnxt.c

   Attach stat contexts to tx and rx rings, and prepare for the bigger stat buffer size
   used on newer hardware generations.

   tested by stsp@ as part of a bigger diff
   ok dlg@
VersionDeltaFile
1.64+27-25sys/dev/pci/if_bnxt.c
+27-251 files

FreeBSD/ports e6051e5security/nmap-devel Makefile

security/nmap-devel: Latest nmap doesn't support OpenSSL 1.1.1
DeltaFile
+2-0security/nmap-devel/Makefile
+2-01 files

FreeBSD/src 4f0342cstand/lua core.lua

lualoader: fix pruning of non-existent default kernel

Removing the kernel from the list of available kernels is sufficient to
avoid rendering it in the list, but we need more for booting to actually
work.  Notably, the 'kernel' loader.conf var was left intact to its
default value, so if one didn't use the kernel selector in the menu then
we'd try to boot the nonexistent 'kernel' instead of the new default
(first autodetected).

There's room to improve the error messages here, but for now let's just
make it actually work correctly.

PR:             292232
Fixes:  d04415c520b03 ("loader: lua: remove the default kernel [...]")
(cherry picked from commit e30086ab4c8778ea70a3b19e83546ce1b4a16492)
DeltaFile
+6-0stand/lua/core.lua
+6-01 files

FreeBSD/src 919c1e1lib/libbe libbe.3 be.c, sbin/bectl bectl.c

bectl: log modifying functions to zpool history

Modeled directly after the method used by the zfs/zpool commands: flag
commands with a "please log me" flag, and when there, reconstruct the
command line. On success, call the library function to add it to the
log.

(Majority of the change by Rob; minor edits by kevans@)

Signed-off-by: Rob Norris <rob.norris at klarasystems.com>
Co-authored-by: Kyle Evans <kevans at FreeBSD.org>
Sponsored by:   Modirum MDPay
Sponsored by:   Klara, Inc.
(cherry picked from commit 2a87929671e6e6919c18f2c25d60f2c73c3d18f4)
DeltaFile
+57-16sbin/bectl/bectl.c
+14-2lib/libbe/libbe.3
+12-0lib/libbe/be.c
+2-0lib/libbe/be.h
+85-184 files

FreeBSD/src d3c523bshare/man/man9 make_dev.9

makedev(9): drop an additional note about cdevpriv dtors

These were previously somewhat safe to call destroy_dev(9), but will now
also cause a deadlock in the same fashion that d_close doing so would
previously.  Amend the note to point it out, in case it's useful for
someone.

Reviewed by:    imp, kib, markj

(cherry picked from commit 90314c04f10f583c37c59ec51fd628e3deaf3622)
DeltaFile
+8-4share/man/man9/make_dev.9
+8-41 files

FreeBSD/src b196a71lib/libc/gen sysconf.c sysconf.3, lib/libc/tests/sys cpuset_test.c

libc: report _SC_NPROCESSORS_ONLN more accurately in cpu-limited jails

We don't support CPU hotplug, but we do support cpuset(8) restrictions
on jails (including prison0, which uses cpuset 1).  The process cannot
widen its cpuset beyond its root set, so it makes sense to instead
report the number of cpus enabled there rather than the total number
in the system.

This change is effectively a nop for the majority of systems and jails
in the wild, though it does reduce the performance of this query now
that we can't take advantage of AT_NCPUS being provided in the auxinfo.

The implementation here is notably different than Linux, which would not
take cgroups into account.  They do, however, take CPU hotplug into
account, so the possibility for it to diverge from (and be lower than)
the # configured count to reflect what the process can actually be
scheduled on doesn't really diverge in semantics.

Reviewed by:    kib

    [2 lines not shown]
DeltaFile
+137-3lib/libc/tests/sys/cpuset_test.c
+15-1lib/libc/gen/sysconf.c
+4-2lib/libc/gen/sysconf.3
+156-63 files

FreeBSD/src 57b08d9lib/libutil login_class.c

libutil: defer setting the MAC label until after the login class

MAC policies, like mac_biba(4), may forbid changing the login class once
a label has been applied.  For setting up the initial login context,
this isn't really expected and in-fact may break some class-based
configuration.

Defer setting the MAC label until after the login class is set, and
remove the requirement that we have a pwd entry since the label is
pulled from the login class -- we only use pwd for syslog in this path.

Patch is largely by Kevin Barry, with some modifications and this commit
message by kevans@.

PR:             177698
Reviewed by:    des, olce
Co-authored-by: Kevin Barry <ta0kira gmail com>

(cherry picked from commit 98edcbcce0a4650084bd86e704cfa38bf590250c)
DeltaFile
+31-26lib/libutil/login_class.c
+31-261 files

FreeBSD/src f00ebc7lib/libc/posix1e mac_text.3 mac_free.3

libc: fix description issues in mac_text(3)/mac_free(3)

mac_text(3) as-written would seem to indicate that a `mac_t` should be
freed with free(3), but this isn't the case.  One can derive from
context from when the change was introduced and COMPATIBILITY that this
was intended to talk about *text in `mac_to_text`, so move the comment
there.

PR:             179832
Co-authored-by: Priit Järv <priit cc ttu ee>

(cherry picked from commit 081218b7a2006e5b6783e51f66fd751871ac1272)
DeltaFile
+5-3lib/libc/posix1e/mac_text.3
+2-2lib/libc/posix1e/mac_free.3
+7-52 files

FreeBSD/src 6dabfd3stand/lua core.lua

lualoader: fix pruning of non-existent default kernel

Removing the kernel from the list of available kernels is sufficient to
avoid rendering it in the list, but we need more for booting to actually
work.  Notably, the 'kernel' loader.conf var was left intact to its
default value, so if one didn't use the kernel selector in the menu then
we'd try to boot the nonexistent 'kernel' instead of the new default
(first autodetected).

There's room to improve the error messages here, but for now let's just
make it actually work correctly.

PR:             292232
Fixes:  d04415c520b03 ("loader: lua: remove the default kernel [...]")
(cherry picked from commit e30086ab4c8778ea70a3b19e83546ce1b4a16492)
DeltaFile
+6-0stand/lua/core.lua
+6-01 files

FreeBSD/src bc859balib/libbe libbe.3 be.c, sbin/bectl bectl.c

bectl: log modifying functions to zpool history

Modeled directly after the method used by the zfs/zpool commands: flag
commands with a "please log me" flag, and when there, reconstruct the
command line. On success, call the library function to add it to the
log.

(Majority of the change by Rob; minor edits by kevans@)

Signed-off-by: Rob Norris <rob.norris at klarasystems.com>
Co-authored-by: Kyle Evans <kevans at FreeBSD.org>
Sponsored by:   Modirum MDPay
Sponsored by:   Klara, Inc.
(cherry picked from commit 2a87929671e6e6919c18f2c25d60f2c73c3d18f4)
DeltaFile
+57-16sbin/bectl/bectl.c
+14-2lib/libbe/libbe.3
+12-0lib/libbe/be.c
+2-0lib/libbe/be.h
+85-184 files

FreeBSD/src 5b2a742share/man/man9 make_dev.9

makedev(9): drop an additional note about cdevpriv dtors

These were previously somewhat safe to call destroy_dev(9), but will now
also cause a deadlock in the same fashion that d_close doing so would
previously.  Amend the note to point it out, in case it's useful for
someone.

Reviewed by:    imp, kib, markj

(cherry picked from commit 90314c04f10f583c37c59ec51fd628e3deaf3622)
DeltaFile
+8-4share/man/man9/make_dev.9
+8-41 files

FreeBSD/src e760f45lib/libc/gen sysconf.c sysconf.3, lib/libc/tests/sys cpuset_test.c

libc: report _SC_NPROCESSORS_ONLN more accurately in cpu-limited jails

We don't support CPU hotplug, but we do support cpuset(8) restrictions
on jails (including prison0, which uses cpuset 1).  The process cannot
widen its cpuset beyond its root set, so it makes sense to instead
report the number of cpus enabled there rather than the total number
in the system.

This change is effectively a nop for the majority of systems and jails
in the wild, though it does reduce the performance of this query now
that we can't take advantage of AT_NCPUS being provided in the auxinfo.

The implementation here is notably different than Linux, which would not
take cgroups into account.  They do, however, take CPU hotplug into
account, so the possibility for it to diverge from (and be lower than)
the # configured count to reflect what the process can actually be
scheduled on doesn't really diverge in semantics.

Reviewed by:    kib

    [2 lines not shown]
DeltaFile
+137-3lib/libc/tests/sys/cpuset_test.c
+15-1lib/libc/gen/sysconf.c
+4-2lib/libc/gen/sysconf.3
+156-63 files

FreeBSD/src d15be6dlib/libutil login_class.c

libutil: defer setting the MAC label until after the login class

MAC policies, like mac_biba(4), may forbid changing the login class once
a label has been applied.  For setting up the initial login context,
this isn't really expected and in-fact may break some class-based
configuration.

Defer setting the MAC label until after the login class is set, and
remove the requirement that we have a pwd entry since the label is
pulled from the login class -- we only use pwd for syslog in this path.

Patch is largely by Kevin Barry, with some modifications and this commit
message by kevans@.

PR:             177698
Reviewed by:    des, olce
Co-authored-by: Kevin Barry <ta0kira gmail com>

(cherry picked from commit 98edcbcce0a4650084bd86e704cfa38bf590250c)
DeltaFile
+31-26lib/libutil/login_class.c
+31-261 files

FreeBSD/src b5b3bf5lib/libc/posix1e mac_text.3 mac_free.3

libc: fix description issues in mac_text(3)/mac_free(3)

mac_text(3) as-written would seem to indicate that a `mac_t` should be
freed with free(3), but this isn't the case.  One can derive from
context from when the change was introduced and COMPATIBILITY that this
was intended to talk about *text in `mac_to_text`, so move the comment
there.

PR:             179832
Co-authored-by: Priit Järv <priit cc ttu ee>

(cherry picked from commit 081218b7a2006e5b6783e51f66fd751871ac1272)
DeltaFile
+5-3lib/libc/posix1e/mac_text.3
+2-2lib/libc/posix1e/mac_free.3
+7-52 files

NetBSD/src lMBbLSoexternal/gpl3/gcc/usr.bin/gcc/arch/powerpc configargs.h, external/gpl3/gcc/usr.bin/gcc/arch/sh3el configargs.h

   regen for bumped local version.
VersionDeltaFile
1.58+3-3external/gpl3/gcc/usr.bin/gcc/arch/powerpc/configargs.h
1.67+2-2external/gpl3/gcc/usr.bin/gcc/arch/x86_64/configargs.h
1.52+2-2external/gpl3/gcc/usr.bin/gcc/arch/sh3el/configargs.h
1.54+2-2external/gpl3/gcc/usr.bin/gcc/arch/sparc/configargs.h
1.52+2-2external/gpl3/gcc/usr.bin/gcc/arch/sparc64/configargs.h
1.50+2-2external/gpl3/gcc/usr.bin/gcc/arch/vax/configargs.h
+13-1336 files not shown
+81-8142 files

LLVM/project 54ecb7cllvm/lib/Target/LoongArch LoongArchISelLowering.cpp LoongArchLASXInstrInfo.td, llvm/test/CodeGen/LoongArch/ir-instruction flog2.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+244-14llvm/test/CodeGen/LoongArch/lasx/ir-instruction/flog2.ll
+142-14llvm/test/CodeGen/LoongArch/lsx/ir-instruction/flog2.ll
+2-8llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+4-4llvm/test/CodeGen/LoongArch/ir-instruction/flog2.ll
+0-3llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td
+0-3llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td
+392-462 files not shown
+392-488 files

FreeBSD/src 3f3b53elib/libc/posix1e mac.conf.5 mac.conf, lib/libjail jail.c

jail(3): fix common usage after mac.label support

Nobody else's mac.conf(5) has any entries for jails, so they get a
trivial ENOENT and we fail before we can fetch any jail parameters.
Most notably, this breaks `jls -s` / `jls -n` if you do not have any
loaded policy that applies jail labels.

Add an entry that works for everyone, and hardcode that as an ENOENT
fallback in libjail to provide a smoother transition.  This is probably
not harmful to leave in long-term, since mac.conf(5) will override it.

This unearthed one additional issue, in that mac_get_prison() in the
MAC framework handled the no-label-policies bit wrong.  We don't want
to break jail utilities enumerating jail parameters automatically, so
we must ingest the label in all cases -- we can still use it as a small
optimization to avoid trying to copy out any label.  We will break
things if a non-optional element is specified in the copied in label,
but that's expected.


    [8 lines not shown]
DeltaFile
+9-6lib/libjail/jail.c
+2-6sys/security/mac/mac_syscalls.c
+2-1lib/libc/posix1e/mac.conf.5
+1-0lib/libc/posix1e/mac.conf
+14-134 files

FreeBSD/src bef0475share/man/man4 mac.4

mac(4): also list jails in the example enumeration of objects

The prison may also be considered part of the subject by way of its
ucred association, but I don't think this is significantly different
enough today than before recent work -- policies could have always
taken them into account, and some did (e.g., mac_bsdextended).

Reported by:    olce
Reviewed by:    olce, ziaee
Differential Revision:  https://reviews.freebsd.org/D54748
DeltaFile
+2-2share/man/man4/mac.4
+2-21 files

LLVM/project 53ae317clang/docs ReleaseNotes.rst, clang/lib/Sema SemaOverload.cpp

[Clang] Check enable_if attribute without delayed diagnostics (#176080)

We ensure immediate access control checking when evaluating the
enable_if attribute to rule out inaccessible constructors during
potential overload resolution, treating them as SFINAE errors rather
than hard errors, making the behavior more preferable with the nature of
the enable_if attribute.

Compared to the last patch, we now avoid switching the DC directly
because there are cases where we're checking enable_if attribute within
a lambda and getCurLambda() requires a lambda context to distinguish
from template instantiation.

This reapplies #175899

Fixes https://github.com/llvm/llvm-project/issues/175895
DeltaFile
+48-0clang/test/SemaCXX/enable_if.cpp
+6-0clang/lib/Sema/SemaOverload.cpp
+1-0clang/docs/ReleaseNotes.rst
+55-03 files

LLVM/project be40637clang/lib/Sema SemaLambda.cpp, clang/test/SemaCXX cxx2b-consteval-propagate.cpp

[Clang] Ensure a lambda DeclContext in BuildLambdaExpr (#176319)

Since 5f9630b388, we only remove the LSI after the evaluation context is
popped. The TreeTransform of immediate functions may call getCurLambda,
which requires both the paired LSI and the lambda DeclContext. In
TransformLambdaExpr, we already switched the context, but this is not
the case when parsing a lambda expression.

No release note, as this is a regression from 22.

Fixes https://github.com/llvm/llvm-project/issues/176045
DeltaFile
+14-0clang/test/SemaCXX/cxx2b-consteval-propagate.cpp
+6-1clang/lib/Sema/SemaLambda.cpp
+20-12 files

FreeNAS/freenas d8f240bsrc/middlewared/middlewared/plugins smb.py, src/middlewared/middlewared/plugins/smb_ sharesec.py

Add clustered share_info.tdb handling

This commit ensures our utilities to manipulate samba's share_info.tdb
file are suitably agnostic as to whether the database is clustered.
DeltaFile
+35-18src/middlewared/middlewared/plugins/smb_/sharesec.py
+2-1src/middlewared/middlewared/plugins/smb.py
+37-192 files

FreeBSD/doc 437d92bdocumentation/content/en/books/porters-handbook/versions _index.adoc

[PHB]: Document recent __FreeBSD_version bumps along main
DeltaFile
+20-0documentation/content/en/books/porters-handbook/versions/_index.adoc
+20-01 files

FreeBSD/ports 64dd401math/octave-forge-datatypes distinfo Makefile

math/octave-forge-datatypes: Update to 1.1.6.
DeltaFile
+3-3math/octave-forge-datatypes/distinfo
+1-1math/octave-forge-datatypes/Makefile
+4-42 files