[MLIR] Pack vector state with SmallVectorWithFlags
Store PresburgerSpace's identifier state, WalkContinuation's action, and
UseListOrderStorage's encoding flag in the capacity fields of their
vectors. Preserve inline capacities and move-based bytecode buffer
transfers; the temporaries in the bytecode reader that only shuffle the
indices stay plain SmallVectors, moved out of the flagged storage.
On x86-64, this reduces PresburgerSpace from 40 to 32 bytes,
WalkContinuation from 72 to 64, and UseListOrderStorage from 40 to 32.
Test flags across empty and heap-backed copies and moves. Cover inline
and heap-backed index pairs and full-shuffle bytecode encoding.
Assisted-by: Codex
Assisted-by: Claude Code
[ADT] Add SmallVectorWithFlags with packed user flags
Structures that hold a SmallVector followed by a bool or a couple of
flag bits pay up to eight bytes of padding for those bits, and there is
no padding inside the vector to reuse: the header is exactly a pointer
and two 32-bit fields, and the inline storage of pointer-sized elements
is a multiple of eight bytes. SmallVectorWithFlags stores one to four
user flag bits in the high bits of the capacity field, so it has the
same size and inline capacity as SmallVector.
The capacity field is the one header field not read on the hot path:
the buffer pointer's free low bits depend on the element alignment and
are read on every element access, and the size is read by size() and
end(). Only capacity() masks the flags out, which costs one extra `and`
in the growth check of push_back; begin(), end(), and size() are
untouched. The cost is a maximum capacity divided by 2^FlagBits, which
with the 32-bit size type and four flag bits is 268 million elements.
The SmallVector implementation layers take a FlagBits template
[35 lines not shown]
[mlir] Support thread-safe context access without parallel execution (#236551)
Add enableThreadSafeLocking() and isThreadSafeLockingEnabled() so
clients using external threads can unique context-owned entities without
enabling MLIR parallel execution or creating a thread pool. Use the
locking mode for operation-name uniquing as well as the type, attribute,
and affine uniquers. Enabling multithreading also enables locking.
Follow-up to #235294.
Assisted-by: Codex
[AST] Optimize isWeakImported() for decl without attributes (NFC) (#237619)
This method can only return true if there is a WeakImportAttr or
AvailabilityAttr, so we can skip cases that don't have any attributes.
This avoids the call to canBeWeakImported(), which is fairly expensive
due to the use of isThisDeclarationADefinition().
This improves compile-time for C++ code, by -0.25% for the clang build.
Suggested by LLM. Original motivation was to reduce ASLR noise on
beman-execution.
[AArch64][GlobalISel] Combine a 1-bit G_UBFX of a sign bit copy to G_LSHR (#235013)
If bit `Lsb` of a value is known to be a copy of its sign bit
(`computeNumSignBits(Src) >= BitWidth - Lsb`), a 1-bit `G_UBFX` of that
bit is the same as a `G_LSHR` by `BitWidth - 1`, which can fold into
users such as `G_ADD`.
```llvm
define i16 @test(i16 %a) {
%r = sdiv i16 %a, 7
ret i16 %r
}
```
Before (6 instructions):
```
sxth w8, w0
mov w9, #18725
mul w8, w8, w9
[14 lines not shown]
py-test-mypy-plugins: updated to 4.1.0
4.1.0
Features
Added a marks field to test cases, applying pytest markers so cases can be
selected with pytest -m <marker>,
Adds official python3.15 support,
Support mypy at 2.4.0
Bugfixes
Remove fspath argument from YamlTestFile.from_parent,
Isolate mypy cache per pytest-xdist worker,
Include tests in the distribution
py-test-mypy: updated to 1.1.0
1.1.0
Update test dependencies
Drop support for xdist 1.x
Drop support for Python 3.8 & 3.9
Upgrade build deps
Update the tests
Update type annotations
Add isort to the static env
Run twine check with --strict
Test with Python 3.15
py-mypy: updated to 2.4.1
Mypy 2.4.1
- Process overloads as a whole in two-phase type checking
- Skip recursive setup for frame-private nested functions in mypyc
net/389-ds-base: Fix CPE information
Current advisories are filed under the redhat vendor, the fedoraproject
entry has been dead for years.
Sponsored by: Netzkommune GmbH