[NFC][TSan] Lock ThreadRegistryLock inside ScopedReport::AddThread and AddLocation (#228814)
Among ScopedReport methods, only AddThread and AddLocation
(via IsThreadStackOrTls) have ever accessed ctx->thread_registry;
AddMemoryAccess, AddMutex, AddStack, AddSleep, AddUniqueTid, and
SetCount only populate ScopedReport::rep_.
Now that ScopedReport's constructor (#228614) and ReportRace (#228813)
no longer require callers to hold ThreadRegistryLock, acquire
ThreadRegistryLock inside ScopedReport::AddThread and
ScopedReport::AddLocation instead of locking ctx->thread_registry in
each caller around ScopedReport population.
Assisted-by: Gemini
[compiler-rt][ubsan] Link -ldl in hsa-missing.cpp (#229343)
hsa-missing.cpp calls dlsym() directly without linking -ldl, relying on
dlsym being merged into libc (true on glibc >= 2.34, not on older
glibc). This fails to link on older glibc:
```
ld.lld: error: undefined symbol: dlsym
```
Add -ldl explicitly, it is a no-op on newer glibc where libdl is kept as
an empty compatibility stub.
Co-authored-by: Riyaz Ahmad <riyaz.ahmad at ibm.com>
Share one no-loop eligibility check between exec mode and body
The kernel is tagged SPMD_NO_LOOP by a single check, and the body is
emitted loop-free exactly when the kernel carries that tag. Add tests
for the clauses that block promotion.
NAS-144133 / 27.0.0 / Load zettarepl state from the database on failover (by themylogin) (#19957)
Original PR: https://github.com/truenas/middleware/pull/19899
Co-authored-by: themylogin <themylogin at gmail.com>
[flang][mlir][OpenMP] Report Fortran names for privatized target maps (#228195)
Privatized, firstprivate and implicitly captured variables offloaded to
a target device were reported as "unknown" in LIBOMPTARGET_INFO debug
output. This PR addresses this by adding the variable names to the
offload mapping information:
- `MapsForPrivatizedSymbols` now sets the name on the omp.map.info it
creates,
recovering it from the hlfir.declare uniq name or, for anonymously boxed
values (e.g. a firstprivate array), from a NameLoc on the descriptor's
alloca.
- `privatizeSymbol` tags that alloca with a NameLoc carrying the symbol
name
so the pass can recover it when there is no hlfir.declare.
- `createMappingInformation` gains an optional map name and prefers it
over the
location-derived name; the OpenMP translation forwards each map's name
attribute for both parent and member entries.
[64 lines not shown]
AMDGPU: Use HasUsableDSOffset for LDS read2/write2 patterns (#229446)
The 64-bit and 128-bit LDS patterns that split into read2/write2 were
predicated on isGFX7Plus, based on the usable offset condition. Use a
named predicate instead of the version check.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[SystemZ][z/OS] Keep read-only data in the code section only if local and without relocations (#226683)
Read-only data stayed in the code section unless it was classified as
`ReadOnlyWithRel`. This is wrong in two cases:
- Externally visible read-only data: references from other translation
units are always parts in the WSA, so the binder cannot resolve them
against a label in the code section (IEW2456E, name space 3).
- Local read-only data with relocations to local symbols, such as a
`static const` table of pointers to internal functions: with the z/OS
relocation model `DynamicNoPIC`, `getKindForGlobal` returns `ReadOnly`
for an initializer that needs only local relocations. The entries point
to function descriptors in the WSA, and the binder rejects an address
constant from the code section into the deferred WSA (IEW2353E, error
code 250001). #223055 does not cover this case.
This patch:
- In `getKindForGlobal`, returns `ReadOnlyWithRel` on GOFF for every
[24 lines not shown]
[mlir][docs] Clarify operation parser generation context (NFC) (#229460)
Explain how GenContext and ODS optionality control attribute parsing,
and why attributes are required once an optional group selects a branch.
Assisted-by: Codex
[NFC][TSan] Use ScopedReport::AddThread(Tid) in ReportRace (#228813)
Inline FindThreadByTidLocked into ScopedReport::AddThread(Tid) and
enable it on Go so ReportRace can call rep.AddThread(tid) directly
instead of manually looking up ThreadContext via GetThreadLocked.
Assisted-by: Gemini
[SeparateConstOffsetFromGEP] Simplify zero operands when rebuilding indices (#229209)
Minor cleanup and simplification around removing redundant zero operands
when rebuilding GEP indices.
[KnownFPClass] Fix KnownFPClass::frem subnormal handling and improve deductions. (#219303)
Fixes input/output subnormal handling for `KnownFPClass::frem` as
discovered here https://github.com/llvm/llvm-project/pull/219091
Also improves the deductions made by `KnownFPClass::frem`. Such as
ruling out sNaN if neither argument is sNaN.
`KnownFPClass::frem_self` deductions were also improved.
[X86] Implement CRC32 const folding (#219452)
This replaces calls to `llvm.x86.sse42.crc32.32.8` and similar functions
with calculated value in the InstCombine pass.
AI Assistance (ChatGPT Web) was used to understand LLVM codebase
structure (as a beginner) and especially around the testcase generation.