[libc] Enable full-build code coverage (#221802)
Extended LIBC_ENABLE_COVERAGE to support LLVM_LIBC_FULL_BUILD=ON and
added the LIBC_ENABLE_COVERAGE_MCDC CMake option for MC/DC coverage.
This enables developers and CI pipelines to measure source-level and
MC/DC coverage directly on hermetic tests in full-build configurations
without relying on the host C library.
Updated add_libc_hermetic in LLVMLibCTestRules.cmake to link hermetic
tests with -noprofilelib, -u__llvm_profile_runtime, and compiler-rt's
profiling library. Replaced internal entrypoint objects in
link_object_files with public entrypoint objects for the C functions
referenced by libclang_rt.profile.a.
Added calloc and __errno_location to HermeticTestUtils.cpp to satisfy
remaining freestanding profiling runtime dependencies. Updated
libc/docs/dev/code_coverage.md with full-build instructions.
Assisted-by: Automated tooling, human reviewed.
[libFuzzer] Use uppercase "B" for byte units in output (#220828)
Fixes issue #56766. libFuzzer printed data sizes as "b", "Kb" and "Mb",
which denote bits. Use "B", "KB" and "MB" instead.
[ConstantTime] Use ARITH_FENCE as the combine barrier in CT_SELECT expansion
Replace the CopyToReg/CopyFromReg vreg barrier in ExpandCTSELECT with
ISD::ARITH_FENCE. The legalizer no longer creates vregs or picks register
classes via getRegClassFor, and scalable vectors are now covered too.
Codegen tests regenerated; output stays branchless.
PPC: Replace EnableAIXExtendedAltivecABI with "target-abi" module flag
Continue purging ABI-influencing TargetOptions fields. Eliminate this case
by migrating to a module flag, reusing the generic target-abi module flag
with a new value.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
PPC: Read the ELF ABI from the "target-abi" module flag
Resolve the ELFv2 ABI from the effective ABI name module flag,
rather than strictly relying on the -target-abi flag.
Also start emitting "target-abi" for PPC from clang.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[libc++] Remove __libcpp_allocate (#220981)
We use `__libcpp_allocate` and friends only in very specific
circumstances. Instead of providing a private API we can make
`std::allocator` the default API for the uses of `__libcpp_allocate`.
[OpenMP] Change association of some directives from "none" to "explicit"
Certain declarative directives are associated with base language
declarations by having the declared entities explicitly listed as
arguments.
Previously these had "none" in OMP.td. Change them to "explicit"
to be consistent with the spec. The existing code does not require
any changes, since the only potentially affected code would be that
which checked the assocation for "none", and the only such cases
were applied to executable directives.
[MLIR][XeGPU] Lower arith.truncf wider than one xevm.truncf group (#217130)
`xevm.truncf` lowers to device builtins that convert exactly 16 f16/bf16
elements
per call, so `TruncfToXeVMPattern` only matched a 16-element source. A
workgroup-level mxfp GEMM that quantizes A in the kernel produces a
wider one,
which nothing else lowers, so the module failed to build:
%r = arith.truncf %a : vector<32xbf16> to vector<32xf4E2M1FN>
// cannot be converted to LLVM IR: missing
`LLVMTranslationDialectInterface`
// registration ... for op: arith.truncf
Convert a whole number of groups at a time instead: slice the source
into
16-element groups, emit one `xevm.truncf` per group, and concatenate the
packed
results before the final bitcast. A source of exactly one group takes
[7 lines not shown]