clang/AMDGPU: Don't emit target-features on AMDGCN-flavored SPIR-V (#216678)
The spirv64-amd-amdhsa target unions every GPU's features in its feature
map so it can report builtins as available. The CodeGen doesn't have
any use of the target-features. Putting it into the IR just results
in an annoying to update test every time a new feature is added. The
ultimate SPIRV codegen doesn't do anything with it, and if it did
survive to AMDGPU codegen, it would be actively harmful.
This isn't an ideal solution. The target-features spam is also
noisy and useless in the AMDGPU case, but solving that is more
intricate because we do currently rely on this for some features,
most notably the wavesize.
Co-authored-by: Claude (Claude-Opus-4.8)
Add PISA target registration and backend stub
Register the Intel GPU portable ISA (PISA) target. Add the pisa Triple
arch, data layout, and a minimal MC/TargetMachine skeleton.
SPIRV: Use mi_match in combiner match functions (#216964)
Convert some simple cases away from getVRegDef + opcode
checks which don't require new matchers.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
RuntimeLibcalls: Dispatch to library functions from SystemRuntimeLibrary
When a SystemRuntimeLibrary names LibcallLibrary defs, setTargetRuntimeLibcallSets
now dispatches each under an isLibraryAvailable guard, so an impl can be homed
into a library without dropping it from the target. Non-library members keep the
inline path. No target names a library yet, so output is unchanged.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
RuntimeLibcalls: Introduce LibcallLibrary schema
Currently the set of system libraries calls is flat and
disorganized. Begin organizing this per-provider library.
The goal is to organize groups of functions by named sets,
corresponding to the underlying library which will be linked.
A LibcallLibrary is a named runtime library whose impls are made
available as a unit; its members use the same dag vocabulary as
LibcallImpls. The emitter emits one setAvailableLibFuncs_<name>
per distinct library name, merging same-named libraries under their
per-variant availability predicates. isLibraryAvailable()
is added as a stub for a future dispatch driver. No target
defines a LibcallLibrary, so generated output is mostly unchanged
(there are some incidental enum reorderings).
Reorganizing all of the library functions require a good bit more
infrastructure to be practical, but this is a minimally functional
piece to start the review.
[2 lines not shown]
RuntimeLibcalls: Stop providing __powitf2 on MSVCRT
MSVCRT does not provide the powi helpers, so gate the fp128 __powitf2 on
isNotOSMSVCRT alongside the f32/f64 __powisf2/__powidf2, instead of adding it
unconditionally. The unconditional add was a hack to satisfy a test that
expected a wrongly-typed powi call on windows-msvc.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
RuntimeLibcalls: Dispatch to library functions from SystemRuntimeLibrary
When a SystemRuntimeLibrary names LibcallLibrary defs, setTargetRuntimeLibcallSets
now dispatches each under an isLibraryAvailable guard, so an impl can be homed
into a library without dropping it from the target. Non-library members keep the
inline path. No target names a library yet, so output is unchanged.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
RuntimeLibcalls: Introduce LibcallLibrary schema
Currently the set of system libraries calls is flat and
disorganized. Begin organizing this per-provider library.
The goal is to organize groups of functions by named sets,
corresponding to the underlying library which will be linked.
A LibcallLibrary is a named runtime library whose impls are made
available as a unit; its members use the same dag vocabulary as
LibcallImpls. The emitter emits one setAvailableLibFuncs_<name>
per distinct library name, merging same-named libraries under their
per-variant availability predicates. isLibraryAvailable()
is added as a stub for a future dispatch driver. No target
defines a LibcallLibrary, so generated output is mostly unchanged
(there are some incidental enum reorderings).
Reorganizing all of the library functions require a good bit more
infrastructure to be practical, but this is a minimally functional
piece to start the review.
[2 lines not shown]
RuntimeLibcalls: Stop providing __powitf2 on MSVCRT
MSVCRT does not provide the powi helpers, so gate the fp128 __powitf2 on
isNotOSMSVCRT alongside the f32/f64 __powisf2/__powidf2, instead of adding it
unconditionally. The unconditional add was a hack to satisfy a test that
expected a wrongly-typed powi call on windows-msvc.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
[clang] Implement the __builtin_type_order intrinsic for P2830R10 Constexpr Type Ordering (#216462)
This patch implements a __builtin_type_order intrinsic to support the
implementation of
[P2830R10](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p2830r10.html)
Constexpr Type Ordering.
The `__builtin_type_order` builtin returns a `std::strong_ordering` to
match GCC's behavior. Similar to GCC, we establish a total order over
all types by doing lexicographical comparisons over the mangled type
names. This may yield different orderings with different ABIs.
Resolves https://github.com/llvm/llvm-project/issues/146838
[clang][Sema] Handle function parameter packs in `PackDeductionScope::addPacks` (#215235)
`getDepthAndIndex` assumes its parameter never refers to a function
parameter pack. Bail out before calling it for function parameter packs.
Fix #28877. Fix #213760.
[lldb] Add MSVC STL/libstdc++ formatters for queue, stack, and priority_queue (#217241)
`std::queue`, `std::stack`, and `std::priority_queue` expose the
underlying container as a protected member named `c`. That name is
required by the standard
([queue.defn](https://eel.is/c++draft/queue.defn),
[stack.defn](https://eel.is/c++draft/stack.defn),
[priqueue.overview](https://eel.is/c++draft/priqueue.overview)), so one
synthetic frontend covers libc++, libstdc++, and MSVC STL.
libc++ already registered this frontend for the inline-namespace regex.
This also registers it for the un-inlined `std::` names used by
libstdc++ and MSVC STL, and moves the frontend to GenericQueue.cpp as
GenericContainerAdaptorFrontEndCreator.
Tests extend the generic queue suite to libstdc++
(queue/stack/priority_queue) and MSVC STL (Windows).
Part of #24834
[5 lines not shown]
TargetMachine: Verify option/module-flag consistency once per module
The -target-abi option / "target-abi" module flag conflict was reported from
the per-function getSubtargetImpl in RISCV and LoongArch, so a module with
multiple subtargets would repeatedly diagnose. Introduce a new TargetMachine
method to validate the module for the global options.
I wasn't sure the best place to actually perform this check. This is now
performing it in the earliest pass in codegen, MachineModuleInfo.
MachineModuleInfo is a glorified map from IR to MachineFunction, so I'm not
sure this is the right place. The other alternative I started with was the
AsmPrinter initialization.
Ideally we would eliminate the global options. In particular target-abi is
going to be a bit sticky, because it lives in MCOptions and is thus used by
non-codegen contexts which won't have an IR module to read a flag from.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[NVPTX] Add "exclusive" intrinsic variants for tcgen05.alloc/dealloc (#216016)
This patch adds `exclusive` intrinsic variants for `tcgen05.alloc` and
`tcgen05.dealloc`, which allow exclusive ownership of the allocation.
- `tcgen05.alloc{.exclusive}.cta_group.sync.aligned{.shared::cta}.b32`
- `tcgen05.dealloc{.exclusive}.cta_group.sync.aligned.b32`
---------
Signed-off-by: DharuniRAcharya <dharunira at nvidia.com>
[mlir:linalg:py] Undo unintentional type narrowing from #214539. (#217543)
This PR undoes the (presumably) unintenional type narrowing in the
Python overloads of the `TileUsingForOp` transform op introduced in
#214539. Previously, the overloads accepted `DynamicIndexList` as well
as `None` which the constructors they forward to still accept. The new
type signature, however, did not allow them anymore (even though it used
`= None` as default value). The PR, thus, simple adds back the two
types.
Signed-off-by: Ingo Müller <ingomueller at google.com>
[PAC][ELF] Remove NEEDS_{GOT,TLSDESC}_NONAUTH (#213452)
Currently we have all of NEEDS_GOT, NEEDS_GOT_AUTH and NEEDS_GOT_NONAUTH
(and similarly for TLSDESC), which takes up three bits, but is only
being used to encode four states (no GOT entry, a normal GOT entry, an
AUTH GOT entry, and an unsupported attempt to have both). This is a
waste of precious bits in the atomic uint16_t flags. Re-encode this in
the more natural manner; effectively NEEDS_GOT is now NEEDS_GOT_NONAUTH
and what was NEEDS_GOT is now implied by having either GOT type. Note
that, as part of this, there are a couple of functional changes.
Firstly, replaceWithDefined previously threw away NEEDS_GOT_AUTH and
NEEDS_GOT_NONAUTH which, under the previous encoding, gave you a
non-AUTH GOT entry regardless of what was requested, i.e. not an AUTH
GOT entry if that was requested (that would presumably then fail the
AUTDA operation in any user of it) nor an error if both were requested.
This may cause real software that currently links without error today to
no longer link, but any such cases are due to LLD emitting incorrect
output instead of detecting cases it doesn't support.
[26 lines not shown]
audio/gogglesmm: Update to 1.3.1
Big endian archs should be supported now, so remove BROKEN message.
Switch to pre-rolled release.
Options cleanup: Require a crypto library since most streaming services
use HTTPS, keeping OPENSSL as the default; remove TREMOR option since
libtremor was removed in 2023; remove ZLIB option since FreeBSD has zlib
support baked in.
https://github.com/gogglesmm/gogglesmm/releases/tag/1.3.0https://github.com/gogglesmm/gogglesmm/releases/tag/1.3.1
audio/gogglesmm: Update to 1.3.1
Big endian archs should be supported now, so remove BROKEN message.
Switch to pre-rolled release.
Options cleanup: Require a crypto library since most streaming services
use HTTPS, keeping OPENSSL as the default; remove TREMOR option since
libtremor was removed in 2023; remove ZLIB option since FreeBSD has zlib
support baked in.
https://github.com/gogglesmm/gogglesmm/releases/tag/1.3.0https://github.com/gogglesmm/gogglesmm/releases/tag/1.3.1