LLVM/project 1f1e888 — clang/include/clang/Basic DiagnosticParseKinds.td, clang/test/Parser c2y-if-decl-while.c

[Clang][C2y] Make the 'if' declaration extension warning on by default

Declarations in the condition of 'if' and 'switch' statements (N3356)
were previously only diagnosed in pre-C2y modes under -pedantic, since
the C compatibility warnings default to Extension. Promote the
diagnostic to an ExtWarn so users on older language modes are told
they are relying on a C2y extension; -Wno-c2y-extensions silences it.

Co-Authored-By: Claude Fable 5.1 <noreply at anthropic.com>
DeltaFile
+4-0clang/test/Parser/c2y-if-decl-while.c
+2-1clang/include/clang/Basic/DiagnosticParseKinds.td
+6-12 files

LLVM/project b0499a4 — clang/lib/Parse ParseStmt.cpp

[Clang][C2y] Simplify condition-declaration diagnostics in C

Key the diagnostics on whether a declaration is permitted as the
condition (only as the sole clause of an 'if' or 'switch'), so the two
"expected expression" emissions collapse into one and the first-clause
check is no longer nested inside the branching. No functional change.

Co-Authored-By: Claude Fable 5.1 <noreply at anthropic.com>
DeltaFile
+19-21clang/lib/Parse/ParseStmt.cpp
+19-211 files

LLVM/project 1fea21a — llvm/include/llvm/CodeGen MIRYamlMapping.h, llvm/lib/CodeGen MIRPrinter.cpp

