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

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

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

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

Thread Safety Analysis: Resolve try-acquire facts at every branch on the result

getEdgeLockset() so far resolved a call's still-try-held facts only
at a plain if/else branch directly on the result. Now every branch on
a try-acquire result resolves every fact originating from the call:
promoted and negative facts as well as try-held ones, and
re-branches, compound short-circuit conditions, and switches as well
as the plain branch. In particular this fixes the common
assert-then-branch shape -- promote at the assert, branch again later
-- which previously drew "already held" plus "not held on every path"
warnings.

Design details:

 * A success-edge promotion keeps its originating call, so a later
   branch on the same result re-resolves the fact instead of treating
   the edge as a second acquisition: re-resolution keeps the
   reentrancy depth and source, runs no second acquisition check, and
   is idempotent over any number of branches. An assert-claimed

    [50 lines not shown]
DeltaFile
+617-95clang/lib/Analysis/ThreadSafety.cpp
+452-7clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+25-0clang/test/SemaCXX/warn-thread-safety-negative.cpp
+14-0clang/test/Sema/warn-thread-safety-analysis.c
+1,108-1024 files

LLVM/project 106e1ffclang/docs ThreadSafetyAnalysis.md, clang/include/clang/Analysis/Analyses ThreadSafety.h

Thread Safety Analysis: Diagnose a try-acquire whose result is never checked

A try-held fact means "held iff the try-acquire succeeded". When the
analysis loses track of one -- at a join with a path that does not
hold the capability, or at the end of the function -- the result was
never used to determine whether the acquisition happened, so on the
paths where it succeeded the capability is leaked. Such a fact was
dropped silently. Diagnose it under -Wthread-safety-beta with a new
warn_try_acquire_never_checked, noting the try-acquire call.

Design details:

 * Exempt: a join whose terminator re-branches on the result (the
   fact is demoted and re-resolved on the outgoing edges instead),
   and loop joins, where the result was or will be checked on the
   paths around the loop (tryheld_loop_join_not_a_leak).

 * Deliberately NOT exempt: a result stored where the analysis cannot
   track it (a member, a parameter). The store does not prove a later

    [26 lines not shown]
DeltaFile
+95-6clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+61-7clang/lib/Analysis/ThreadSafety.cpp
+15-0clang/include/clang/Analysis/Analyses/ThreadSafety.h
+13-0clang/lib/Sema/AnalysisBasedWarnings.cpp
+5-0clang/docs/ThreadSafetyAnalysis.md
+4-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+193-136 files

LLVM/project 3f87098clang/include/clang/Analysis/Analyses ThreadSafety.h, clang/include/clang/Basic DiagnosticSemaKinds.td

Thread Safety Analysis: Diagnose a try-acquire that acquires a capability regardless of its result

The same capability listed under opposite success values of a call's
try-acquire attributes is acquired whichever way the call returns. So
far that degenerate annotation was handled by the general machinery:
the capability's second recording at the call was diagnosed like any
try-acquire over a try-held capability ("may already be held"), and
the try-held fact resolved to held on both edges of a branch on the
result.

Reconcile the record at the call instead (reconcileTryAcquireCaps()):
the capability moves out of the polarity sets of its TryAcquireCapsMap
entry into an unconditional group, and handleCall() turns that group
into an unconditional acquisition under a dedicated
warn_try_lock_regardless_of_result -- the capability becomes held at
the call, and no try-held fact is left for a branch to resolve or a
failure edge to release (tryheld_regardless_of_result,
tryheld_regardless_of_result_unbranched). Every capability still
recorded then matches exactly one polarity and one kind at a branch;

    [28 lines not shown]
DeltaFile
+112-27clang/lib/Analysis/ThreadSafety.cpp
+108-0clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+10-0clang/lib/Sema/AnalysisBasedWarnings.cpp
+10-0clang/include/clang/Analysis/Analyses/ThreadSafety.h
+4-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+244-275 files

