[CIR] Add bytecode encodings for attributes (#229586)
Without a BytecodeDialectInterface, MLIR encodes a dialect's attributes
through their assembly format, embedding the printed text in the
bytecode. This adds native encodings for 27 CIR attributes (constants,
constant initializers, global views, method/data-member pointers, C++
special-member attributes, and small metadata attributes), modelled on
the LLVM dialect's bytecode support.
On attribute-dense modules this shrinks the bytecode ~30-40% (8.6KB to
5.4KB across the new tests). The room ahead is huge, emitting bytecode
for CIRGenModule.cpp (441MB of CIR text) still exceeds 22GB RSS and 30
minutes with these encodings (64GB and 45 minutes without), since types
keep using the assembly fallback. This is paving towards selfhosting
with bytecode.
Coverage is partial by design: anything not listed keeps using the
assembly-format fallback, exactly as before. Types keep the fallback too
until the type encodings land separately.
[3 lines not shown]
[scudo] Check quarantine batch bounds in release builds (#230247)
[Attacking Scudo's Quarantine, section 3: Write Where
Ptr](https://un1fuzz.github.io/articles/quarantine_attack.html#a3)
describes corrupting a quarantine batch's `Count` so that enqueue writes
the freed pointer outside the batch. The original [PoC and exploit code
are
here](https://github.com/un1fuzz/scudo_research/tree/main/quarantine_arbitrary_return).
`push_back()` currently guards its index with a debug-only check; an
oversized count also bypasses enqueue's full-batch equality check.
Make that bound a release-build check. Also validate both counts before
deciding whether batches can merge, enforce merge capacity in
production, and check the count before shuffling (which precedes
recycling). The capacity comparison uses subtraction after validating
both operands, avoiding corrupted-count addition wrapping around.
This closes the out-of-bounds enqueue primitive described in section 3.
It does not address section 2's Double Return attack using in-range
[23 lines not shown]
Always write INFO/version when storing an SMB share ACL
store_share_acl only wrote the INFO/version key into share_info.tdb when
the file did not exist. This fixes a regression introduced when we added
stateful failover for SMB to truenas 26 and adds test coverage.
Initial import of math/chuffed, version 0.14.0.
Chuffed is a state of the art lazy clause solver designed
from the ground up with lazy clause generation in mind.
Lazy clause generation is a hybrid approach to constraint
solving that combines features of finite domain propagation
and Boolean satisfiability.
[CIR][NFC] Add missing NYI handling for some x86 builtins (#230609)
While doing a recent code review, I noticed that there were some x86
builtins that were incorrectly falling through to code that handles
builtins below them in a switch. This change adds an errorNYI diagnostic
rather than falling through.
AMDGPU: Index loads by workitem id in tests shared with r600 (#230667)
These tests relied on -amdgpu-scalarize-global-loads=false to select
vector loads from uniform pointer arguments. They also have r600 run
lines, so keep the kernels and index the input pointers by the workitem
id instead. Also fix shl_v2i16 not using its computed pointers, and
v_shl_32_i64 using the workgroup id. Also add some uniform variants
of some cases.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
fix(AMDGPU): guard OR folds with shared conditions
A shared uniform condition still needs materializing after folding a
divergent OR to a select, and sharing can introduce an extra SCC
conversion. The extension's single-use check does not prevent this
code-size regression.
Check the condition's uses and divergence as well. Add regression and
control cases, and consolidate the boolean OR tests in or.ll.