LLVM/project 2fcb2d3 — llvm/lib/Target/SPIRV SPIRVLegalizeResourceBinding.cpp SPIRVLowerResourceNames.cpp, llvm/test/CodeGen/SPIRV/hlsl-resources resource-names.ll

[hlsl][spirv] Dont emit string constants for resource names (#243531)

Resource intrinsics (handlefrombinding, handlefromimplicitbinding) take
const char * arguments which get lowered in backend into byte arrays in
the final spirv module. These should be ignored except to provide the
literal to OpName instructions.

Add a pass intentionally before SPIRVRemoveUnusedResources and
SPIRVLegalizeResourceBinding, which converts handle intrinsics to
variants taking a metadata arg for the name instead. This lets us avoid
emitting actual constants in the spirv, which requires int8 capability,
and simplifies, for example, string global removal in the unused
resources pass, and lowering of heap resources to handlefrombinding.

It would be preferable to emit these metadata variants from Clang, but
this is not currently possible due to handlefrombinding generation
taking place in generated initializers, eg __createFromBinding, so a
string arg must be passed initially.


    [2 lines not shown]
DeltaFile
+121-0llvm/lib/Target/SPIRV/SPIRVLowerResourceNames.cpp
+23-66llvm/lib/Target/SPIRV/SPIRVLegalizeResourceBinding.cpp
+65-0llvm/test/CodeGen/SPIRV/hlsl-resources/resource-names.ll
+53-0llvm/test/Transforms/EarlyCSE/SPIRV/resource-name-metadata.ll
+14-16llvm/test/CodeGen/SPIRV/pointers/structured-buffer-access.ll
+11-11llvm/test/CodeGen/SPIRV/passes/SPIRVLegalizeRegisterBinding-Heap.ll
+287-9328 files not shown
+414-16734 files

LLVM/project 96f70b1 — llvm/include/llvm/CodeGen MachineInstr.h, llvm/lib/CodeGen CalcSpillWeights.cpp MachineInstr.cpp

Move the later folding fixes to their own PRs

1d50fec74e60 added more fixes for folding inline asm register operands
to this PR. They're split into the PRs stacked on this one, one fix
each, to keep this one to the tied operand fix that was reviewed.

This reverts commit 1d50fec74e601c10811a0d58c37a392b2a1ba146.

Assisted-by: Claude Opus 5.5
DeltaFile
+48-197llvm/test/CodeGen/X86/greedy-inline-asm-fold.mir
+51-102llvm/lib/CodeGen/TargetInstrInfo.cpp
+0-100llvm/test/CodeGen/X86/peephole-inline-asm-fold.mir
+19-37llvm/lib/CodeGen/MachineInstr.cpp
+5-13llvm/lib/CodeGen/CalcSpillWeights.cpp
+2-9llvm/include/llvm/CodeGen/MachineInstr.h
+125-4584 files not shown
+130-47110 files

LLVM/project db31b5f — llvm/test/CodeGen/X86 greedy-inline-asm-fold.mir

Test a tie whose def moves when a folded operand is before it

Folding a "+rm" pair before a "+r" pair moves the "+r" pair's def, so
both ends of its tie get new indices. The other tests only moved the
use.

Assisted-by: Claude Opus 5.5
DeltaFile
+51-0llvm/test/CodeGen/X86/greedy-inline-asm-fold.mir
+51-01 files

LLVM/project 6f27fb1 — llvm/include/llvm/CodeGen MachineInstr.h, llvm/lib/CodeGen CalcSpillWeights.cpp MachineInstr.cpp

[CodeGen] Fix more hazards in folding inline asm register operands

Nothing in tree marks an inline asm operand foldable until #229632, so
these were found by a review of the stack rather than by tests:

- The spill weights took a register to be foldable into an asm if any one
  of its operands there was foldable, while the folder needs all of them
  to be. One value passed to an "rm" and an "r" operand could then get
  spilled, not folded, and reloaded into a register the asm didn't have.
  Add MachineInstr::mayFoldInlineAsmReg(), true if every operand of a
  register in an asm can be folded, and use it in the folder,
  CalcSpillWeights, and InlineSpiller.
- The folder now folds every operand of the register, including an undef
  use that InlineSpiller leaves out of the operands it passes, which was
  left behind still referring to the spilled register.
- InlineSpiller rematerialized a value passed to a foldable operand (e.g.
  a constant) into a register right before the asm, which the asm may not
  have had. It's spilled and folded instead.
- An asm that can fold a register no longer adds to the register's spill

    [18 lines not shown]
DeltaFile
+197-48llvm/test/CodeGen/X86/greedy-inline-asm-fold.mir
+101-50llvm/lib/CodeGen/TargetInstrInfo.cpp
+100-0llvm/test/CodeGen/X86/peephole-inline-asm-fold.mir
+38-20llvm/lib/CodeGen/MachineInstr.cpp
+13-5llvm/lib/CodeGen/CalcSpillWeights.cpp
+9-2llvm/include/llvm/CodeGen/MachineInstr.h
+458-1254 files not shown
+471-13010 files

LLVM/project 71185ac — llvm/lib/CodeGen TargetInstrInfo.cpp MachineInstr.cpp

Move folding register checks into mayFoldInlineAsmRegOp so that it's available everywhere.
DeltaFile
+9-0llvm/lib/CodeGen/MachineInstr.cpp
+1-7llvm/lib/CodeGen/TargetInstrInfo.cpp
+10-72 files

LLVM/project 1c7846b — llvm/test/CodeGen/X86 greedy-inline-asm-fold.mir

[TargetInstrInfo] Address review: autogenerate greedy-inline-asm-fold.mir checks

Generate the checks with update_mir_test_checks.py so that the spills and
reloads around each folded inline asm are verified, not just the INLINEASM
itself. Fix the "=r" comment to describe the C "+r" operand, note that which
"+rm" pair greedy folds is its own choice, and add a "+&rm" case on an
uninitialized value showing that folding a pair whose tied use is undef
stores to the slot without loading from it.

Assisted-by: Claude Opus 5.5
DeltaFile
+94-8llvm/test/CodeGen/X86/greedy-inline-asm-fold.mir
+94-81 files

LLVM/project 5f2ba1b — llvm/test/CodeGen/X86 greedy-inline-asm-fold.mir

[TargetInstrInfo] Address review: write the two-register flag symbolically

Now that the operand count of an inline asm flag can be written in MIR, use
"reguse:GR64 foldable ops:2" instead of an immediate whose register class ID
changes whenever a register class is added. Regenerate the checks, which
now print the five operands of each x86 memory reference as "ops:5".

Assisted-by: Claude Opus 5.5
DeltaFile
+10-12llvm/test/CodeGen/X86/greedy-inline-asm-fold.mir
+10-121 files

LLVM/project 45ee0ac — llvm/lib/CodeGen TargetInstrInfo.cpp, llvm/test/CodeGen/X86 greedy-inline-asm-fold.mir

[TargetInstrInfo] Address review: don't fold one register of a multi-register operand

A memory operand replaces exactly one register, so return nullptr for a
folded operand whose flag holds more than one, rather than relying on an
assert that release builds drop. Also assert that every folded operand
holds the same register, and say that a caller folding a def whose tied use
is another register must store that register's value into the slot.

Test both the new bail-out and folding a rematerialized load into two "rm"
operands, which takes the fold-a-load path.

Assisted-by: Claude Opus 5.5
DeltaFile
+72-0llvm/test/CodeGen/X86/greedy-inline-asm-fold.mir
+11-1llvm/lib/CodeGen/TargetInstrInfo.cpp
+83-12 files

LLVM/project e7463f2 — llvm/lib/CodeGen TargetInstrInfo.cpp, llvm/test/CodeGen/X86 greedy-inline-asm-fold.mir

[TargetInstrInfo] Fix folding inline asm operands next to tied operands

foldInlineAsmMemOperand() swapped a register operand for the target's
memory operands with MachineInstr::removeOperand(), which asserts when a
later operand is tied, because moving it would break the tie. Inline asm
lists every input after every output, so folding any operand that comes
before another tied pair asserted, e.g. an "rm" input followed by the
input of a "+r" operand, or one of two "+rm" operands. Without
assertions, the moved operands kept stale tie indices. Untie the
operands, rebuild the operand list, and re-tie the remaining pairs at
their new positions.

It also gave up when the register appears in more than one operand, e.g.
one value passed to two "rm" operands, which left the greedy allocator
unable to spill that value at all. Fold every such operand into the
stack slot.

Finally, take MayLoad from the folded operands rather than from every
read of the register: a folded def whose tied use is another virtual

    [9 lines not shown]
DeltaFile
+85-32llvm/lib/CodeGen/TargetInstrInfo.cpp
+108-0llvm/test/CodeGen/X86/greedy-inline-asm-fold.mir
+193-322 files

LLVM/project 2b8db1d — llvm/lib/CodeGen TargetInstrInfo.cpp

Include STLExtras.h for the range helpers

foldInlineAsmMemOperands uses is_contained, min_element, drop_begin,
and enumerate from STLExtras.h, which the file got only through other
headers.

Assisted-by: Claude Opus 5.5
DeltaFile
+1-0llvm/lib/CodeGen/TargetInstrInfo.cpp
+1-01 files

LLVM/project b2137c2 — llvm/lib/CodeGen TargetInstrInfo.cpp

Use drop_begin() for the operands after the first folded one

Assisted-by: Claude Opus 5.5
DeltaFile
+1-2llvm/lib/CodeGen/TargetInstrInfo.cpp
+1-21 files

LLVM/project 39c3bed — llvm/lib/CodeGen TargetInstrInfo.cpp

Update llvm/lib/CodeGen/TargetInstrInfo.cpp

Co-authored-by: Nick Desaulniers <ndesaulniers at google.com>
DeltaFile
+1-1llvm/lib/CodeGen/TargetInstrInfo.cpp
+1-11 files

LLVM/project 5ca1266 — llvm/include/llvm/CodeGen MachineInstr.h, llvm/lib/CodeGen MachineInstr.cpp

[TargetInstrInfo] Address review: don't fold a subregister that isn't at the start of the slot

A folded operand refers to the start of the stack slot, which holds the
whole register, so a subregister is only there if it's at bit offset 0 on a
little-endian target. Folding x86's sub_8bit_hi read byte 0 instead of byte
1. Folding several operands at once made this worse: two operands holding
different subregisters of one value (e.g. "Qm"(lo), "Qm"(hi)) both read
byte 0.

Check the subregister in mayFoldInlineAsmRegOp, so the spill weights agree
with what folds. A tied def is covered too, since its tied use has the same
subregister.

Assisted-by: Claude Opus 5.5
DeltaFile
+112-0llvm/test/CodeGen/X86/greedy-inline-asm-fold.mir
+11-0llvm/lib/CodeGen/MachineInstr.cpp
+2-1llvm/include/llvm/CodeGen/MachineInstr.h
+125-13 files

LLVM/project d68056c — llvm/include/llvm/IR InlineAsm.h, llvm/lib/CodeGen TargetInstrInfo.cpp MachineInstr.cpp

[MIR] Round-trip the "func" kind of inline asm operand flags (#237461)

An x86 inline asm call or jmp whose target is a function, given as a "p"
operand or as a "*m" operand that ISel turns into an address, gets a
flag of kind Func. Like a Mem flag, it carries a memory constraint. But
getKindName() returned "mem" for it, and the MIR printer printed the
constraint only for a Mem flag. So this:

  call void asm sideeffect "call ${0:P}", "p,~{dirflag},~{fpsr},~{flags}"(ptr @g)

was printed as:

  INLINEASM &"call ${0:P}", sideeffect attdialect, mem ops:5, target-flags(x86-plt) @g, 1, $noreg, 0, $noreg, ...

which parses back as a Mem flag with no constraint. Printing that again
hits llvm_unreachable, and the asm printer asserts in
PrintMemReference() instead of emitting "callq g at PLT".
MachineInstr::print() also printed the constraint as a register class
(e.g. "mem:GR8_NOREX").

    [8 lines not shown]
DeltaFile
+135-0llvm/unittests/Target/X86/InlineAsmOperandCommentTest.cpp
+38-0llvm/test/CodeGen/MIR/X86/inline-asm-func-kind.ll
+4-2llvm/include/llvm/IR/InlineAsm.h
+3-2llvm/lib/CodeGen/TargetInstrInfo.cpp
+3-2llvm/lib/CodeGen/MachineInstr.cpp
+2-1llvm/lib/CodeGen/MIRParser/MIParser.cpp
+185-72 files not shown
+187-88 files

HardenedBSD/ports 4fe94a3 — editors/vscode pkg-plist, editors/vscode/files/packagejsons pnpm-lock.yaml

Merge branch 'freebsd/main' into hardenedbsd/main
DeltaFile
+0-58,559finance/odoo18/pkg-plist
+0-53,122finance/odoo17/pkg-plist
+350-18,153editors/vscode/pkg-plist
+10,838-1,178editors/vscode/files/packagejsons/pnpm-lock.yaml
+0-10,927editors/vscode/files/packagejsons/extensions/copilot/pnpm-lock.yaml
+0-6,294editors/vscode/files/packagejsons/extensions/pnpm-lock.yaml
+11,188-148,233273 files not shown
+16,325-155,874279 files

FreeNAS/freenas 8fb0aa6 — src/middlewared/middlewared/plugins/iscsi_ extents.py, src/middlewared/middlewared/plugins/nvmet namespace.py

Do not allow to use the same zvol for nvmet, iscsi or VM
DeltaFile
+241-0tests/api2/test_block_share_conflicts.py
+32-18src/middlewared/middlewared/plugins/nvmet/namespace.py
+26-0src/middlewared/middlewared/test/integration/assets/vm.py
+24-0src/middlewared/middlewared/utils/libvirt/storage_devices.py
+20-2src/middlewared/middlewared/plugins/vm/vm_devices.py
+17-4src/middlewared/middlewared/plugins/iscsi_/extents.py
+360-246 files

FreeBSD/src 17ebd95 — sys/dev/acpica acpivar.h acpi.c, sys/dev/iicbus acpi_iicbus.c

acpi_iicbus: Return _DSD properties of the I2C children

acpi_iicbus has no bus_get_property method, so device_get_property()
on one of its children reaches acpi(4) through
bus_generic_get_property().  acpi_bus_get_prop() then takes the
child's acpi_iicbus ivars for a struct acpi_device and follows garbage
pointers: on an HP ZBook Ultra G1a, a driver reading _DSD of its I2C
device froze the machine.

Answer for the I2C children from their own ACPI handle, with a _DSD
cache in the ivars, through a helper split out of acpi_bus_get_prop().

Reviewed by:    wulf, imp
Approved by:    wulf, imp
MFC after:      1 week
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/117
DeltaFile
+22-4sys/dev/acpica/acpi.c
+21-0sys/dev/iicbus/acpi_iicbus.c
+3-0sys/dev/acpica/acpivar.h
+46-43 files

FreeBSD/src 92a634d — sys/dev/iicbus iicbus.h iicbus.c

acpi_iicbus: Free the ivars of deleted children

acpi_iicbus_child_deleted() replaces iicbus_child_deleted() but only
detached the ACPI data, so the ivars and their resource list leaked
with every deleted child.  It also used the ivars without checking
them, while iicbus_add_child_common() can leave a child without any.
Check them and call iicbus_child_deleted() at the end.

Reviewed by:    wulf, imp
Approved by:    wulf, imp
Fixes:          9b7938dcf338 ("iicbus(4): Add support for ACPI-based children enumeration")
MFC after:      1 week
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/117
DeltaFile
+3-0sys/dev/iicbus/acpi_iicbus.c
+1-1sys/dev/iicbus/iicbus.c
+1-0sys/dev/iicbus/iicbus.h
+5-13 files

FreeBSD/src d5ad797 — sys/dev/acpica acpi.c

acpi: Return the handle of a reference property, not its target

acpi_bus_get_prop() copied the first bytes of the namespace node a
_DSD reference points to, instead of the handle itself, when a caller
asked for such a property with a type other than DEVICE_PROP_HANDLE.

Reviewed by:    wulf, imp
Approved by:    wulf, imp
Fixes:          99e6980fcf5e ("device_get_property: add a HANDLE case")
MFC after:      1 week
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/117
DeltaFile
+1-1sys/dev/acpica/acpi.c
+1-11 files

LLVM/project f0f5939 — lld/test/ELF/lto non-prevailing-comdat-member.ll, llvm/lib/LTO LTO.cpp

[LTO] Check COMDAT key before marking the group non-prevailing (#222568)

Regular LTO currently adds a COMDAT into NonPrevailingComdats when
any member of the group is non-prevailing. This is not correct when
the member is not the COMDAT key.

The problem can be reproduced with the following code.
lto-dtor-comdat.h:
```
  struct Base {
    virtual ~Base() {}
  };

  template <int N> struct Derived final : Base {
    ~Derived() {}
  };
```
d0.cc:
```

    [44 lines not shown]
DeltaFile
+90-0llvm/test/LTO/Resolution/X86/non-prevailing-comdat-member.ll
+45-0lld/test/ELF/lto/non-prevailing-comdat-member.ll
+6-3llvm/lib/LTO/LTO.cpp
+141-33 files

LLVM/project ef53921 — .github/workflows libc-freebsd-vm-tests.yml

[libc][GitHub] Use tmpdir for FreeBSD workflow

To avoid having to do all the writes over NFS, which might help improve
performance.

Reviewers: lntue, kaladron

Pull Request: https://github.com/llvm/llvm-project/pull/244737
DeltaFile
+3-3.github/workflows/libc-freebsd-vm-tests.yml
+3-31 files

LLVM/project e73fdc7 — cmake/Modules CMakePolicy.cmake

[CMake] Drop redundant policy flags

All of these default to NEW now that we require CMake 3.31.

Reviewers: rnk, petrhosek

Pull Request: https://github.com/llvm/llvm-project/pull/244734
DeltaFile
+0-48cmake/Modules/CMakePolicy.cmake
+0-481 files

OpenBSD/ports dwkrW0S — sysutils Makefile

   +sysutils/qobsd
VersionDeltaFile
1.815+1-0sysutils/Makefile
+1-01 files

OpenBSD/ports eFKPXUD — sysutils/qobsd distinfo Makefile, sysutils/qobsd/pkg README DESCR

   Initial revision
VersionDeltaFile
1.1+72-0sysutils/qobsd/pkg/README
1.1+57-0sysutils/qobsd/pkg/PLIST
1.1+31-0sysutils/qobsd/Makefile
1.1+2-0sysutils/qobsd/distinfo
1.1+1-0sysutils/qobsd/pkg/DESCR
1.1.1.1+0-0sysutils/qobsd/pkg/README
+163-04 files not shown
+163-010 files

OpenBSD/src wsg2a8H — sys/netinet6 frag6.c

   Fix IPv6 fragment bookkeeping.

   If allocating memory failed, the counter frag6_nfragpackets was
   incremented anyway although nothing was added to frag6_queue.  After
   enough failures, all IPv6 fragments were dropped until reboot.

   OK mvs@
VersionDeltaFile
1.99+2-2sys/netinet6/frag6.c
+2-21 files

HardenedBSD/ports 7063b07 — graphics/graphviz Makefile

graphics/graphviz: remove duplicate lang/tcl BUILD_DEPENDS, for the third time

When ${TCLTK_DEFAULT} != 8.6:
(graphics/graphviz): Error: graphics/graphviz depends on nonexistent
origin lang/tcl91; Please contact maintainer of the port to fix
this.

PR: 300092
DeltaFile
+0-1graphics/graphviz/Makefile
+0-11 files

FreeBSD/ports 7063b07 — graphics/graphviz Makefile

graphics/graphviz: remove duplicate lang/tcl BUILD_DEPENDS, for the third time

When ${TCLTK_DEFAULT} != 8.6:
(graphics/graphviz): Error: graphics/graphviz depends on nonexistent
origin lang/tcl91; Please contact maintainer of the port to fix
this.

PR: 300092
DeltaFile
+0-1graphics/graphviz/Makefile
+0-11 files

FreeBSD/src 44c85f6 — sys/dev/amdgpio amdgpio.c

amdgpio: Add PNP info for devmatch

amdgpio is not in GENERIC and exports no PNP info, so devmatch(8)
never loads it, and GPIO consumers on AMD systems find no controller
unless amdgpio is in kld_list.

Export the ACPI ids so devmatch(8) loads the module at boot.

Reviewed by:    imp
Approved by:    imp
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/116
DeltaFile
+4-2sys/dev/amdgpio/amdgpio.c
+4-21 files

FreeBSD/src 11ba27a — sys/dev/ichiic ig4_var.h ig4_acpi.c

ig4: Add an AMD generation with a 150 MHz clock

AMDI0010 controllers attached as Atom, whose timings assume a 100 MHz
input clock, but they run from 150 MHz (Linux drivers/acpi/acpi_apd.c),
so the bus runs above the 400 kHz of fast mode and the SDA hold time
is a third short.  The median of 200 timed 1 KB reads on an HP ZBook
Ultra G1a gives an effective 472 kHz before and 348 kHz after.

Give them their own generation: the Atom timings with a 150 MHz clock,
and of the Atom register handling only the DesignWare FIFO depth and
component version checks, not the Intel LPSS private registers.  It
sorts before IG4_SKYLAKE, so IG4_HAS_ADDREGS() stays false.

Reviewed by:    wulf, imp
Approved by:    wulf, imp
MFC after:      1 week
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/114
DeltaFile
+12-2sys/dev/ichiic/ig4_iic.c
+2-0sys/dev/ichiic/ig4_acpi.c
+1-0sys/dev/ichiic/ig4_var.h
+15-23 files

LLVM/project 5962a67 — llvm/lib/CodeGen TargetInstrInfo.cpp, llvm/test/CodeGen/X86 machine-outliner-nomerge.ll

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+8-4llvm/test/CodeGen/X86/machine-outliner-nomerge.ll
+3-0llvm/lib/CodeGen/TargetInstrInfo.cpp
+11-42 files