[flang][test] Expand test for legacy DATA initializer on invalid declarations (#222171)
Follow-up to #221170. Expands `flang/test/Semantics/data27.f90` with the
other shapes that crashed the same way before that fix and now produce
the expected error
Assisted-by: AI
[MLIR][Func] Enable strict property assembly format (#217300)
Enable the strict properties assembly format mode for the Func dialect.
Spell inherent call attributes directly in the call formats so they are
no longer parsed from attr-dict in strict mode.
Assisted-by: Codex
[Fuzzer] Bump rss_limit again. (#222187)
The two tests libFuzzer-x86-64-default-Linux::fork_corpus_groups.test
and libFuzzer-x86-64-default-Linux::fork.test have started being flaky
again on two of my bots, so bumping up the rss limit in the test which
temporarily solved the issue back in #204701.
See comment in #222187 for links to the bots and recent failures.
[MLIR][EmitC] Enable strict property assembly format (#217271)
Enable strict property assembly format mode for the EmitC dialect. Spell
call metadata directly in the affected declarative assembly formats and
drop unneeded property dictionaries from formats that already cover
their inherent attributes.
Refresh EmitC tests and related C++ target checks so call properties use
direct syntax while ordinary attributes remain in attr-dict.
Assisted-by: Codex
[libc++][NFC] Remove `optional::__get` (#217218)
Internal communicating functions `optional::__get` can be superseded by
either `value`, `operator*()`, or direct use of data member. Even though
`value()` is checked, checks are already performed before internal calls
to it, so compilers should be able to remove duplicated checks.
It is intended to use `opt.value()` instead of `*opt` to avoid undesired
argument-dependent lookup.
[CMake] Infer dependency-only projects from the cache
LLVM_ENABLE_PROJECTS historically treats projects enabled to satisfy another
project's dependency the same as projects selected by the user. Consequently,
implicit projects attach their complete build, install, and test suites to
LLVM's aggregate targets.
Keep the cache entry as the user-requested project roots and use the normal
LLVM_ENABLE_PROJECTS variable as the effective dependency closure. Projects in
the effective list but not the cache entry are configured with
EXCLUDE_FROM_ALL. Normalize the special all value before comparing the two
sets.
This makes Flang's MLIR and Clang dependencies dependency-only without a
second project collection. It also applies the same rule to Clang when it is
added for LLDB. Forward the cached roots to cross-compilation and bootstrap
configurations so implicit projects do not become explicit in nested builds.
Let MLIR own its dependency-only test policy: configure its complete test tree
[13 lines not shown]
[CIR][CMake] Configure MLIR as a dependency-only project
ClangIR requires MLIR, but enabling CIR currently requires users to list MLIR
explicitly in LLVM_ENABLE_PROJECTS. That also attaches all MLIR build, install,
unit-test, and lit targets to the corresponding LLVM aggregates.
When Clang is selected and CLANG_ENABLE_CIR is enabled, append MLIR to the
effective LLVM_ENABLE_PROJECTS list. The common project setup compares that
list with the cached user selection, so an explicit MLIR selection retains its
normal behavior while an implicit selection is configured with
EXCLUDE_FROM_ALL.
This makes MLIR targets available for CIR dependency resolution without adding
MLIR tests to check-all. Keep the existing standalone ClangIR restriction and
do not configure MLIR when CIR is disabled.
Validation:
- Configured Clang with CIR and implicit MLIR test support.
- Configured Clang and MLIR explicitly with CIR and tests enabled.
[6 lines not shown]
[AArch64] Form CCMP for CBB and CBH
AArch64ConditionalCompares forms CMP/CCMP chains to transform patterns
such as
Head Head
/ | CmpBB
/ | / |
| CmpBB => / |
| / | Tail |
| / | | |
Tail | | |
| | | |
... ... ... ...
where Head is terminated by a conditional branch and CmpBB contains
a cmp + conditional branch.
We usually try to split any fused conditional branches to be able to
[8 lines not shown]
[AArch64][CMPBR] Fix splitting of CBB/CBH instructions into ext + cmp (#221112)
We falsely split CBB/CBH instructions by explicitly extending the
second register operand instead of the first one, leading to the
following, wrong codegen:
cbh $wn, $wm, cc, trgt => sxth $wt, $wm
cmp $wn, $wt, cc, sxth
Correct is
cbh $wn, $wm, cc, trgt => sxth $wt, $wn
cmp $wt, $wm, cc, sxth
since cmp with extended register extends it's second, not its first
operand.
[MLIR][Linalg] Update transform tests for strict properties (#222184)
Update recently added vectorization tests to use the custom assembly
syntax.
Strict Transform dialect properties no longer parse inherent attributes
from the generic attribute dictionary.
These tests landed concurrently with the strict-properties migration.
Assisted-by: Codex
[libc][netdb] Add AI_* family of constants. (#221360)
* Provide the values for `AI_*` flags that are passed in `ai_flags`
field of `addrinfo`
structure to `getaddrinfo` calls.
* Reference some of those constant in a placeholder unittest. Rename it
to `getaddrinfo_test`
to clarify its scope (we'll likely be using different test files for
other netdb.h functions).
[CIR][NFC] Tighten the direct-offset test checks
The checks pinned the byte-8 literal and little else, and the CIR side only
checked signatures. They now chain the argument through the stride into the
store, on the callee and caller side both.
Assisted-by: Cursor / claude-opus-5
[clang][docs] Adopt the furo theme used by llvm and libc (#214869)
This change moves the static assets into utils/docs/llvm_sphinx, and
centralizes some of the furo theme logic there.
It then configures furo from clang/docs/conf.py and
clang/analyzer/docs/conf.py.
The temporary preview for the site is here:
https://clangdocs.staging.reidkleckner.dev/after/clang/docs/
The RFC is here:
https://discourse.llvm.org/t/rfc-use-furo-theme-for-clang-docs/91505/7
I plan to wait until at least Aug 13 before merging to gather more
feedback.
[docs] Remove TOCs from Clang docs to prepare for Furo migration (#214868)
This is a mechanical change generated by
`utils/docs/remove_page_tocs.py`. In case of conflicts, which are
likely, due to the ongoing markdown migration (#201242), this script can
be re-run to regenerate the change. I'm creating a separate PR for it to
minimize the diff on the functional changes for the furo PR.
[libc][bazel] Allow building with -DLIBC_FULL_BUILD (#218992)
This PR defines a flag `--@llvm-project//libc:build_mode` that
configures LLVM-libc to build with full-build flags. This is only
compatible with clang at the moment, since it relies on the
`-nostdlibinc` flag.
This PR contains the logic for LLVM-libc full build in Bazel. A largely
AI generated follow-on PR has `libc/BUILD.bazel` changes for building
libc targets in full-build mode:
https://github.com/llvm/llvm-project/pull/218993.
[libc][bazel] Add a repo with linux kernel UAPI headers (#216867)
This PR exposes a target `@linux_uapi//:linux_uapi_headers` that points
to a local directory configured by the `LINUX_UAPI_INCLUDE_DIR`
environment variable. Linux UAPI headers are required to support libc's
`FULL_BUILD` configuration, which uses `-nostdlibinc` and thus requires
a copy of linux kernel headers.