LLVM/project cc63337clang/docs ThreadSafetyAnalysis.md, clang/include/clang/Analysis/Analyses ThreadSafety.h

Thread Safety Analysis: Track try-acquired capabilities as a ternary try-held state

Context: I was a bit frustrated by using conditional capabilities in
real code, since it was giving both incorrect and incomplete analysis
results. There is already this really nice fact manager here;
conditional modelling was simply ignoring it and essentially
reimplementing a simplified duplicate model on top of it which tried to
re-derive facts and inject them into the real model. But the underlying
model already seemed really close to be able to hold these facts too,
instead of leaving them invisible and wrongly diagnosed. This PR is the
beginning of a series of about 10 PRs to reduce those correctness and
completeness gaps. Claude is already happy with the state of those other
branches, but I'm not happy with them yet, so I'll drip those out as I
get time to polish them up. Throughout this series, I have tried to
often suppress new warnings except when passing `-Wthread-safety-beta`,
so that users can opt-in explicitly to the more complete and accurate
checks. The stack of branches is:

  1. (users/vtjnash/tsa-tryheld-regardless-of-result) Diagnose a try-acquire that acquires a capability regardless of its result

    [71 lines not shown]
DeltaFile
+634-168clang/lib/Analysis/ThreadSafety.cpp
+420-0clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+41-0clang/test/SemaCXX/warn-thread-safety-negative.cpp
+16-3clang/docs/ThreadSafetyAnalysis.md
+9-6clang/lib/Sema/AnalysisBasedWarnings.cpp
+11-3clang/include/clang/Analysis/Analyses/ThreadSafety.h
+1,131-1802 files not shown
+1,149-1838 files

LLVM/project 9f4916dclang/lib/Analysis ThreadSafety.cpp

Thread Safety Analysis: Decode terminator branches directly into capability resolutions [NFC]

Restructure the walk over the branched-on condition (getTrylockCallExpr,
now decodeTrylockCond) to record what it learns about the intermediate
expressions applied to the value into a TrylockDecode, instead of
returning the call while threading through a single `Negate`. This
doesn't change too much structurally while negation is the only relation
recorded, but makes it simpler to add new features to the walk without
needing duplicate analysis between the walk and the decoding.

Previously, getTrylockCallExpr threaded a Negate out-parameter through
every recursion, and getEdgeLockset re-derived from it, per edge, what
the branch proves: mapping the edge through the negations to a result
value, then re-translating every attribute of the callee to decide which
capabilities that value acquires -- with getTerminatorTrylockCaps
repeating the translation for the join exemption, and the beta-mode
SExprBuilder lookup closure escaping getTerminatorTrylockCall through a
scope_exit element of its returned tuple so callers could translate.
Now decodeTrylockBranch folds the decode, once per terminator, into the

    [12 lines not shown]
DeltaFile
+174-121clang/lib/Analysis/ThreadSafety.cpp
+174-1211 files

LLVM/project 9b8d049llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/AArch64 matmul.ll splat-loads.ll

[SLP]Vectorize unique scalars of splat gather nodes as separate subtrees

A splat gather (the same instruction in every lane) is emitted as an
expensive insertion sequence. When the unique scalars of several splat
gathers form a vectorizable bundle, build them as a separate subtree and
emit the splat gathers as broadcasts of the vectorized value.

Original Pull Request: https://github.com/llvm/llvm-project/pull/218250

Recommit after revert in b80664df122426d703fd8eb0ad7e8e9c2c19bbf3 and 847eee6a93f2a57ec716a5b78ec527b9f95a64a4 with
fixed compiler crashes

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/220622
DeltaFile
+229-43llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+62-161llvm/test/Transforms/SLPVectorizer/X86/splat-gather-operands.ll
+58-0llvm/test/Transforms/SLPVectorizer/AArch64/splat-gather-subtree-cost.ll
+51-0llvm/test/Transforms/SLPVectorizer/ARM/splat-gather-extractvalue-mixed-types.ll
+8-24llvm/test/Transforms/SLPVectorizer/AArch64/splat-loads.ll
+9-17llvm/test/Transforms/SLPVectorizer/AArch64/matmul.ll
+417-2457 files not shown
+447-29513 files