[MIR] Use block references in callSites and calledGlobals (#229320)

The bb field of callSites and calledGlobals is the number of the block,
as the MIR printer writes it, but the parser used it as the position of
the block in the function. The two differ once a pass adds, removes or
moves blocks without renumbering them, for example after block placement
or when a custom inserter splits a block in finalize-isel. Such MIR then
fails to parse, or an entry is silently attached to the call in another
block.

Make the field a block reference, printed and parsed like the blocks of
jump tables and savePoint, and update the tests that use it.
DeltaFile
+48-0llvm/test/CodeGen/MIR/X86/call-site-info-block-numbers.mir
+20-21llvm/lib/CodeGen/MIRParser/MIRParser.cpp
+21-18llvm/lib/CodeGen/MIRPrinter.cpp
+5-5llvm/include/llvm/CodeGen/MIRYamlMapping.h
+4-4llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-interpret-movzxi.mir
+4-4llvm/test/CodeGen/MIR/AArch64/called-globals.mir
+102-5257 files not shown
+202-14963 files

LLVM/project 974646e — llvm/lib/Target/AArch64 AArch64SVEInstrInfo.td SVEInstrFormats.td, llvm/test/CodeGen/AArch64 sve-strict-round-discard.ll

[AArch64] Preserve exceptions from discarded strict SVE FP operations (#230112)

Mark strict AArch64 target SDNodes as IsStrictFP and advertise FP
exception capability on the SVE FP-unary undef pseudos. Both metadata
properties are needed to preserve observable exception effects when the
numeric result is unused.

Add a regression covering discarded strict f16/f32/f64 round calls with
SVE and streaming SME, selected MIR without nofpexcept, and removable
ignore-mode f32/f64 controls.

Signed-off-by: Sriram Shastry <sriramshastry at gmail.com>
DeltaFile
+130-0llvm/test/CodeGen/AArch64/sve-strict-round-discard.ll
+3-1llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
+4-0llvm/lib/Target/AArch64/SVEInstrFormats.td
+137-13 files

LLVM/project b880f44 — lldb/source/Host/openbsd Host.cpp

[lldb][OpenBSD] Fix sysctl usage for process info (#122534)

The OpenBSD Host code used FreeBSD-style sysctl MIBs, which don't
match OpenBSD's interface, so process lookups failed.

- GetOpenBSDProcessArgs: use {CTL_KERN, KERN_PROC_ARGS, pid,
  KERN_PROC_ARGV}. OpenBSD returns a NULL-terminated argv array
  whose pointers point into the returned buffer, so iterate it
  directly.
- GetOpenBSDProcessUserAndGroup, FindProcessesImpl: KERN_PROC
  takes a 6-element MIB on OpenBSD, with the kinfo_proc element
  size and element count as the last two entries.
DeltaFile
+47-48lldb/source/Host/openbsd/Host.cpp
+47-481 files

LLVM/project 651f531 — llvm/tools/sancov sancov.cpp

[sancov][NFC] Store raw coverage addresses in a DenseSet

Union inserts the same addresses over and over. A std::set walks a tree for every one of them. A hash set checks whether the address is already present in one step. Sort once on output so the bytes stay ordered. On 5,000 llc dumps, union went from 39s to 5s.

Assisted-by: Cursor (Grok 4.7)
DeltaFile
+22-15llvm/tools/sancov/sancov.cpp
+22-151 files

LLVM/project 5c479e5 — llvm/tools/sancov sancov.cpp

[sancov][NFC] Append a coverage file into an existing address set

Union was reading each .sancov file into its own address set and then
inserting that set into the union. Read the file straight into the
caller's set instead. append returns the file header so a bitness
mismatch still warns, and read is implemented on top of it.

Assisted-by: Cursor (Grok 4.7)
DeltaFile
+21-14llvm/tools/sancov/sancov.cpp
+21-141 files

LLVM/project 5f16b00 — llvm/tools/sancov sancov.cpp

[sancov][NFC] Add a RawAddrSet typedef

Typedef the .sancov address set as RawAddrSet. It is still std::set<uint64_t>.

Assisted-by: Cursor (Grok 4.7)
DeltaFile
+7-7llvm/tools/sancov/sancov.cpp
+7-71 files

LLVM/project d4a1e15 — mlir/lib/Interfaces ControlFlowInterfaces.cpp, mlir/unittests/Interfaces ControlFlowInterfacesTest.cpp

[mlir] Detect hasLoop cycles with a single DFS

Calling isRegionReachable for every region the traversal popped made
hasLoop quadratic in the number of region successor edges. Use one
iterative depth-first search from the entry regions instead, in a new
canReachCycle helper. Reaching a region that is still on the DFS path
is a loop, reaching a finished one is not. Each region is queried at
most once, the search stops at the first loop, and the stack holds
one pointer-sized item per entry so small ops need no heap
allocation.

Both traversals now get a region's successors from
RegionBranchOpInterface::getSuccessorRegions(Region &) instead of
asking each terminator with null operand attributes. The in-tree
terminators that override getSuccessorRegions (scf.condition and
cir.condition) return the same regions as their parent op when no
operand is constant.

Restore the dropped debug output. Rename the multi-branch test and

    [6 lines not shown]
DeltaFile
+101-55mlir/unittests/Interfaces/ControlFlowInterfacesTest.cpp
+87-42mlir/lib/Interfaces/ControlFlowInterfaces.cpp
+188-972 files

LLVM/project f82af1f — lldb/source/Core Module.cpp, lldb/source/Plugins/ObjectFile/COFF ObjectFileCOFF.cpp

[lldb] Don't take the module mutex to build a section list (#233524)

`ObjectFilePECOFF::CreateSections` takes the module mutex while
`Module::GetSectionList` holds `m_sections_mutex` (#205226), but
`Module::GetSymbolFile` holds the module mutex and asks for the section
list, so two targets loading the same DLL can deadlock.
`ObjectFile::GetSectionList` has the same inversion for every object
file format: it holds the object file's section mutex and waits for the
module mutex.

This patch makes both build through the object file's section mutex and
then `m_sections_mutex`, and drops the module mutex from
`CreateSections` in PECOFF and COFF.

The new unit tests hang without this patch. Part of #233425.
DeltaFile
+82-0lldb/unittests/ObjectFile/PECOFF/TestSectionList.cpp
+9-5lldb/source/Core/Module.cpp
+0-2lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+0-2lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp
+1-1lldb/source/Symbol/ObjectFile.cpp
+1-0lldb/unittests/ObjectFile/PECOFF/CMakeLists.txt
+93-106 files

LLVM/project c4a77ad — llvm/lib/Transforms/Utils LoopPeel.cpp, llvm/test/Transforms/LoopUnroll peel-last-iteration-with-variable-trip-count.ll

[LoopPeel] Only peel last iter if requested by shouldPeelLastIter. (#234130)

countToEliminateCompares also bumped DesiredPeelCountLast whenever it
increased the number of iterations to peel from the front. This value is
only used when peeling the front is rejected because the loop has
already been peeled, in which case we tried to peel more than a single
iteration from the end, or peel the end of a loop that does not support
it, triggering an assertion in peelLoop.

Only set DesiredPeelCountLast when shouldPeelLastIteration determined
that peeling the last iteration is possible and profitable.

Fixes https://github.com/llvm/llvm-project/issues/231037
DeltaFile
+79-41llvm/test/Transforms/LoopUnroll/peel-last-iteration-with-variable-trip-count.ll
+0-1llvm/lib/Transforms/Utils/LoopPeel.cpp
+79-422 files

LLVM/project e6163f8 — llvm/test/CodeGen/ARM vector-deinterleave-load.ll, llvm/test/CodeGen/Thumb2 mve-vector-deinterleave-load.ll

[ARM] Add -verify-machineinstrs in test (#234127)

One of the testcase added in PR #225747
crashes with -verify-machineinstrs.
Removed the specific test to unblock the CI.
DeltaFile
+2-27llvm/test/CodeGen/Thumb2/mve-vector-deinterleave-load.ll
+2-2llvm/test/CodeGen/ARM/vector-deinterleave-load.ll
+4-292 files

LLVM/project aa8e6e7 — llvm/unittests/MI LiveIntervalTest.cpp

[CodeGen] Update the dominator tree in LiveIntervalTest's testSplitAt (#234113)

TestPassT claims to preserve all analyses, including the
MachineDominatorTree that LiveIntervals requires transitively, but
testSplitAt changed the CFG without updating it.

Found by the extra verification in #98314.

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+16-2llvm/unittests/MI/LiveIntervalTest.cpp
+16-21 files

LLVM/project cb4dac6 — mlir/lib/Interfaces ControlFlowInterfaces.cpp, mlir/unittests/Interfaces ControlFlowInterfacesTest.cpp

[mlir] Detect hasLoop cycles with a single DFS

Calling isRegionReachable for every region the traversal popped made
hasLoop quadratic in the number of region successor edges. Use one
iterative depth-first search from the entry regions instead, in a new
canReachCycle helper. Reaching a region that is still on the DFS path
is a loop, reaching a finished one is not. Each region is queried at
most once, the search stops at the first loop, and the stack holds
one pointer-sized item per entry so small ops need no heap
allocation.

Both traversals now get a region's successors from
RegionBranchOpInterface::getSuccessorRegions(Region &) instead of
asking each terminator with null operand attributes. The in-tree
terminators that override getSuccessorRegions (scf.condition and
cir.condition) return the same regions as their parent op when no
operand is constant.

Restore the dropped debug output. Rename the multi-branch test and

    [6 lines not shown]
DeltaFile
+101-55mlir/unittests/Interfaces/ControlFlowInterfacesTest.cpp
+85-42mlir/lib/Interfaces/ControlFlowInterfaces.cpp
+186-972 files

LLVM/project 02a5ec9 — mlir/lib/Interfaces ControlFlowInterfaces.cpp, mlir/unittests/Interfaces ControlFlowInterfacesTest.cpp

[mlir] Detect hasLoop cycles with a single DFS

Calling isRegionReachable for every region the traversal popped made
hasLoop quadratic in the number of region successor edges. Use one
iterative depth-first search from the entry regions instead, in a new
canReachCycle helper. Reaching a region that is still on the DFS path
is a loop, reaching a finished one is not. Each region is queried at
most once, the search stops at the first loop, and the stack holds
one pointer-sized item per entry so small ops need no heap
allocation.

Both traversals now get a region's successors from
RegionBranchOpInterface::getSuccessorRegions(Region &) instead of
asking each terminator with null operand attributes. The in-tree
terminators that override getSuccessorRegions (scf.condition and
cir.condition) return the same regions as their parent op when no
operand is constant.

Restore the dropped debug output. Rename the multi-branch test and

    [6 lines not shown]
DeltaFile
+102-55mlir/unittests/Interfaces/ControlFlowInterfacesTest.cpp
+86-42mlir/lib/Interfaces/ControlFlowInterfaces.cpp
+188-972 files

LLVM/project 3027d41 — mlir/include/mlir/IR SymbolTable.h, mlir/lib/IR SymbolTable.cpp

[mlir][SymbolTable] Handle unknown symbol users in SymbolUserMap (#227918)

This PR fixes #226052 treating unknown users record the symbol table
having this specific users instead use the assertion.


Please see my comment here explaining where the bug was introduced!
[here](https://github.com/llvm/llvm-project/issues/226052#issuecomment-5922633002).
DeltaFile
+151-0mlir/test/Transforms/remove-dead-values-unknown-op.mlir
+17-2mlir/lib/IR/SymbolTable.cpp
+3-0mlir/include/mlir/IR/SymbolTable.h
+171-23 files

LLVM/project fa12d94 — llvm/test/CodeGen/PowerPC pr47373.ll

[PowerPC] Use an unversioned FreeBSD triple in pr47373.ll (#233652)

pr47373.ll was added in 27714075848e with powerpc64-unknown-freebsd13.0,
but at the time llc defaulted to ELFv1 for all big-endian ppc64
triples, so the generated checks were ELFv1 even though FreeBSD 13
uses ELFv2. 4b09cb2b16eb made llc select ELFv2 for FreeBSD 13+ and
worked around the resulting failure by changing the triple to
freebsd12.0.

Use powerpc64-unknown-freebsd and regenerate the checks. The test
covers vector FDIV lowering without VSX, which is unaffected by the
ABI.
DeltaFile
+26-26llvm/test/CodeGen/PowerPC/pr47373.ll
+26-261 files

LLVM/project 5c3753e — lldb/include/lldb/Interpreter OptionValueFileSpecList.h, lldb/source/Interpreter OptionValueFileSpecList.cpp

[lldb] Fix a lock-order deadlock in OptionValueFileSpecList::Clone (#233507)

`OptionValueFileSpecList::Clone` locks `m_rmutex` and then copies its
`OptionValue` base, which locks `m_mutex`, while
`OptionValue::GetFileSpecListValue` takes the same two locks in the
opposite order. When several debuggers create targets at once, this
deadlocks on the global `target.debug-file-search-paths` setting and
`TestMultipleDebuggers.py` times out (#233425).

This patch removes the `Clone` override. The copy constructor already
locks `m_rmutex` on its own. The new unit test hangs 10/10 without the
patch, and the test's driver went from 3 hangs in 1920 runs to 0 in 3840
on Windows.
DeltaFile
+16-0lldb/unittests/Interpreter/TestOptionValue.cpp
+0-5lldb/source/Interpreter/OptionValueFileSpecList.cpp
+0-2lldb/include/lldb/Interpreter/OptionValueFileSpecList.h
+16-73 files

LLVM/project d169e9b — flang/include/flang/Optimizer/Builder/Runtime RTBuilder.h

[Flang] Avoid deep template recursion (#233865)

The names of all runtime functions is stored as variadic template
parameters of a `RuntimeTableEntry`, but the preprocessor macro that
creates the template instantiation (`FirMacroExpandKey`) expands to
exactly 50 characters. A recursive function `filter` then was used to
strip the unnecessary trailing `'\0'` characters out of the variadic
template. On the msvc compiler this 50x template recursion hits a
hard-coded limit
([C1202](https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/fatal-error-c1202)).
#218985 exposed this limted because this 50x template recursion started
to happen in a deeper context, maybe because the instantiation order
stopped making use of a previous memoization.

The updated code is non-recursive, using a constexpr loop instead of
template recursion.

This should fix
[flang-x86_64-windows](https://lab.llvm.org/buildbot/#/builders/166)

    [2 lines not shown]
DeltaFile
+25-21flang/include/flang/Optimizer/Builder/Runtime/RTBuilder.h
+25-211 files

LLVM/project e8f3b2d — mlir/lib/Conversion/TosaToTensor TosaToTensor.cpp, mlir/test/Conversion/TosaToTensor tosa-to-tensor.mlir

[mlir][tosa] Lower concat to tensor.concat (#231726)

Lower `tosa.concat` directly to `tensor.concat` instead of expanding it
into `tensor.empty` and `tensor.insert_slice` operations.

Update the TosaToTensor conversion tests to check the resulting concat
operations.
DeltaFile
+6-64mlir/test/Conversion/TosaToTensor/tosa-to-tensor.mlir
+7-53mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp
+13-1172 files

LLVM/project f2475f5 — llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp, llvm/test/MC/AArch64/SME2 movt-diagnostics.s

fixup! Preserve index wording for MOVT diagnostics
DeltaFile
+5-5llvm/test/MC/AArch64/SME2/movt-diagnostics.s
+1-1llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+6-62 files

LLVM/project 93f3edf — lldb/test/API/tools/lldb-server TestLldbGdbServer.py

[lldb][test] Disable TestLldbGdbServer.py test_Hg_fails_on_minus_one_pid (#234129)

On Windows. It is flaky in GitHub CI and likely not specific to one
architecture. See #138085.

Relates to #232235.
DeltaFile
+2-0lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
+2-01 files

LLVM/project bab6b32 — llvm/test/Transforms/LoopUnroll peel-last-iteration-with-variable-trip-count.ll

[LoopPeel] Add tests for peeling last iter of already peeled loops. (#234128)

Add tests where peeling from the front is rejected because the loop has
already been peeled, with and without a compare that can be eliminated
by peeling the last iteration.

Aided by Opus 5.5
DeltaFile
+119-0llvm/test/Transforms/LoopUnroll/peel-last-iteration-with-variable-trip-count.ll
+119-01 files

LLVM/project f416107 — compiler-rt/include/sanitizer rtsan_interface.h

[rtsan] Add doxygen style docstrings to rtsan_interface (#232521)
DeltaFile
+18-4compiler-rt/include/sanitizer/rtsan_interface.h
+18-41 files

LLVM/project 864be4a — llvm/lib/Target/AArch64 AArch64InstrFormats.td, llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp

fixup! Rename some diagnostic names
DeltaFile
+4-4llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+6-2llvm/lib/Target/AArch64/AArch64InstrFormats.td
+10-62 files

LLVM/project 74dcf6e — llvm/lib/Target/AArch64 AArch64InstrFormats.td, llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp

fixup! Also rename the tablegen and case names, and re-order the DiagnosticType so it matches the operand name
DeltaFile
+76-76llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+38-37llvm/lib/Target/AArch64/AArch64InstrFormats.td
+114-1132 files

LLVM/project 6c15e61 — llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp, llvm/test/MC/AArch64 armv8.5a-mte-error.s basic-a64-diagnostics.s

fixup! And fix all the other cases
DeltaFile
+69-69llvm/test/MC/AArch64/basic-a64-diagnostics.s
+53-53llvm/test/MC/AArch64/armv8.5a-mte-error.s
+38-30llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+16-16llvm/test/MC/AArch64/SVE/st1h-diagnostics.s
+16-16llvm/test/MC/AArch64/SVE/ld1h-diagnostics.s
+14-14llvm/test/MC/AArch64/SVE/st1w-diagnostics.s
+206-198114 files not shown
+674-666120 files

LLVM/project 5d01056 — llvm/test/MC/AArch64 armv9.8a-cflt-diagnostics.s arm64-diags.s, llvm/test/MC/AArch64/SVE str-diagnostics.s ldr-diagnostics.s

[AArch64][llvm] Fix incorrect diagnostic (index/immediate in simm9)

Improve the error message in the simm9 diagnostics and use the word
'immediate' instead of 'index'. This was noticed when creating the
CFLT instructions for Armv9.8-A, but would have caused a lot of
unrelated churn if merged as part of that change.

Co-authored-by: Martin Wehking <martin.wehking at arm.com>
DeltaFile
+82-82llvm/test/MC/AArch64/basic-a64-diagnostics.s
+39-39llvm/test/MC/AArch64/armv8.4a-ldst-error.s
+5-5llvm/test/MC/AArch64/arm64-diags.s
+4-4llvm/test/MC/AArch64/SVE/str-diagnostics.s
+4-4llvm/test/MC/AArch64/SVE/ldr-diagnostics.s
+2-2llvm/test/MC/AArch64/armv9.8a-cflt-diagnostics.s
+136-1361 files not shown
+137-1377 files

LLVM/project ea82af2 — mlir/test/Target/SPIRV function-parameter-attributes.mlir

[mlir][SPIR-V] Add Volatile function parameter round-trip tests (#232195)

The deserializer accepts Volatile function parameter decorations since
 #230611 made it keep every unit decoration. Add round-trip tests for
 function definitions and imported declarations, including Volatile
 combined with Alignment and FuncParamAttr decorations, so the Volatile
 path is covered explicitly.
DeltaFile
+30-0mlir/test/Target/SPIRV/function-parameter-attributes.mlir
+30-01 files

LLVM/project 8bd00f4 — lldb/test/API/api/multiple-debuggers multi-process-driver.cpp

[lldb][test] Make TestMultipleDebuggers check every debug session (#233526)

`multi-process-driver` exits 0 once every session finishes, even if they
failed, and on Windows they all failed at their first stop:
`SBFrame::GetFunctionName` returns `int foo(void)`, not `foo` or
`foo()`.

This patch checks which breakpoint the selected thread stopped at
instead of the name of thread 0's function, fails a session when
`SBTarget::Launch` fails, and exits 1 when a session fails.

It sets `plugin.process.gdb-remote.packet-timeout` to 600 like dotest,
since 13 of 1920 runs on a loaded host failed with "failed to get reply
to handshake packet within timeout of 6.0 seconds", and prints the
timeout message, which the loop never reached.

With https://github.com/llvm/llvm-project/pull/233524, 1920 runs of 32
parallel drivers pass on Windows with lldb-server.
DeltaFile
+53-36lldb/test/API/api/multiple-debuggers/multi-process-driver.cpp
+53-361 files