IR: Add avr_builtincc calling convention keyword
AVR_BUILTIN had no textual IR name so it was printed as "cc86". Use
the same avr_builtincc spelling the MLIR LLVM dialect already uses for
this calling convention.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Fold the undef-use test into peephole.mir
A separate file costs an llc run for one function. Run the file with
-passes while here.
Assisted-by: Claude Opus 5.5
[RISCV] Remove TuneConditionalCompressedMoveFusion from sifive-p870-d. (#245766)
This feature has been disabled in some sifive-p870-d implementations.
When hardware doesn't support this optimization, the branch is treated
as a normal branch and may mispredict. Disable the tuning feature so
that we will use Zicond instructions instead.
[NFC][AMDGPU] Make DsAtomicAsyncBarrierArriveB64PipeBug a target feature
Fixes LCOMPILER-3199.
This PR was assisted by AI but I reviewed all the changes.
[GISel] Use CastTy.getElementType() in LLT::vector calls in bitcastExtractSubvector/bitcastInsertSubvector.
This avoids creating a vector s types on targets that use extended LLTs.
Assisted-by: Claude
[CIR] Enable CallConvLowering for SPIRV triples (#244409)
This PR adds support of spirv* triples to clang CIR pipeline:
- Map `spirv`, `spirv32` and `spirv64` triples (excluding AMD-vendor
SPIR-V, HLSL, and OpenMP device code) to the SPIR-V ABI target in the
clang pipeline, so `cir-call-conv-lowering` pass runs by default for
SPIR-V device code.
- Add clang tests that check SPIR-V argument types, return types, C++
records, SYCL and CUDA kernel arguments, and the Intel vendor triple
against classic codegen, plus a test of which SPIR-V triples run the
pass. Add ClangIR RUN lines to the existing SPIR-V kernel ABI tests.
Assisted by: Claude Opus 5.5
[acc][flang] Query whether a call captures a variable address (#245415)
`OpenACCSupport::isAddressNotCapturedByCalls` reports whether a call
that receives a variable can still use that address after it returns.
The method is optional. The default is false, so the address may be kept
and a client treats the call as an escape.
The FIR implementation answers from the variable's fir.declare. The
result is true for a Fortran user variable that is not TARGET or
POINTER, not host-associated, not accessible to an internal procedure,
and not asynchronous or volatile. intent(in) does not change the result.
A value that is not a Fortran user variable returns false.
[flang][OpenMP] Rank METADIRECTIVEs nested in BEGIN METADIRECTIVE
Inside the body of a BEGIN METADIRECTIVE, semantics does not know which
replacement encloses the code, so it checks every replacement of an
inner METADIRECTIVE against its loop. In
!$omp parallel
!$omp begin metadirective &
!$omp& when(implementation={vendor(llvm)}: target) otherwise(nothing)
!$omp metadirective &
!$omp& when(construct={parallel}: simd collapse(2)) &
!$omp& otherwise(nothing)
do i = 1, n
end do
!$omp end metadirective
!$omp end parallel
the region always selects TARGET, which hides the enclosing PARALLEL,
so the inner METADIRECTIVE always selects NOTHING. The SIMD is still
[13 lines not shown]
[clang-tidy] Fix macro-parentheses locations around escaped newlines (#242940)
Skip leading escaped newlines when locating diagnostics and opening
parentheses. Use physical token ends for closing parentheses so fixes
also handle tokens split across lines.
Add regression coverage for multiline macro arguments and replacement
lists, and verify that the rewritten macros compile.
Fixes #26644.
[RuntimeDyld] [COFF] Load zero-sized sections (#242218)
Symbols can be defined in zero-sized sections, e.g. a zero-sized object
(such as an empty struct in C, in mingw mode) in .bss. Previously, such
sections weren't loaded, and their load address was zero, making symbols
in them resolve to address 0.
On AArch64, since f330666ac78564db6651c81cd1d4658ff27758a8, this
triggers an error about an out of range ADRP relocation (previously the
relocation was silently truncated), making
clang/test/Interpreter/pretty-print.c fail on aarch64 mingw.
The failing construct was the empty struct in the test statement "struct
S1{} s1; s1".
This test only failed in aarch64 mingw configurations, not in aarch64
msvc configurations (which are covered with buildbots). In MSVC mode,
the empty struct is padded to 4 bytes, so the .bss section doesn't end
up empty. Also, in the mingw configurations, the testcase only failed on
[8 lines not shown]
sun60i_a733_r_ccu.c ... attempt to fix clang build.
Correct what looks to be a cut&paste & forget to edit bug, which
looks to be preventing this building using clang, and might easily
be generating bad (unintended) results from gcc builds.
Feel free to revert if this was a bad assumption.
[clang][docs] Show matcher names in link color without hovering (#242931)
Apply link styling to matcher names at rest so readers can discover that
clicking them expands their documentation.
Fixes #26571.
[flang][OpenMP] Check only selectable METADIRECTIVE replacements
Semantics checks METADIRECTIVE replacements against the loop that
follows them even when they can never be selected. It skips only
replacements whose device, implementation or user traits cannot match;
it does not rank the replacements and ignores construct selectors. In
!$omp metadirective &
!$omp& when(user={condition(score(10): .true.)}:) &
!$omp& when(user={condition(score(5): .true.)}: do collapse(2)) &
!$omp& otherwise(nothing)
do i = 1, n
end do
NOTHING always wins, but the DO is reported because the loop is not a
nest of depth 2.
Rank the replacements with the functions that lowering uses, in a
construct context built from the enclosing directives with
[9 lines not shown]