[CIR] Add cir.coro.intrinsic.promise Op (#221124)
This PR adds `cir.coro.intrinsic.promise`, representing
`llvm.coro.promise`, to the set of coroutine intrinsic ops. It also adds
the corresponding lowering to `llvm.coro.promise`.
[CI] Require hashes for pip install in metrics container (#221373)
We generate the requirements lock file with hashes, but did not actually
require them before now, which is best practice.
[clang-tidy] Normalize windows line filter paths (#217038)
`git | clang-tidy-diff.py` emits line-filter paths with forward slashes,
while Windows compilation databases use a mix of forwards and backwards
slashes. These paths are then silently rejected (and no report is
emitted).
Reproduce on windows via:
```
git.exe diff -U0 main -- . | python clang-tidy-diff.py -p1 -path .\build"
```
Git will produce a path like:
```
my/source/file.cpp
```
The compilation database has files with entries like this:
```
[18 lines not shown]
[clang][docs] Generate command line reference as Markdown (#220385)
Update the Clang option documentation emitter to generate MyST Markdown
for the generated command-line reference page. I discovered and
preserved a complicated existing Sphinx program-name workaround for
option IDs that collide after punctuation normalization.
The only markup on Options.td is in the DocBrief fields, and those use
very little markup, so those were all migrated by the agent, not
rst2myst. I unindented the multi-line DocBrief bodies, because
indentation has semantics in both markdown (list indentation) and reST.
Tracking issue: #201242
0.1288% pixels differ in the rendered HTML page.
Assisted-by: Codex
[mlir][openacc] Avoid per-routine module walks in ACCRoutineToGPUFunc (#221345)
ACCRoutineLowering uniquifies the specialized device copy (foo -> foo_0)
while acc.specialized_routine still names the original host function.
Moving those copies into gpu.func then called replaceAllSymbolUses on
the whole module once per routine, which is quadratic in the number of
specialized routines.
Collect the src->dest renames and rewrite symbol uses in a single walk
of the module body (still skipping nested symbol tables). Insert the
gpu.func ops under the final names afterward.
On a large TU this speeds up this pass by 3.5x
[clang][win] Extend scoped enum varargs for the Windows x64 ABI (#221356)
Fixes #220712
Scoped enum values don't undergo default integer promotions, so they
don't naturally get extended to 32-bit integers. However, MSVC appears
to extend scoped enum values, *specifically* when they appear as
variadic arguments, but *not* when the are passed as fixed arguments:
https://godbolt.org/z/oGozjMnEn
I think we should do the same. I think the main upshot here is that
users will be able to `printf("%d\n", my_u8_enum);` without casting to
`int` explicitly. Even if the `va_arg(ap, int)` on the printf side is
*technically* UB, this seems like a sharp corner we really ought to sand
off.
I dug up some references for how we handle this on the SysV side, and it
seems that we do extend there: a71cc1536167f44f542da2857685f01aa29c0e55
[3 lines not shown]
[WebAssembly] Add support for import and export name attributes on global vars (#201966)
Currently these attributes are only supported on functions.
This change adds support for import_name, export_module and export_name
to global variables.
For addrspace(1) global variables, which lower to wasm globals, they are
directly appended to the
wasm export. For addrspace 0 globals, the address is exported.
It also fixes the behavior of the existing export_name attribute on
functions, implementing correct
merging behavior to handle cases of duplicate or conflicting
declarations.
Assisted-by: Antigravity
[clang][Sema] Use DenseMap for SpecialMemberCache (NFC) (#221304)
This patch replaces llvm::FoldingSet with llvm::DenseMap for
SpecialMemberCache in Sema.
SpecialMemberCache is fundamentally a key-value cache that maps a class
and qualification flags to a SpecialMemberOverloadResult. The current
implementation is heavy because each entry in FoldingSet requires a
160-byte SpecialMemberOverloadResultEntry on the bump allocator arena.
LookupSpecialMember returns SpecialMemberOverloadResult by value. As
such, there is no need to use the bump allocator for pointer stability.
This patch also removes FastFoldingSetNode as we are removing the last
use.
Assisted-by: Antigravity
[Docs] Document IR printing options (#221260)
Document the pass-by-pass IR printing options in DebuggingLLVM.md.
This covers:
- selecting passes by name or invocation number;
- change-only printing and output scope;
- filtering by pass, function, and source location;
- source-location filter syntax, matching behavior, and an example;
- persistent metadata IDs in repeated debug dumps.
This is a follow-up to #203393 and the documentation request in
https://github.com/llvm/llvm-project/pull/203393#pullrequestreview-5103117577.
[NFC][SelectionDAG] Give the contract PatFrags a GlobalISel predicate (#219725)
The contract PatFrags carried only a PredicateCode, so GlobalISelEmitter skipped every pattern built on them.
Assisted-By: Claude Code 5
[NVPTX] Support volatile local loads and stores in PTX 9.1 (#217764)
PTX ISA 9.1 adds support for the `.volatile` qualifier with the `.local`
state space on `ld` and `st` instructions.
Emit `ld.volatile.local` and `st.volatile.local` when targeting PTX 9.1
or later. Earlier PTX versions retain the existing plain local
load/store lowering.
Add code-generation coverage for both PTX 9.0 and PTX 9.1.