[libc++] Remove libc++'s own fenv.h (#194629)
Our own `fenv.h` only `#undef`s macros which the C header might define.
None of the libcs we support define any of these functions as macros, so
we can simply drop the header.
[libc++] Remove libc++'s own ctype.h (#194615)
Our own `ctype.h` only `#undef`s macros which the C header might define.
None of the libcs we support define any of these functions as macros, so
we can simply drop the header.
[libc++] Simplify more <random> engines (#195504)
This uses `if _LIBCPP_CONSTEXPR` to simplify and deduplicate some of the
code for the random engines.
[OpenMP][mlir] Add Groupprivate op in omp dialect. (#162704)
This PR adds omp.groupprivate mlir op to omp dialect.
The groupprivate directive specifies that variables are replicated, with
each group having its own copy. The operation takes a symbol reference
to a global variable and an optional device_type attribute, and returns
the address of its groupprivate copy.
Op representation:
`%gp = omp.groupprivate @global_var : !llvm.ptr`
`%gp = omp.groupprivate @global_var device_type(any) : !llvm.ptr`
LLVM IR translation:
On target devices (AMDGCN/NVPTX), the op is lowered to a new global
variable in the shared address space
On the host, the original global address is used as a fallback.
[libc] Enable socket entrypoints in overlay mode (#195035)
This is slightly tricky in that many of these functions depend on types
(struct sockaddrs, msghdr, ...) and we cannot overlay types. However,
this works because these functions are simple syscall wrappers which
simply forward the data to the kernel -- so it's really the kernel
that's defining these structures.
This approach is compatible with libraries which implement these
functions the same way, this includes at least glibc (on all
architectures) and musl (on 32-bit architectures). 64-bit musl repacks
the [c]msghdr structures to zero out padding fields, and overlaying that
can lead to subtle bugs. However, I believe that overlaying musl is not
a very interesting use case, so I'm leaving that as a TODO. If someone
is interested in doing that, they can either exclude these entrypoints
from the overlay or implement the musl-compatible repacking code.
[clang][RISCV] Use macro to check if intrinsics are supported (#187197)
Normally intrinsic support is decoupled from assembler support which
means we cant simply use arch string to check if intrinsics are
supported. This patch defines macros \__riscv_intrinsic\_{EXTENSION}
to check whether the intrinsics of EXTENSION is supported by this
compiler.
c-api-doc PR: https://github.com/riscv-non-isa/riscv-c-api-doc/pull/183
[AMDGPU][SIInsertWaitcnts][NFC] Remove HasExtendedWaitcnts from printer
The debug output no longer needs to distinguish between pre-gfx12 and
gfx12+ counter names. Drop the HasExtendedWaitcnts boolean from
getInstCounterName, Waitcnt::getPrintable, print, and dump, keeping
only the extended (gfx12+) names unconditionally.
Assisted-By: Claude Sonnet 4.6
[clang-tidy] Skip user headers named like C headers in `modernize-deprecated-headers` (#195507)
Previously `modernize-deprecated-headers` would match on any header with
the same name as standard library headers. This commit fixes the problem
by checking whether the include resolves to a system header.
Closes #45991
---------
Co-authored-by: Victor Chernyakin <chernyakin.victor.j at outlook.com>
[clang][bytecode] Create global variables for temporaries... (#195037)
... that are extended by other global variables.
If the temporary we create is extended by a variable that we index as a
global, create a global for the temporary, even if it's not an
`SD_Static` temporary.
[clang-format] Make ignored files unformatted instead of empty. (#170416)
Tools rely on the expectation that clang-format will output a formatted
file. In the case of ignored files, the formatted file should just be
the input file, untouched.
Fixes #170407