LLVM/project 0725c48llvm/lib/CodeGen/SelectionDAG LegalizeTypes.h LegalizeVectorTypes.cpp, llvm/test/CodeGen/AArch64 default-partial-reduce.ll

[AArch64] Fix widening of half/bfloat partial reductions. (#220261)

Includes testing aimed at letting us use partial reductions as the
default for add/fadd reductions when ordering isn't required.
DeltaFile
+1,150-0llvm/test/CodeGen/AArch64/default-partial-reduce.ll
+13-0llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+1-0llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
+1,164-03 files

OPNSense/core 36bde9dsrc/opnsense/www/js opnsense_ui.js

ui: dialog search field, minor cleanups
DeltaFile
+8-10src/opnsense/www/js/opnsense_ui.js
+8-101 files

LLVM/project b13a22ellvm/lib/Target/AMDGPU AMDGPU.td, llvm/unittests/TargetParser TargetParserTest.cpp

Apply batched suggestions from code review

Co-authored-by: Chinmay Deshpande <chdeshpa at amd.com>
DeltaFile
+2-2llvm/lib/Target/AMDGPU/AMDGPU.td
+0-1llvm/unittests/TargetParser/TargetParserTest.cpp
+2-32 files

LLVM/project 36cf06dutils/bazel/llvm-project-overlay/llvm BUILD.bazel

[Bazel] Fixes e4ef6e5 (#220598)

This fixes e4ef6e5ba3c82ec467840774949f38eb7085d7a8 (#220564).

Buildkite error link:
https://buildkite.com/llvm-project/upstream-bazel/builds?commit=e4ef6e5ba3c82ec467840774949f38eb7085d7a8

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+4-8utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+4-81 files

LLVM/project be3bc93llvm/lib/Target/AMDGPU AMDGPU.td

Update AMDGPU.td
DeltaFile
+1-1llvm/lib/Target/AMDGPU/AMDGPU.td
+1-11 files

FreeBSD/src 8fab8b3tests/sys/netpfil/common rdr.sh

tests/netpfil: xfail ipfnat_local_redirect testcase

PR:             296944
Reviewed by:    cy
MFC after:      3 days
MFC to:         stable/15
Sponsored by:   The FreeBSD Foundation
DeltaFile
+2-0tests/sys/netpfil/common/rdr.sh
+2-01 files

LLVM/project cae8f2bllvm/lib/Target/AMDGPU AMDGPU.td, llvm/unittests/TargetParser TargetParserTest.cpp

AMDGPU: Fix LDS bank count for gfx704 and gfx950

Both inherited a bank count that does not match the hardware: Bonaire
has 16 banks, and gfx950 doubled the count to 64 along with its larger
LDS. The ROCm device metadata has reported these values all along, so
the subtarget and the TargetParser table were the outliers.

Moving the count out of FeatureISAVersion9_4_Common is required because
the emitter rejects a GPU whose feature closure sets a field twice.

Change-Id: I9b6fb9edafbf3f2c5eb834308cc8388604382160
Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
DeltaFile
+4-2llvm/lib/Target/AMDGPU/AMDGPU.td
+4-0llvm/unittests/TargetParser/TargetParserTest.cpp
+8-22 files

LLVM/project 89b21belibc/test/src/stdio fputc_test.cpp

[libc] Stop printing \0 in stdio/fputc_test.cpp (#220544)

This test defines two strings in the form of constant char[] arrays, and
then loops over the characters of each one using a range-for. This
iteration includes the implicit terminating \0, which is printed to the
output channels along with everything else. This is mildly inconvenient
because the presence of a \0 in a log file causes standard tools like
`grep` and `less` to default to treating it as binary.

Now each loop breaks before printing the NUL, so the characters sent to
the output streams are exactly the same as in fputs_test.cpp.

Also, while I was here, I moved the check of fputc's return value into
the loop, so that it's checked on every iteration instead of just the
final one, matching the other loop checking putchar. (Surely this was
intended all along; there was no comment explaining the difference.)
DeltaFile
+5-1libc/test/src/stdio/fputc_test.cpp
+5-11 files

FreeBSD/ports 03159bdwww/freenginx-devel Makefile Makefile.extmod

www/freenginx-devel: third-party modules management

- njs module security update to 1.0.1

Bump PORTREVISION.

Sponsored by:   tipi.work

<ChangeLog>

nginx modules:

*) Security: fixed an access control bypass in js_access when an
   asynchronous request body continuation threw an exception or
   produced an unhandled rejection.  Previously, nginx could continue
   processing the request as though the js_access check had succeeded.
   Thanks to Ta Duc Thien.

*) Security: fixed a worker process crash when reading

    [48 lines not shown]
DeltaFile
+3-3www/freenginx-devel/distinfo
+1-1www/freenginx-devel/Makefile.extmod
+1-0www/freenginx-devel/Makefile
+5-43 files

LLVM/project 3ae01afflang/include/flang/Optimizer/Builder/Runtime Intrinsics.h

[flang][NFC] Remove dead declarations and fix include guard (#219961)
DeltaFile
+3-10flang/include/flang/Optimizer/Builder/Runtime/Intrinsics.h
+3-101 files

FreeNAS/freenas c9db3easrc/middlewared/middlewared/plugins/interface bond.py

NAS-142731 / 26.0.0-RC.1 / Fix bond transmit hash policy never reaching the kernel (by Qubad786) (#19594)

## Problem
The stored hash policy string was translated into the `truenas_pynetif`
enum by member-name lookup. The stored values are `layer2`, `layer2+3`
and `layer3+4`, while the enum members are `LAYER2`, `LAYER23` and
`LAYER34` — `+` cannot appear in a Python identifier, so two of the
three resolved to `None`, and `getattr`'s default swallowed the miss
with no log or exception. The netlink attribute was then never packed
and the kernel silently kept its default `layer2`, so outbound traffic
could not spread across bond members. Every LACP/LOADBALANCE bond
defaults to `layer2+3`, so this was not limited to people who picked a
policy explicitly. `lacpdu_rate` goes through the identical construct
and only works because `SLOW` and `FAST` happen to be valid identifiers.

## Solution
Map the choice enums to library members explicitly, behind two helpers
that take the stored string and return an enum or `None`. Dict literals
rather than a name lookup, so a rename on the library side becomes a

    [4 lines not shown]
DeltaFile
+9-2src/middlewared/middlewared/plugins/interface/bond.py
+9-21 files

FreeNAS/freenas ad5686asrc/middlewared/middlewared/plugins/interface bond.py

NAS-142731 / 26.0.0 / Fix bond transmit hash policy never reaching the kernel (by Qubad786) (#19593)

## Problem
The stored hash policy string was translated into the `truenas_pynetif`
enum by member-name lookup. The stored values are `layer2`, `layer2+3`
and `layer3+4`, while the enum members are `LAYER2`, `LAYER23` and
`LAYER34` — `+` cannot appear in a Python identifier, so two of the
three resolved to `None`, and `getattr`'s default swallowed the miss
with no log or exception. The netlink attribute was then never packed
and the kernel silently kept its default `layer2`, so outbound traffic
could not spread across bond members. Every LACP/LOADBALANCE bond
defaults to `layer2+3`, so this was not limited to people who picked a
policy explicitly. `lacpdu_rate` goes through the identical construct
and only works because `SLOW` and `FAST` happen to be valid identifiers.

## Solution
Map the choice enums to library members explicitly, behind two helpers
that take the stored string and return an enum or `None`. Dict literals
rather than a name lookup, so a rename on the library side becomes a

    [4 lines not shown]
DeltaFile
+9-2src/middlewared/middlewared/plugins/interface/bond.py
+9-21 files

FreeNAS/freenas 3d22931src/middlewared/middlewared/plugins/interface bond.py

Fix bond transmit hash policy never reaching the kernel

## Problem
The stored hash policy string was translated into the `truenas_pynetif` enum by member-name lookup. The stored values are `layer2`, `layer2+3` and `layer3+4`, while the enum members are `LAYER2`, `LAYER23` and `LAYER34` — `+` cannot appear in a Python identifier, so two of the three resolved to `None`, and `getattr`'s default swallowed the miss with no log or exception. The netlink attribute was then never packed and the kernel silently kept its default `layer2`, so outbound traffic could not spread across bond members. Every LACP/LOADBALANCE bond defaults to `layer2+3`, so this was not limited to people who picked a policy explicitly. `lacpdu_rate` goes through the identical construct and only works because `SLOW` and `FAST` happen to be valid identifiers.

## Solution
Resolve the library member by name through the existing choice enums, whose member names already line up: `XmitHashChoices.LAYER23` carries the value `LAYER2+3` and matches `BondXmitHashPolicy.LAYER23`. An unmappable value now raises rather than quietly becoming `None`.

The call sites catch that and log the offending value instead of letting it propagate, because `configure_bonds_impl` swallows per-bond exceptions — raising here would abandon the bond before its members are enslaved and its MTU is set, turning a degraded network into an absent one on the boot path.

(cherry picked from commit 72ff889f1943261945ada456bc6d27ed1f1416ce)
DeltaFile
+9-2src/middlewared/middlewared/plugins/interface/bond.py
+9-21 files

FreeNAS/freenas 97d1486src/middlewared/middlewared/plugins/interface bond.py

Fix bond transmit hash policy never reaching the kernel

## Problem
The stored hash policy string was translated into the `truenas_pynetif` enum by member-name lookup. The stored values are `layer2`, `layer2+3` and `layer3+4`, while the enum members are `LAYER2`, `LAYER23` and `LAYER34` — `+` cannot appear in a Python identifier, so two of the three resolved to `None`, and `getattr`'s default swallowed the miss with no log or exception. The netlink attribute was then never packed and the kernel silently kept its default `layer2`, so outbound traffic could not spread across bond members. Every LACP/LOADBALANCE bond defaults to `layer2+3`, so this was not limited to people who picked a policy explicitly. `lacpdu_rate` goes through the identical construct and only works because `SLOW` and `FAST` happen to be valid identifiers.

## Solution
Resolve the library member by name through the existing choice enums, whose member names already line up: `XmitHashChoices.LAYER23` carries the value `LAYER2+3` and matches `BondXmitHashPolicy.LAYER23`. An unmappable value now raises rather than quietly becoming `None`.

The call sites catch that and log the offending value instead of letting it propagate, because `configure_bonds_impl` swallows per-bond exceptions — raising here would abandon the bond before its members are enslaved and its MTU is set, turning a degraded network into an absent one on the boot path.

(cherry picked from commit 72ff889f1943261945ada456bc6d27ed1f1416ce)
DeltaFile
+9-2src/middlewared/middlewared/plugins/interface/bond.py
+9-21 files

FreeNAS/freenas c1d7aadsrc/middlewared/middlewared/plugins/interface bond.py

NAS-142731 / 27.0.0-BETA.1 / Fix bond transmit hash policy never reaching the kernel (#19586)

## Problem
The stored hash policy string was translated into the `truenas_pynetif`
enum by member-name lookup. The stored values are `layer2`, `layer2+3`
and `layer3+4`, while the enum members are `LAYER2`, `LAYER23` and
`LAYER34` — `+` cannot appear in a Python identifier, so two of the
three resolved to `None`, and `getattr`'s default swallowed the miss
with no log or exception. The netlink attribute was then never packed
and the kernel silently kept its default `layer2`, so outbound traffic
could not spread across bond members. Every LACP/LOADBALANCE bond
defaults to `layer2+3`, so this was not limited to people who picked a
policy explicitly. `lacpdu_rate` goes through the identical construct
and only works because `SLOW` and `FAST` happen to be valid identifiers.

## Solution
Map the choice enums to library members explicitly, behind two helpers
that take the stored string and return an enum or `None`. Dict literals
rather than a name lookup, so a rename on the library side becomes a
static attribute error at import time instead of another silent `None`.
DeltaFile
+9-2src/middlewared/middlewared/plugins/interface/bond.py
+9-21 files

LLVM/project 4c9fd71clang/include/clang/Basic DiagnosticLexKinds.td DiagnosticSemaKinds.td, clang/lib/Parse ParseDecl.cpp ParseStmt.cpp

[Clang] Use Compat diagnostics for most extension/compatibility warnings (#216693)

This changes the wording of a few diagnostic messages to be more
canonical. Otherwise this should be NFC.
DeltaFile
+80-252clang/include/clang/Basic/DiagnosticParseKinds.td
+22-82clang/include/clang/Basic/DiagnosticSemaKinds.td
+22-66clang/lib/Parse/ParseDeclCXX.cpp
+13-30clang/lib/Parse/ParseStmt.cpp
+12-27clang/lib/Parse/ParseDecl.cpp
+11-25clang/include/clang/Basic/DiagnosticLexKinds.td
+160-48232 files not shown
+278-67238 files

LLVM/project 54d9414lldb/docs/resources lldbgdbremote.md, lldb/source/API SBProcess.cpp

[lldb] Add generic address space support (#214089)

Relevant RFC:
https://discourse.llvm.org/t/rfc-address-spaces-support-in-lldb/91222/

Stacked on #206370 and the
https://github.com/llvm/llvm-project/pull/214088

This PR
- Adds new gdb remote packets - jAddressSpacesInfo, for retreiving the
address spaces from lldb-server.
- supports to enable the feature using the `address-spaces+` in
`qSupported`
- supprot `;address_space:` suffic in memory-read packets. writes are
natural extension.
 -  SB API, and docs.


https://github.com/llvm/llvm-project/pull/217092 contains an end to end
test to validate the address spaces.
DeltaFile
+123-0lldb/test/API/functionalities/gdb_remote_client/TestAddressSpaceMemoryRead.py
+81-0lldb/docs/resources/lldbgdbremote.md
+67-0lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
+55-5lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+56-0lldb/source/API/SBProcess.cpp
+53-1lldb/source/Target/Process.cpp
+435-615 files not shown
+650-1221 files

LLVM/project 78f20e3lldb/docs/resources lldbgdbremote.md, lldb/include/lldb/Utility AcceleratorGDBRemotePackets.h

[lldb-server] Add dynamic loader support to accelerator plugin protocol (#214564)

Context:

https://discourse.llvm.org/t/upstreaming-basic-support-for-accelerators/89827/

This is PR#1 of a PR stack adding dynamic loader support for accelerator
(GPU) targets to lldb:

the next PR is  **#214581**

In this PR we are adding the protocol foundation for the dyld
- Added handling of new GDB Remote packet
`jAcceleratorPluginGetDynamicLoaderLibraryInfo` and testing it with the
Mock Server Plugin
- see the dyld implementation in **#217393**
DeltaFile
+110-0lldb/docs/resources/lldbgdbremote.md
+81-0lldb/unittests/Utility/AcceleratorGDBRemotePacketsTest.cpp
+65-0lldb/include/lldb/Utility/AcceleratorGDBRemotePackets.h
+59-0lldb/source/Utility/AcceleratorGDBRemotePackets.cpp
+55-0lldb/test/API/accelerator/mock/TestMockAcceleratorPackets.py
+33-0lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+403-06 files not shown
+429-012 files

LLVM/project 815a337clang/lib/CIR/Dialect/IR CIRDialect.cpp

fix: separate CIR attribute dispatch from OpenCL verification
DeltaFile
+20-8clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+20-81 files

FreeBSD/src 064d190lib/libarchive/tests Makefile

[tests] libarchive: mark `test_read_filter_lz4_raw_skip` broken

This test has not passed since 185becb1e1bd2657c156f78aeb52edac05ba5fb5
(the libarchive 3.8.9 upgrade).

PR:             273732
MFC after:      1 week
Reviewed by:    siva
Differential Revision:  https://reviews.freebsd.org/D59314
DeltaFile
+6-1lib/libarchive/tests/Makefile
+6-11 files

LLVM/project bba78f7clang/test/Driver amdgpu-offload-arch-subarch-names.c

clang/AMDGPU: Fix test to work with -lgomp (#220331)

Recently added test fails with "error: '-fopenmp-targets' must be used
in conjunction with a '-fopenmp' option compatible with offloading;
e.g., '-fopenmp=libomp' or '-fopenmp=libiomp5'" if it is built with
-lgomp. This adds a default value (libomp) for the -fopenmp flag to
prevent this test failure.

(The test was added as part of
https://github.com/llvm/llvm-project/pull/219963)
DeltaFile
+66-66clang/test/Driver/amdgpu-offload-arch-subarch-names.c
+66-661 files

LLVM/project fc25409mlir/test/Dialect/LLVMIR types-invalid.mlir, mlir/test/Dialect/Linalg hoisting.mlir

[mlir] Remove unnecessary allow-unregistered-dialect flags (#220613)

This is bad practice, instead use unknown operations in the test dialect
when tests only need placeholders.

Use a registered SPIR-V operation for translation diagnostics.

Assisted-by: Codex
DeltaFile
+220-220mlir/test/Dialect/Vector/vector-warp-distribute.mlir
+111-111mlir/test/Transforms/move-operation-deps.mlir
+76-76mlir/test/Dialect/XeGPU/sg-to-lane-distribute-unit.mlir
+66-66mlir/test/Dialect/Linalg/hoisting.mlir
+33-33mlir/test/Dialect/MLProgram/pipeline-globals.mlir
+29-29mlir/test/Dialect/LLVMIR/types-invalid.mlir
+535-53521 files not shown
+599-59727 files

LLVM/project 7fddb2elibc/cmake/modules LLVMLibCCheckCpuFeatures.cmake, libc/cmake/modules/cpu_features check_MVE.cpp check_MVE_FP.cpp

[libc][baremetal] add MVE/MVE_FP feature flags detection (#220345)

This patch adds MVE/MVE_FP SIMD feature flags for baremetal targets.
Cortex-M85/Cortex-M55 introduced the M-profile Vector Extension
(Helium). The detection is via the `__ARM_FEATURE_MVE` bitfield as
described in the Arm C Language Extensions (ACLE): bit 0 is set when
the MVE integer instructions are available, bit 1 when the
floating-point instructions are also available.

Co-authored-by: Claude Fable 5 <noreply at anthropic.com>
DeltaFile
+10-0libc/src/__support/macros/properties/cpu_features.h
+5-0libc/cmake/modules/cpu_features/check_MVE.cpp
+5-0libc/cmake/modules/cpu_features/check_MVE_FP.cpp
+3-0libc/cmake/modules/LLVMLibCCheckCpuFeatures.cmake
+23-04 files

LLVM/project 4790539llvm/lib/Target/SystemZ SystemZCallingConv.td, llvm/test/CodeGen/SystemZ zos-xplink64-bare-i32-arg.ll

[SystemZ] XPLINK64: keep CCAssignToRegAndStack rule for bare i32 args (#220354)

Bare i32 arguments (no signext/zeroext, e.g. sitofp sources or
struct-coerced i32s) must be assigned to R1L/R2L/R3L by the
CCAssignToRegAndStack rule in CC_SystemZ_XPLINK64.
Without that rule they fall through to the stack fallback,
producing wrong codegen (stack loads instead of register references).

This test demonstrates the regression caused by removing the
CCIfType<[i32], CCAssignToRegAndStack<[R1L,R2L,R3L],8,8>> rule
from CC_SystemZ_XPLINK64 and serves as justification for keeping it.

This is a pre-existing independent issue extracted from #206833 per
reviewer request.
DeltaFile
+37-0llvm/test/CodeGen/SystemZ/zos-xplink64-bare-i32-arg.ll
+3-3llvm/lib/Target/SystemZ/SystemZCallingConv.td
+40-32 files

LLVM/project 0794268clang/docs ReleaseNotes.md, clang/lib/Analysis ThreadSafety.cpp

Thread Safety Analysis: Look through elidable copies of scoped lockables

Under C++11/14, initializing a guard variable from a factory --
`MutexLock scope = lock();` with `MutexLock lock() ACQUIRE(mu)` --
loses the guard: the initializer is an elidable copy (or move)
construction from the materialized temporary the call returned, and
VisitDeclStmt does not look through it, so the scope object recorded
for the call is never bound to the variable. The CFGTemporaryDtor
element then finds the object still unclaimed and runs the guard
destructor at the end of the full-expression, releasing the
underlying capabilities immediately, and the variable's own
destructor later warns "releasing mutex 'scope' that was not held".
Returning a guard by value from an annotated factory has the same
defect on the return side: in `MutexLock lock() ACQUIRE(mu)
{ return MutexLock(&mu); }` the temporary's destructor element
precedes the return, so the factory releases what it just acquired
and is diagnosed for not holding `mu` at its own end.

Fix in VisitCXXConstructExpr: an elidable copy or move construction

    [28 lines not shown]
DeltaFile
+31-12clang/lib/Analysis/ThreadSafety.cpp
+17-19clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+8-0clang/docs/ReleaseNotes.md
+56-313 files

LLVM/project 7b024ceclang/docs ThreadSafetyAnalysis.md, clang/lib/Analysis ThreadSafety.cpp

Thread Safety Analysis: Fold scoped lockables into the try-held model

A scoped lockable whose constructor is annotated with a try-acquire
attribute (`std::unique_lock lock(mu, std::try_to_lock)`-style)
bypassed the conditional model: the capabilities were recorded but no
facts created, so the guard tracked nothing -- uses under it warned
as if no acquisition existed, its destructor released nothing, and
nothing recorded that the capability is unheld after the scope. Now
the construction creates a try-held fact per recorded capability,
like a direct try-acquire call.

Design details:

 * The facts are Managed -- the model's counterpart of the guard's
   own ownership flag -- and the capabilities are registered as the
   scoped fact's underlying mutexes, so the destructor reaches them.

 * The destructor is `if (held) Unlock()`: a conditional release that
   pairs exactly with the guard's conditional acquisition, so

    [26 lines not shown]
DeltaFile
+266-0clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+58-49clang/lib/Analysis/ThreadSafety.cpp
+37-0clang/test/SemaCXX/warn-thread-safety-negative.cpp
+18-0clang/docs/ThreadSafetyAnalysis.md
+379-494 files

LLVM/project 33ec66dclang/lib/Analysis ThreadSafety.cpp, clang/test/Sema warn-thread-safety-analysis.c

Thread Safety Analysis: Resolve try-acquire results merged by a conditional operator

A non-void `?:` on a try-acquire result used to pin it unresolved
wholesale: the branch was never honored, and only a
both-arms-constant value (`ok ? 1 : 0`) could be decoded at a later
branch. The body of `if (mu.TryLock() ? use() : false)` warned
although a truthy value proves the lock is held, and the GNU form
`ok ?: 0` was not decoded at all. Now the decode computes what the
merged value determines about the result, arm by arm, and the `?:`
terminator itself is always honored as a branch.

Design details:

 * Constant arms of differing truthiness carry the result as the
   value itself -- its truthiness is the result's but its magnitude
   is the arm's, so exact values are never applied to the result (a
   new ValueMerged flag clears ValueIsResult). GNU `ok ?: 0` keeps
   the result exactly, magnitude included.


    [42 lines not shown]
DeltaFile
+233-51clang/lib/Analysis/ThreadSafety.cpp
+189-3clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+29-0clang/test/Sema/warn-thread-safety-analysis.c
+10-0clang/test/SemaCXX/warn-thread-safety-try-nobeta.cpp
+461-544 files

LLVM/project 8821742clang/docs ThreadSafetyAnalysis.md, clang/lib/Analysis ThreadSafety.cpp

Thread Safety Analysis: Resolve try-acquire results by exact value, not just truthiness

The attributes' success values, the branch conditions on the result,
and the resolution between them all collapsed to truthiness, which is
unsound in both directions for attributes keying distinct
capabilities to integer codes:

    int trylock_codes() TRY_ACQUIRE(1, mu1) TRY_ACQUIRE(2, mu2);

`if (trylock_codes() == 2)` silently accepted uses of mu1 in its body
("truthy" promoted it too, though a result of 2 proves mu1 was never
acquired), and the other edge of `== 1` read as "result falsy",
wrongly removing mu2's fact.

Design details:

 * Recording: a truthy success value that is a specific integer
   constant (not a bool) is recorded as that capability's exact
   success code (ExactCodes), via the constant evaluator, so

    [40 lines not shown]
DeltaFile
+324-63clang/lib/Analysis/ThreadSafety.cpp
+159-0clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+15-0clang/docs/ThreadSafetyAnalysis.md
+498-633 files

LLVM/project f4e0a9b. tsa-future-work-plan.md, clang/lib/Analysis ThreadSafety.cpp

Thread Safety Analysis: Demote same-origin joins silently

Resolving the check-first idioms (`if (ok) continue;
ok = mu.TryLock();` and the loop-top check) creates one new join
shape: the hold a check re-materialized or promoted meets the same
call's try-held fact -- or its failure-edge negative -- at a join
whose terminator does not re-branch on the result. Both sides denote
"held iff the call's result", so intersectAndWarn() now demotes such
same-origin joins silently to the try-held fact, their exact join,
instead of diagnosing a mixed join.

Design details:

 * At loop joins always; at branch joins only under
   -Wthread-safety-beta: the silence trades the eager lost-hold
   diagnosis at the join for the beta-only unchecked-result
   diagnostics downstream, and without beta that eager warning is the
   only coverage for the leak (warn-thread-safety-try-nobeta.cpp pins
   it). A re-branch that fails to resolve all paths stays diagnosed

    [29 lines not shown]
DeltaFile
+162-47clang/lib/Analysis/ThreadSafety.cpp
+147-45clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+109-0tsa-future-work-plan.md
+25-0clang/test/SemaCXX/warn-thread-safety-try-nobeta.cpp
+443-924 files

LLVM/project 10ee6b2clang/docs ThreadSafetyAnalysis.md, clang/lib/Analysis ThreadSafety.cpp

Thread Safety Analysis: Resolve branches on stored try-acquire results through merges and phis

The common guard pattern

    bool ok = false;
    if (cond)
        ok = mu.TryLock();
    if (ok) { ... mu.Unlock(); }

(and the spin loop `while (!ok) ok = mu.TryLock();`) was previously
unresolvable: the local-variable map discarded the merged definition
of `ok`, so the branch on it did not count as checking the result --
drawing the beta "unchecked result" warning at the very check, plus a
spurious release warning inside the guarded region. The map now
records such merges as two-operand phi definitions, and the decode
resolves the ones whose value still identifies the call's result.

Design details:


    [52 lines not shown]
DeltaFile
+905-87clang/lib/Analysis/ThreadSafety.cpp
+876-14clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+17-0clang/test/SemaCXX/warn-thread-safety-negative.cpp
+9-1clang/docs/ThreadSafetyAnalysis.md
+1,807-1024 files