misc/py-claude-agent-sdk: Update to 0.2.184
A permission update that lacks a field now raises instead of being sent
half filled, and one bad update in a reply drops them all, which is what
Claude Code does with them anyway.
Changelog: https://github.com/anthropics/claude-agent-sdk-python/releases/tag/v0.2.184
Sponsored by: Netzkommune GmbH
[VPlan] Rework usesFirstPartOnly (#237986)
The recursive first-part reasoning in VPInstruction is dead, and this
allows us to make the more general observation that usesFirstPartOnly is
a misnomer: whether or not the first part of a recipe is used never
depends on the recipe itself, and is entirely determined by whether the
user is statically determined to be a first-part user. Accordingly,
strip the redundant argument. As part of the rework, make the sole
onlyFirstPartUsed call more principled. The end result is a technically
correct change of ResumeForEpilogue being cloned per-part, as evidenced
in VPlan printing.
Assisted-by: llm, for testing
[mlir][ODS] Add partitions for attributes and types
Allow attributes and types to be grouped into named partitions, like
ops. Each def can set `partition` to a `Partition` record. Passing
`-attrdefs-partition=<name>` or `-typedefs-partition=<name>` to the
attrdef/typedef decls and defs generators then emits only the defs of
that partition. A large dialect can thus split its attributes and types
over several compilation units with narrower headers.
The implementation mirrors the approach used in op partitioning
with a `register<DialectClass>Attributes` function (or Types) is used to register every attribute (or type) of the dialect and dispatches to partition specific functions.
The `generated{Parser,Printer}` function saw the biggest change.
It is not generated as `generated<DialectClass>{Attribute,Type}{Parser,Printer}` which is a method with public linkage.
This method is also generated for non-partitioned dialects and the old `generated{Parser,Printer}` function soft-deprecated (but for now retained for migration purposes).
The additional testing, the test dialect's attributes and types are split into the
partitions `Core` and `Syntax`.
This roughly halves the compile time (15.1s -> 6.7s + 6.9s) and peak memory (721 MiB -> 385 and
376 MiB) of the largest test dialect attribute compilation unit.
[2 lines not shown]
[mlir][ODS] Generate hooks that register the attributes and types of a dialect
Dialects registered their generated attributes and types by expanding
`GET_ATTRDEF_LIST` (or `GET_TYPEDEF_LIST`) into the template arguments
of `addAttributes` (or `addTypes`).
This requires each and every type and attribute and their storage classes' to be defined at the callsite and is generally boilerplate that exists in most dialects.
This PR introduces a single registration hook that is generated by ODS and should be called from dialects' `initialize` method instead. The implementation of the hook now performs the registration.
The motivation and further advantage of this approach is that we can then also change the implementation of the registration method in ODS while keeping API compatibility. This is required for partitioning of attributes and types e.g. (https://github.com/llvm/llvm-project/pull/241935).
Docs have been updated to advise users to use the new registration method. However, no upstream dialect beyond the test dialect has been switched nor is the old method of registration planned to be deprecated as it is still useful in some contexts (e.g., extendible dialects or C++ defined types and attributes).
Co-authored-by: Claude <noreply at anthropic.com>
[mlir][ODS] Let the generated dispatch parsers use an already parsed mnemonic
The generated `generatedAttributeParser` and `generatedTypeParser`
always parsed the mnemonic themselves. A dialect whose attributes or
types are generated into several files therefore could not try the
dispatch functions of each file in turn, since the first one already
consumed the mnemonic.
Pass `*mnemonic` on to the `KeywordSwitch`, which only parses the
mnemonic if it is empty. All in-tree callers pass an empty mnemonic.
Co-authored-by: Claude <noreply at anthropic.com>
[mlir][SPIR-V] Reject signed types in unsigned extended arithmetic (#243778)
The spec requires IAddCarry, ISubBorrow and UMulExtended to use integers
with Signedness 0, but the shared op definition also accepted signed
types such as si32
[mlir][docs] Fix the documented signatures of the ODS dispatch functions (#243471)
The documentation of the generated attribute and type parse and print
dispatch functions has bit-rotted over the years, with most notably the
signature changing quite a bit (79f736c150c5, f97e72aaca4a,
fe4f512be7a5).
Update the signatures and describe what the dispatch functions return +
the semantics of the mnemonic pointer parameter. The documented
semantics are required for later work on attribute and type partitioning
to chain parser-printer generators.
Split out of https://github.com/llvm/llvm-project/pull/241935
Co-authored-by: Claude <noreply at anthropic.com>
[LTO] Invoke PreCodeGenCallback from LTO backends and load plugins upfront (#231516)
Pass plugins can provide a PreCodeGenCallback to inspect the module before
code generation or to take it over entirely. So far only llc, clang and flang
invoked it. This patch adds it to the LTO backend's codegen(), which covers
regular LTO, in-process ThinLTO and distributed ThinLTO.
LTO used to load plugins passed in lto::Config::PassPluginFilenames lazily in
each backend invocation. ThinLTO reloaded them on every thread, and a failed
load exited the process from a worker thread while other backends were still
running. lto::LTO::run() now loads them once, before any backend runs, and
returns load failures to the host as an Error. Registration in opt() and the
callback in codegen() both read from LoadedPassPlugins.
Consequences are:
* Direct callers of lto::opt(), lto::backend() or lto::thinBackend() must pass
pre-loaded plugins in LoadedPassPlugins. All in-tree hosts do this already.
* Plugins are loaded even if no backend runs, e.g. with --thinlto-index-only,
so missing plugins don't go unnoticed anymore.
[3 lines not shown]
[LV] Cost only the most expensive way of leaving the vector loop (#243227)
isOutsideLoopWorkProfitable adds the costs of all vector.early.exit
blocks and of the middle block to the cost of the runtime checks to
compute the minimum profitable trip count. But each execution leaves the
vector loop through exactly one of them: the latch branches either to
the middle block or towards exactly one vector.early.exit block
(directly for a single early exit, through the vector.early.exit.check
blocks for multiple). Add the maximum of their costs instead of summing
all costs.
This lowers the minimum profitable trip count of loops with uncountable
early exits whose exit values are computed in more than one of those
blocks.
PR: https://github.com/llvm/llvm-project/pull/243227
[lldb] Let language runtimes order frames by their stack IDs (#243615)
Currently StackID::IsYoungerThan() orders frames by their call frame
addresses, which assumes that every CFA is a stack address. A language
runtime whose unwind plans produce other CFAs, such as the
heap-allocated contexts of Swift async functions, has no way to order
its frames.
This patch adds a customization point LanguageRuntime::CompareCFAs(),
called by
StackID::IsYoungerThan(). StackFrameList::GetFrameWithStackID() now
looks for an
equal frame instead of doing a binary search, because ordering frames
can call
into the language runtimes.
Co-authored-by: Adrian Prantl <aprantl at apple.com>
Assisted-by: Claude
Co-authored-by: Adrian Prantl <aprantl at apple.com>
[libc++] Only include <langinfo.h> when building the library (#243590)
Similar to #223749.
Glibc is the only libc that defines the `nl_item` constants as
enumerators. The others define them as plain numeric macros
(`ERA`, `DAY_1`, `MON_1`, `CODESET`, ...), which then leak into every
translation unit that includes a libc++ locale header.
This breaks Emscripten, which uses the generic fallback with musl.
Tested with Emscripten's libc++: the snippet above fails without this
patch and compiles with it, and libc++ itself still builds.
interfaces: introduce DAD sleep for 6to4/6rd trackers; closes #11179
Add the sleep in the fringe cases only and consolidate the wait
as + 2 to simplify and make it more reliable.
(cherry picked from commit 97be9723322c8a1f3570e5ebfbe4c73e41620028)