LLVM/project 308892flibcxx/include version, libcxx/include/__ranges view_interface.h

[libc++][ranges] Implement P3052R2: `view_interface::at()` (#205012)

Closes #204395

Implements https://wg21.link/P3052R2

---------

Co-authored-by: Hristo Hristov <zingam at outlook.com>
Co-authored-by: A. Jiang <de34 at live.cn>
DeltaFile
+49-0libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp
+24-0libcxx/include/__ranges/view_interface.h
+5-11libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
+5-11libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp
+9-0libcxx/test/libcxx/ranges/range.utility/view.interface/nodiscard.verify.cpp
+1-1libcxx/include/version
+93-238 files not shown
+100-2614 files

LLVM/project b5401fbclang/docs ReleaseNotes.md, clang/lib/Sema TreeTransform.h

Remove overly strict assertion for this-capture in blocks (#219080)

TransformBlockExpr asserted that if the instantiated block captures
'this', the uninstantiated pattern block must also have captured it.
This assumption doesn't always hold: a block that accesses a member
through a dependent qualified-id (e.g., 'T::m' inside a template
deriving from T) has no way to know at parse time that the access will
resolve to an implicit 'this->m', since T is unknown. Once the template
is instantiated and 'T::m' resolves to a non-static data member, the
instantiated block legitimately captures 'this' even though the pattern
never did.

rdar://184776458
DeltaFile
+11-0clang/test/CodeGenObjCXX/block-in-template-inst.mm
+0-6clang/lib/Sema/TreeTransform.h
+2-0clang/docs/ReleaseNotes.md
+13-63 files

LLVM/project a422732lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel DynamicLoaderFreeBSDKernel.cpp, lldb/source/Plugins/Language/ObjC NSDictionary.cpp

[lldb] Return llvm::Expected from Process::ReadPointerFromMemory (#216389)

The function reported failure twice, through a Status out-parameter and
by returning LLDB_INVALID_ADDRESS. Returning
llvm::Expected<lldb::addr_t> collapses those into a single channel that
cannot be ignored.

Note that ReadScalarIntegerFromMemory can report a short read without
setting the Status so callers could previously get a success Status
alongside LLDB_INVALID_ADDRESS. That case now yields an error.

Call sites that already discarded the Status consume the error
explicitly to preserve their behavior. Error-path logging uses
LLDB_LOG_ERROR instead of passing takeError() to LLDB_LOG/LLDB_LOGF,
which only evaluate their arguments when the channel is enabled and
would otherwise leave the error unchecked and abort.

Assisted-by: Claude
DeltaFile
+88-44lldb/source/Plugins/Language/ObjC/NSDictionary.cpp
+66-46lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+47-43lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
+33-21lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.cpp
+36-16lldb/source/Plugins/Process/FreeBSD-Kernel-Core/ProcessFreeBSDKernelCore.cpp
+26-24lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
+296-19426 files not shown
+571-36232 files

LLVM/project cd1e530llvm/include/llvm/ADT FoldingSet.h

[ADT] Move traits after FoldingSetNodeID to inline Equals (NFC) (#220494)

This patch moves down DefaultFoldingSetTrait and
DefaultContextualFoldingSetTrait after FoldingSetNodeID, allowing
Equals to be defined inline in DefaultFoldingSetTrait and
DefaultContextualFoldingSetTrait.

Assisted-by: Antigravity
DeltaFile
+56-63llvm/include/llvm/ADT/FoldingSet.h
+56-631 files

LLVM/project 8f06f64lldb/test/API/functionalities/breakpoint/hardware_breakpoints/write_memory_with_hw_breakpoint TestWriteMemoryWithHWBreakpoint.py, lldb/test/API/functionalities/breakpoint/write_over_software_breakpoint TestWriteOverSoftwareBreakpoint.py

Revert "[lldb][test] Disable two breakpoint tests for debugserver (#2… (#220615)

…18636)"

This reverts commit 7ea6d83f49d975d64ef2548561a46619c86b3570.

The tests should now pass.
DeltaFile
+0-2lldb/test/API/functionalities/breakpoint/write_over_software_breakpoint/TestWriteOverSoftwareBreakpoint.py
+0-2lldb/test/API/functionalities/breakpoint/hardware_breakpoints/write_memory_with_hw_breakpoint/TestWriteMemoryWithHWBreakpoint.py
+0-42 files

LLVM/project eff5d2dllvm/include/llvm/ADT STLFunctionalExtras.h, llvm/unittests/ADT FunctionRefTest.cpp

[llvm][ADT] Remove function_ref equality operator (#220600)

The equality operator no longer has in-tree users.

TableGen replaced its function_ref callback wrapper with its own FnT.

Assisted-by: Codex
DeltaFile
+8-16llvm/unittests/ADT/FunctionRefTest.cpp
+0-4llvm/include/llvm/ADT/STLFunctionalExtras.h
+8-202 files

LLVM/project f8024c2llvm/include/llvm/CodeGen/GlobalISel LegalizerHelper.h CombinerHelper.h, llvm/lib/CodeGen/GlobalISel GISelValueTracking.cpp LegalizerHelper.cpp

[GlobalISel] Remove dead declarations and functions (NFC) (#220499)

CombinerHelper::tryCombine: The corresponding function definition was
removed on September 24, 2023 in commit
bc6e7f057340ab0b995cc17a170e34545a295f03.

GISelValueTracking::getKnownBits(MachineInstr &): Added on August 6,
2019
in commit c8ac029d0ae27b8fd392f216d471ba2730be7fd1 without any callers.

GISelValueTracking::computeKnownBitsForAlignment: The last use was
removed on June 3, 2020 in commit
45e1a22a92bf2c33336ccc02ea4fa3996f60252b.

LegalizerHelper::lowerU64ToF32BitOps: The last use was removed on
September 25, 2024 in commit e9cb44090ff7b3feda386ca1ee1252ab47c0617e.

Assisted-by: Antigravity
DeltaFile
+0-58llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+0-7llvm/include/llvm/CodeGen/GlobalISel/GISelValueTracking.h
+0-6llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
+0-4llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
+0-1llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
+0-765 files

LLVM/project 964098ellvm/lib/Transforms/Vectorize VectorCombine.cpp, llvm/test/Transforms/VectorCombine/AArch64 load-bitcast-scalarization.ll

[VectorCombine] Avoid calling getTypeSizeInBits on scalable vectors in scalarizeLoadBitcast (#220482)

Avoids `LLVM ERROR: Cannot implicitly convert a scalable size to a
fixed-width size in TypeSize::operator ScalarTy()`
DeltaFile
+13-0llvm/test/Transforms/VectorCombine/AArch64/load-bitcast-scalarization.ll
+3-0llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+16-02 files

LLVM/project 7e0e56dllvm/lib/Target/AArch64 AArch64InstrInfo.td, llvm/test/CodeGen/AArch64 smul_fix_sat.ll saturating-vec-smull.ll

[AArch64][GlobalISel] Add tablegen patterns for smull+sqshrn -> sqdmulh. (#217318)

We do this in parts in globalisel, recognizing the smull and trunc_sat,
which when combined with the correct shift can fold into a single
sqdmulh.
DeltaFile
+18-52llvm/test/CodeGen/AArch64/saturating-vec-smull.ll
+16-46llvm/test/CodeGen/AArch64/smul_fix_sat.ll
+21-0llvm/lib/Target/AArch64/AArch64InstrInfo.td
+55-983 files