[OpenMP][OMPIRBuilder] Support complex types in atomic update/capture
Route struct-typed values through the libcall path in
`emitAtomicUpdate`.
Previously, the libcall path was gated on `RMWOp == BAD_BINOP`, so
atomic capture swap patterns (`v = x; x = expr`) for complex values
lowered as structs fell through to the cmpxchg path. That path called
`getScalarSizeInBits()` on a struct type, produced 0, and triggered an
assertion in `IntegerType::get()`.
Remove the `BAD_BINOP` restriction so struct types always use the
libcall path. This is safe because the libcall path does not use
`RMWOp` and already handles arbitrary type sizes correctly.
Also fix `LoadSize` in the libcall path to use `XElemTy` rather than
the pointer type, which previously gave the wrong size for larger
complex types such as `complex(8)`.
[3 lines not shown]
[XRay] Remove unused argument of DataExtractor constructor (NFC) (#191864)
`AddressSize` parameter is not used by `DataExtractor` and will be
removed in the future. See #190519 for more context.
[bolt] Remove unused argument of DataExtractor constructor (NFC) (#191841)
`AddressSize` parameter is not used by `DataExtractor` and will be
removed in the future. See #190519 for more context.
I took the liberty of switching from using the `StringRef` constructor
overload to `ArrayRef` where appropriate.
[flang][OpenMP] Avoid marking named main programs as declare target (#190250)
A bare `!$omp declare target` could incorrectly mark `_QQmain` as
`omp.declare_target` when it appeared in an interface body inside a
named
main program. That pulled host-only callees into device compilation and
caused offload link failures.
Fix this by skipping main programs in the implicit-capture path.
Also add a regression test for the named-main interface case and update
`real10.f90` to use a valid container for the bare `declare target`
form.
This fixes offload link failures where `_QQmain` was incorrectly treated
as
a device function and pulled in host-only symbols such as Fortran I/O
runtime calls.
Minimal reproducer:
[13 lines not shown]
[ToolChains][FreeBSD] Set default Linker to LLD for FreeBSD (#190596)
When the linker is specified as ld, toolchain applies special handling
by invoking (triple)-ld instead of resolving ld via standard PATH
lookup. This causes GNU ld installed via the system package manager to
take the precedence (since (triple)-ld appears earlier in the search
path), effectively overriding ld.lld.
As a result, we set the default Linker on FreeBSD to ld.lld to indicate
we want to use lld by default.
[clang][OpenMP][test] Use -fopenmp=libomp explicitly in driver smoke test (#191936)
Using -fopenmp uses the default openmp lib, which defaults to libomp but
may be something else. This test only passes with libomp, so it passes
when using default, but fails downstream if configured for something
else, like libgomp.
[CIR] Add addLLVMUsed and addLLVMCompilerUsed methods to CIRGenModule (#188189)
Upstreaming clangIR PR: https://github.com/llvm/clangir/pull/2092
This PR adds support for emitting llvm.used and llvm.compiler.used
global arrays in CIR.
Added addUsedGlobal() and addCompilerUsedGlobal() methods to
CIRGenModule
Adds __hip_cuid_* to llvm.compiler.used for HIP compilation.
Followed OGCG implementation in clang/lib/CodeGen/CodeGenModule.cpp