Hexagon: Don't duplicate the PC def when converting a return to a restore stub (#232453)
The RESTORE_DEALLOC_RET_JMP_V4 pseudos already define PC, so copying
all of the return's implicit operands added a second, dead PC def. This avoids
failing a future verifier rule.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[CIR] Handle module imports and call imported modules' initializers (#229648)
An ImportDecl reached the "declaration of kind" NYI error, so a
translation unit importing a Clang header module or a C++20 named module
failed under -fclangir.
Mirror classic CodeGen's handling of Decl::Import: record the imported
module once; for a C++20 named module under the Itanium ABI stop there,
since the module has its own initializer function; otherwise emit the
module initializers of the header module and of its implicit submodules
into the importing translation unit, each module once. The
CXX20ModuleInits flag of classic CodeGen becomes the member
cxx20ModuleInits, which release() also uses when naming the named-module
initializer.
Call the initializers of the imported C++20 named modules. CIRGen
records their mangled names as the module attribute
cir.cxx_module_imported_inits, with classic CodeGen's selection: for an
interface or partition unit the modules it exports, imports, or imports
[16 lines not shown]
[VPlan] Mark VPVectorEndPointerRecipe as not accessing memory. (#232482)
VPVectorEndPointerRecipe only computes an address, mark accordingly.
Also update narrowInterleaveGroups to bail out on reverse interleave
groups explicitly, instead of relying on VectorEndPointer being treated
as writing memory.
[CodeGen] Report an error for a direct inline asm output in memory
An inline asm output returned by value has no memory to write to, yet a
constraint such as "=rm" picks memory, the most general constraint, as
does "=m". SelectionDAG asserted on that ("Can only indirectify direct
input operands!"), and GlobalISel dereferenced a null pointer. Clang
never emits such an output, since it passes the address of a memory
output, but other IR can. Report "cannot handle direct memory outputs
yet for constraint 'm'" instead, like the other inline asm errors there.
Assisted-by: Claude Opus 5.5
[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]
Remove (mostly) redundant run line
The second run line showed that the *printed* form of the numeric flag (1076101129 -> reguse:GR32 foldable) parses back. But the first run line already contains the symbolic syntax, so it may be a bit overkill.
[MIR] Serialize the "foldable" inline asm register operand flag
The symbolic MIR syntax for inline asm operand flags dropped
InlineAsm::Flag's RegMayBeFolded bit, which marks a register operand
(from an "rm" constraint) that the register allocator may fold to a
stack slot. Printing MIR and parsing it back therefore silently changed
what the allocator was allowed to do, e.g. with -stop-before and
-run-pass, and a test could only set the bit through a raw numeric flag.
Print the bit as a trailing "foldable", as MachineInstr::print() already
does, and parse it back. A tied use stores its matched operand number in
the same bits, so it never prints the marker.
Assisted-by: Claude Opus 5.5
Parse 'foldable' in one place and test the class-less form
Replace the ParseOptionalFoldable lambda with a single check at the end of
parseSymbolicInlineAsmOperand by making the ':' constraint parsing
conditional. Add class-less "regdef foldable" and "reguse foldable" operands
to inline-asm-foldable.mir, which take the path without a ':' constraint
that wasn't tested before.
Assisted-by: Claude Opus 5.5
A tied inline asm use is never foldable
A tied use stores its matched operand number in the bits that otherwise
hold RegMayBeFolded. Make InlineAsm::Flag enforce that: setRegMayBeFolded()
asserts the operand isn't tied, and getRegMayBeFolded() returns false for a
tied use. The MIR printer no longer needs to special-case tied uses, so
print 'foldable' independently of 'tiedto' and drop the comments that
explained the shared bits.
Also use F.isMemKind() instead of comparing K in the MIR parser.
Assisted-by: Claude Opus 5.5
AMDGPU: Reserve the callee's scratch rsrc registers for call arguments
When assigning outgoing arguments, the caller reserved its own scratch
resource descriptor register instead of the callee's. For entry functions
this is a placeholder register, and for chain functions it is s[48:51], so
inreg arguments could be assigned to s[0:3] and clobber the descriptor
passed to the callee.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Revert "[LLDB] Remove fallthrough (#216398)" (#232476)
This reverts commit 99690a356c8c059db73786adecd827d7f20e3297.
This commit broke lldb-defines.h. The version defines are never filled
in because the unifdef copy_command overrides calling the
version-header-fix script. This does mean that you can't remove any SWIG
preprocessor macros from lldb-defines right now, but there are none
currently.
devel/libdispatch: fix cpu eating by backport patches from upstream (+)
* Use relative kqueue deadlines for BSD uptime and monotonic timers
* Use eventfd abi instead of pipe2
* Fix typos in workqueue.c
* FreeBSD tid are off by two bits (see lock.h)
* Guard against integer truncation before left shifting [1]
PR: 298758
Thanks to: osa, makc, glebius
Exclude `DebugInfo/MIR/InstrRef/spill-slot-idx-limits.mir` from profcheck (#232491)
Test introduced in PR #225950. By the looks of it, exposes existing
profile propagation issues.
vdev_rebuild: wait for the syncing txg before rebuilding a metaslab
Before a sequential rebuild reads a metaslab, it disables allocations
from it and waits for pending allocations to sync. Later passes of the
syncing txg can still rewrite blocks born in that txg in place: a
rewrite allocates nothing, and the first pass has already moved their
allocations to the space map. A rebuild read which overlaps such a
rewrite sees some columns before it and some after. dRAID then finds
the row's parity inconsistent and withholds its repair, and a read
which completes before the rewrite can write the old block over the new
one on the device being rebuilt.
Wait for the txg that is syncing when the metaslab is disabled. No later
txg can allocate from it, so none can rewrite its blocks in place.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Andriy Tkachuk <atkachuk at wasabi.com>
Signed-off-by: Kamil Monicz <kamil at monicz.dev>
Closes #19198
misc/sesh: update to 2.33.0
Changes in 2.33.0:
* Picker: use the terminal's native cursor in the filter input
* New --no-cache option for sesh list and the picker
* Run startup commands in the correct session
* Fix connecting to sessions with a dot in the name
* Escape # in session names and start directories