[PISA] Add PISA GlobalISel lowering, legalization and combiners
Add the PISA GlobalISel lowering path: call lowering, the legalizer rules,
register-bank information and the pre/post-legalization combiners, together
with the machine-function info, frame lowering, and the target-machine
pipeline through register-bank selection.
Adds GlobalISel LIT tests for legalization and the combiners. Instruction
selection is added in the following change.
[AMDGPU] Extend wmma C-reuse delay skip to gfx12+
Apply the skip to all gfx12+ wmma/swmmac, not just gfx1250 XDL, and
match the srcC register exactly rather than by overlap so partial
overlaps keep their delay.
[AMDGPU][GlobalISel] Pre-commit tests for readanylane merge regbank combine (NFC)
Add regbank-combiner tests covering a copy to vgpr whose source is a
merge or build_vector of G_AMDGPU_READANYLANE results and uniform
values. These currently keep the round trip through sgprs, and also
cover the cases where the merge has another user and where all merge
sources are uniform.
Co-authored-by: Cursor <cursoragent at cursor.com>
[AMDGPU] Model WMMA co-execution windows in the scheduler for gfx1250 (#204077)
WMMA instructions in gfx1250 exposes an execution window during which
only certain other instruction classes may co-execute. Teach the hazard
recognizer about those windows so the scheduler can fill co-execution
slots and account for the resulting stalls. This adds a preRA hazard
recognizer mode.
Add AMDGPUCoExecInfo.h, a shared model of a co-execution window: the
per-stage capability bitmask, the stage types (CoExecStageType), and
CoExecInfo, which maps a multi-cycle instruction to its per-cycle slot
pattern via getCoExecInfo(). InstructionFlavor and its helpers move here
from AMDGPUCoExecSchedStrategy.h with no functional change so they can
be shared by the scheduler and the hazard recognizer.
[cmake][docs] Fix incremental docs builds under deletion and renames (#211411)
Currently clang, flang, and libc all copy documentation from the source
tree into the build tree in preparation to build it, usually to create a
combined tree that includes generated documentation files, like
AttributeReference.md. However, renaming a document and rebuilding
without cleaning the docs tree leaves behind stale documentation files
that can accumulate.
This patch fixes the problem with two build actions:
1. List source documentation files. Always out of date, always
regenerates on every doc build, but it's very cheap.
2. Copy all source documents to the output, and delete any file that
neither originates from the source directory nor is mentioned as a
generated source to preserve.
These actions are implemented as CMake script files (`cmake -P`) since
they do things not covered by the builtin tools (`cmake -E
[5 lines not shown]
[CIR] Accept unions in x86_64 calling-convention lowering (#214129)
Passing a union to a function does not work. The x86_64 bridge rejects
every one, so the pass fails on any signature naming a union.
Additionally, indirect arguments have their byval and sret alignment
wrong, because `mapCIRType` asks DataLayout for it, and DataLayout only
sees a record's members, never `__attribute__((aligned(N)))`.
Unions now go through the ABI library's union type, which puts every
member at offset zero and sizes each eightbyte from the union rather
than from a single member. The alignment comes from the record-layout
metadata the AST already fills in, which fixes over-aligned structs too,
since they share that lookup.
Assisted-by: Cursor / claude-opus-5
[docs] Mechanically convert clang-tools-extra/docs to MyST using rst2myst
Run rst2myst on all 13 top-level .md files (renamed from .rst in the
prior change) and on ReleaseNotesTemplate.txt.
[docs] Fix MyST migration of clang-tools-extra/docs
Apply LLM-assisted cleanup on top of the mechanical rst2myst conversion:
- Add MyST frontmatter and Jinja2 substitution expressions to ReleaseNotes.md
and ReleaseNotesTemplate.txt
- Convert {eval-rst}/.. option:: blocks to native :::{option} directives
- Fix garbled {program} role in clang-change-namespace.md
- Remove escaped hyphens (\-) from clang-doc.md bullet list
- Remove spurious 0\. escape in clang-include-fixer.md
- Remove trailing :: code-block introducers from pp-trace.md; add yaml
language tag to all 31 YAML code fences in pp-trace.md
- Replace reference-style Markdown doxygen link in index.md with raw HTML
- Fix redirect_target angle brackets in clangd.md frontmatter
- Update Python tooling scripts to write Markdown-format release notes
- Convert ReleaseNotesTemplate.txt to MyST Markdown
[AMDGPU][GlobalISel] Pre-commit tests for readanylane merge regbank combine (NFC)
Add regbank-combiner tests covering a copy to vgpr whose source is a
merge or build_vector of G_AMDGPU_READANYLANE results and uniform
values. These currently keep the round trip through sgprs, and also
cover the cases where the merge has another user and where all merge
sources are uniform.
Co-authored-by: Cursor <cursoragent at cursor.com>