[flang][OpenMP] Fix metadirective loop semantic checks
This is a follow-up to #207088.
Post-merge review feedback:
* Rename mayVariantBeSelected to MayVariantBeSelected and move it to
the shared OpenMP semantic utilities so declare-variant checking can
reuse it.
* Explain why a WHEN selector is recorded only when its modifier list
contains exactly one element.
* Diagnose loop-associated variants that end a declaration-only
program unit, such as a module with no execution part.
Additional correctness fixes:
* Handle consecutive metadirectives and modules or submodules with
contained procedures without silently dropping an earlier
loop-associated variant.
[7 lines not shown]
[libc++] Add a workflow to run libc++ benchmarks on historical commits (#208080)
This allows triggering a workflow that benchmarks a given commit on both
macOS and Linux, and optionally submits the results to a LNT instance
(by default lnt.llvm.org).
Triggering this workflow requires write access to the LLVM monorepo, so
the inputs can be trusted to a large extent.
The intent is for this workflow to be triggered semi-automatically by a
combination of scripts and manual intervention. For example, we can
reuse a script like libcxx/utils/ci/lnt/commit-watch to automatically
trigger the workflow on new commits, while also requesting new commits
when bisecting regressions, etc. Since workflows can be dispatched via
the Github API, this should easily be scriptable.
A few important improvements are currently missing from this workflow
and left for future patches:
- The ability to select only a subset of configurations to run
- Additional configurations, such as unstable ABI, hardening, etc.
AMDGPU: Validate processor and features in TargetID parsing
TargetID::parseTargetIDString previously only checked that the string was
structurally a 4-component triple followed by a processor field. It
accepted unrecognized processors and silently ignored malformed or
unsupported feature modifiers. Work towards improving validation so in
the future clang's copy of TargetID can be replaced.
Co-authored-by: Claude (Opus 4.8)
[SSAF][NFC] Rename operator new/delete pointers analysis to TypeConstrainedPointers (#208577)
There will be more such pointer entities that must retain their type
during the clang-reforge transformation. Since they are extracted and
processed similarly, combining them into a single analysis simplifies
maintenance. Therefore, we are using TypeConstrainedPointers as the
umbrella name.
[libcxx] Avoid including deprecated ClangTidyModuleRegistry.h (#208945)
Deprecated in 1bcf74006bcf528d14377173dba459759d35c961. Causes warnings
during compilation and will presumably become an error.
[AArch64] Lower fixed width bf16 fpext (#209194)
This was previously hitting an error with a illegal
FP_EXTEND_MERGE_PASSTHRU being created but not selectable. Split
bf16->f64 fpext into bf16->f32 and f32->f64 fpext as we do elsewhere
(the first step has no rounding).
The codegen for loads is pretty inefficient because the load gets
expanded / scalarized.
[libc][realpath] Validate path components.
This PR updates `realpath` to validate paths and return `ENOTDIR` or `ENOENT` according to https://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html.
This PR also bumps the memory limit in `HermeticTestUtils.cpp`. The realpath unit tests allocate quite a few strings. Since memory in hermetic tests is never free'd, the unit test quickly reaches the limit.
[offload][OpenMP] Add atomic cross-team reductions
Regular cross-team reductions have two phases: the intra-team reduction
and the inter-team reduction. Atomic cross-team reductions replace the
second phase with a atomic instruction which is used by the main thread
of each team to directly fold the result of the intra-team reduction
into the final result. Since this requires a combination of "data type"
and "combine operation" for which an atomic instruction is available,
only some (but very common) reductions can be transformed to atomic
reductions. In cases where multiple reductions are performed on the same
construct, the atomic path is only taken if all reductions can be
transformed. Otherwise, we fall back to the regular cross-team reduction
using a buffer with per-team slots. This is not strictly necessary, but
hybrid reductions would induce more complexity with questionable
benefit.
Selecting an atomic path might not be the best option for every
situation, which is why it is not enabled by default. Instead, it can be
enabled via `-fopenmp-target-fast-reduction`. This flag has already been
[20 lines not shown]