LLVM/project 41ef9d7lldb/include/lldb/Utility Log.h, lldb/source/Commands Options.td CommandObjectLog.cpp

[lldb] Add option to log in JSONL format (#205758)

This patch adds a -j option to the log command that prints all log
messages as their own single-line JSON objects. The resulting output log
file is then a valid JSONL file with the message and metadata as their
own fields.

The motivation for this change is that writing any tooling that
analyzses LLDB logs is currently very difficult to get right. Our
current log messages often span multiple lines, and even the metadata
(e.g., stacktraces) span multiple lines. Even worse, the message content
is effectively arbitrary bytes (such as memory values) that need can
only be parsed back into a series of log messages via several
heuristics.

assisted-by: claude
DeltaFile
+63-1lldb/source/Utility/Log.cpp
+46-0lldb/unittests/Utility/LogTest.cpp
+30-0lldb/test/API/commands/log/basic/TestLogging.py
+8-0lldb/include/lldb/Utility/Log.h
+3-0lldb/source/Commands/Options.td
+3-0lldb/source/Commands/CommandObjectLog.cpp
+153-16 files

LLVM/project df4f247clang-tools-extra/clang-doc YAMLGenerator.cpp

[clang-doc] Remove unused simple_ilist comparison operators (NFC) (#206309)

These operator== and operator!= templates in YAMLGenerator.cpp were
never called. They went in as infrastructure that never got wired up,
and now a cleanup exposed them under -Wunused-template. Remove the dead
code.

NFC. Part of #202945.
DeltaFile
+0-18clang-tools-extra/clang-doc/YAMLGenerator.cpp
+0-181 files

LLVM/project e13beaellvm/lib/Transforms/Vectorize VPlanPatternMatch.h

[VPlan] Remove internal linkage from findUserOf templates (NFC) (#202974)

The `findUserOf` function templates are `static` in a header, so every
translation unit that includes it gets its own internal-linkage copy.
That's a latent ODR hazard, and it trips `-Wunused-template` in TUs that
don't instantiate them. Dropping `static` gives them external linkage
(templates are implicitly inline, so nothing else changes).

NFC: linkage-only change.

Part of #202945.
DeltaFile
+3-3llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h
+3-31 files

LLVM/project 0cc3adallvm/lib/Target/AMDGPU AMDGPUISelLowering.cpp

[AMDGPU] Clean up `LowerFP_TO_INT_SAT` (NFC) (#206118)

This is a follow-up to #202680.
DeltaFile
+11-15llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+11-151 files

LLVM/project d98f750llvm/lib/ExecutionEngine/JITLink aarch32.cpp, llvm/lib/ExecutionEngine/Orc OrcABISupport.cpp

[JITLink][ORC] Clean up unused and assert-only function templates (NFC) (#202973)

These function templates trip `-Wunused-template`.

In `aarch32.cpp`, `writeRegister` has no callers, so it's removed.
`checkRegister` is only used inside `assert`, so it gets compiled out in
release builds (`-DNDEBUG`) and never instantiates; it's marked
`[[maybe_unused]]`. Same story for `stubAndPointerRangesOk` in
`OrcABISupport.cpp`, which is only used in asserts.

NFC.

Part of #202945.
DeltaFile
+2-18llvm/lib/ExecutionEngine/JITLink/aarch32.cpp
+3-3llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp
+5-212 files

LLVM/project 504edc6llvm/utils/lit/tests shtest-output-printing.py

fix test

Created using spr 1.3.8-wip
DeltaFile
+1-1llvm/utils/lit/tests/shtest-output-printing.py
+1-11 files

LLVM/project 9cc5827llvm/lib/Target/Mips/Disassembler MipsDisassembler.cpp, llvm/lib/Target/Mips/MCTargetDesc MipsELFObjectWriter.cpp

[Mips] Remove unused function templates (NFC) (#202971)

A few function templates in the Mips MC layer have no callers anywhere,
so they never get instantiated and trip `-Wunused-template`. They all
live in `.cpp` files, so this is plain dead-code removal.

`MipsELFObjectWriter.cpp`: `copy_if_else` and `find_best` lost their
only user when `sortRelocs` was rewritten in #104723. The
`FindBestPredicateResult` enum existed only for `find_best`, so it goes
too.

`MipsDisassembler.cpp`: `DecodeDAHIDATIMMR6` isn't referenced by any
`DecoderMethod`. The r6 DAHI/DATI instructions decode through its
sibling `DecodeDAHIDATI`, which is what the generated tables actually
call.

NFC: removes uninstantiated templates only.

Part of #202945.
DeltaFile
+0-55llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
+0-15llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp
+0-702 files

LLVM/project eda0b7ellvm/include/llvm/Object ELF.h

[Object][ELF] Remove internal linkage from header function templates (NFC) (#202969)

These `static` function templates live in a header, so every translation
unit that includes it gets its own internal-linkage copy. That's a
latent ODR hazard, and it trips `-Wunused-template` in every TU that
doesn't instantiate them. Dropping `static` gives them external linkage
(templates are implicitly inline, so nothing else changes). This matches
`getElfArchType` in the same file, which is already a plain `inline`
helper.

NFC: linkage-only change.

Part of #202945
DeltaFile
+13-14llvm/include/llvm/Object/ELF.h
+13-141 files

LLVM/project 4eb7340clang/docs ReleaseNotes.rst, clang/lib/Sema SemaInit.cpp

[Clang][Sema] Fix crash on init-list of array with incomplete element type (#205973)

## Summary

Fixes #140685.

clangd (and clang itself, with assertions enabled) crashes on:

```cpp
struct MoveOnly;
void test() {
  MoveOnly (&&list)[1] = {};
}
```

with

```
Assertion failed: (CanDeclareSpecialMemberFunction(RD) && "doing special member lookup into record that isn't fully complete"), function LookupSpecialMember, file SemaLookup.cpp

    [41 lines not shown]
DeltaFile
+18-0clang/test/SemaCXX/init-list-incomplete-dtor-crash.cpp
+6-1clang/lib/Sema/SemaInit.cpp
+1-0clang/docs/ReleaseNotes.rst
+25-13 files

LLVM/project 114730bclang/docs ReleaseNotes.rst, clang/lib/AST Type.cpp

[Clang] Handle deduced auto types within AtomicType (#197874)

This patch fixes handling of deduced types nested inside AtomicType.

Previously, GetContainedDeducedTypeVisitor did not recurse through
AtomicType nodes, causing getContainedDeducedType() to incorrectly
return null for types such as:

**_Atomic(__auto_type)**

As a result, undeduced AutoType instances could bypass semantic checks
and later reach codegen/type layout paths, eventually triggering
assertions such as:

_!A->getDeducedType().isNull() && "cannot request the size of an
undeduced or dependent auto type_

This patch adds AtomicType traversal support to
GetContainedDeducedTypeVisitor so contained deduced types are properly

    [15 lines not shown]
DeltaFile
+26-0clang/test/Sema/atomic-auto-type.c
+23-2clang/lib/Sema/SemaTemplateDeduction.cpp
+10-0clang/test/CodeGen/atomic-auto-type.c
+4-0clang/lib/AST/Type.cpp
+3-0clang/docs/ReleaseNotes.rst
+66-25 files

LLVM/project b426dd5clang/lib/Lex Preprocessor.cpp

[clang][Lex] Optimize the FileCheckPoints search in Preprocessor (#206356)

Resolves a FIXME and improved linear search by replacing with a binary
search on the FileCheckPoints SmallVector in Lex/Preprocessor.

- used std::upper_bound to find the upper bound of the Start position.
- handle special case if the Start is less than all elements in
FileCheckPoints so returns a nullptr;
- else return the dereferenced value of the CheckPoint just before Start
point.
DeltaFile
+4-9clang/lib/Lex/Preprocessor.cpp
+4-91 files

LLVM/project 2d2a981llvm/test/Transforms/GVN rle-coerced-noalias.ll

[GVN] Add test for scoped-alias metadata dropped on coerced loads (NFC) (#206416)

Precommit test capturing current behavior: when GVN forwards a wider
load to a narrower load at an offset, dropUnknownNonDebugMetadata
strips !noalias and !alias.scope from the surviving wider load even
though that load is unchanged and the metadata stays valid.
DeltaFile
+94-0llvm/test/Transforms/GVN/rle-coerced-noalias.ll
+94-01 files

LLVM/project 2ecdc20llvm/utils/lit/lit TestRunner.py

more fix format

Created using spr 1.3.8-wip
DeltaFile
+2-2llvm/utils/lit/lit/TestRunner.py
+2-21 files

LLVM/project 7dfb414utils/bazel/llvm-project-overlay/mlir BUILD.bazel

Bazel fix for #206156 (#206419)

Signed-off-by: Ingo Müller <ingomueller at google.com>
DeltaFile
+3-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+3-01 files

LLVM/project 8b06acfllvm/utils/lit/lit TestRunner.py

fix

Created using spr 1.3.8-wip
DeltaFile
+7-3llvm/utils/lit/lit/TestRunner.py
+7-31 files

LLVM/project ae1d984compiler-rt/include/sanitizer safestack_interface.h, compiler-rt/lib/safestack safestack.cpp

[SafeStack] Allocate unsafe sigaltstack (#196969)

This introduces a new function `unsafe_sigaltstack(size_t ss_size)` that
can be used by a user to allocate the unsafe sigaltstack.
We cannot intercept sigaltstack to do that automatically, since
allocating memory for the unsafe stack would not be async-signal-safe.

* https://github.com/llvm/llvm-project/pull/196968
* ➤ https://github.com/llvm/llvm-project/pull/196969
* https://github.com/llvm/llvm-project/pull/196970
* https://github.com/llvm/llvm-project/pull/196971
DeltaFile
+70-0compiler-rt/lib/safestack/safestack.cpp
+20-0compiler-rt/test/safestack/sigaltstack.c
+15-0compiler-rt/include/sanitizer/safestack_interface.h
+105-03 files

LLVM/project 8a7dd3cllvm/utils/lit/lit TestRunner.py

make limit configurable

Created using spr 1.3.8-wip
DeltaFile
+6-4llvm/utils/lit/lit/TestRunner.py
+6-41 files

LLVM/project b9cabf0llvm/include/llvm/TargetParser AArch64TargetParser.h, llvm/lib/TargetParser AArch64TargetParser.cpp

[AArch64][NFC] remove CPUInfo::getImpliedExtensions
DeltaFile
+3-3llvm/unittests/TargetParser/TargetParserTest.cpp
+0-4llvm/include/llvm/TargetParser/AArch64TargetParser.h
+1-2llvm/lib/TargetParser/AArch64TargetParser.cpp
+4-93 files

LLVM/project bbaa04bllvm/lib/CodeGen/GlobalISel CombinerHelper.cpp, llvm/lib/Target/AArch64/GISel AArch64LegalizerInfo.cpp

[GlobalISel][AArch64] Tweak `G_FREEZE` legalization, don't push it when that makes code illegal (#204785)

In the combine rule

    // Convert freeze(Op(Op0, NonPoisonOps...)) to Op(freeze(Op0), NonPoisonOps...)
    // when Op0 is not guaranteed non-poison
    def push_freeze_to_prevent_poison_from_propagating ...

Don't push the `freeze` if `freeze(Op0)` is illegal and we've already
run the legalizer.

Also make `G_FREEZE`, `G_IMPLICIT_DEF`, `G_CONSTANT_FOLD_BARRIER` legal for
`s128` operands.

Two new tests added:

- `free-push-legal.mir` checks that we don't push `freeze` towards operands
  post-legalization when doing so makes the code illegal.


    [7 lines not shown]
DeltaFile
+50-0llvm/test/CodeGen/AArch64/GlobalISel/freeze-push.mir
+3-3llvm/test/CodeGen/AArch64/GlobalISel/legalize-undef.mir
+6-0llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
+1-1llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
+60-44 files

LLVM/project 0b542f0llvm/lib/Target/ARM ARMISelLowering.cpp

[ARM] Cleanup for performSTORECombine. NFC (#206420)
DeltaFile
+14-15llvm/lib/Target/ARM/ARMISelLowering.cpp
+14-151 files

LLVM/project ad30b9aclang/lib/CodeGen/TargetBuiltins ARM.cpp

[clang][AArch64] Remove dead code-gen code (#205153)
DeltaFile
+0-28clang/lib/CodeGen/TargetBuiltins/ARM.cpp
+0-281 files

LLVM/project eff8579llvm/include/llvm/TargetParser AArch64TargetParser.h, llvm/lib/TargetParser AArch64TargetParser.cpp

[AArch64][NFC] rename getImpliedExtensions -> getDefaultExtensions
DeltaFile
+3-3llvm/unittests/TargetParser/TargetParserTest.cpp
+1-1llvm/include/llvm/TargetParser/AArch64TargetParser.h
+1-1llvm/lib/TargetParser/AArch64TargetParser.cpp
+5-53 files

LLVM/project ece2342llvm/test/CodeGen/RISCV/rvv vp-combine-store-reverse.ll

[RISCV] Convert opaque pointers in vp-combine-store-reverse.ll. NFC (#206411)
DeltaFile
+8-8llvm/test/CodeGen/RISCV/rvv/vp-combine-store-reverse.ll
+8-81 files

LLVM/project 90c9458mlir/lib/Dialect/Affine/Transforms AffineDataCopyGeneration.cpp

[mlir][affine] Remove redundant copyNests.clear() after declaration (NFC) (#206348)

The clear() call immediately following the declaration of copyNests is
redundant since a default-constructed DenseSet is already empty. Remove
it.
DeltaFile
+0-3mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp
+0-31 files

LLVM/project 14da868llvm/lib/Target/ARM ARMISelLowering.cpp ARMInstrVFP.td, llvm/test/CodeGen/ARM bf16-instructions.ll

[ARM] Add basic bf16 fpround support (#206415)

This adds basic bf16 fpround support, custom lowering f32 operations to
vcvtb
instructions.
DeltaFile
+30-8llvm/test/CodeGen/ARM/bf16-instructions.ll
+9-0llvm/lib/Target/ARM/ARMISelLowering.cpp
+4-0llvm/lib/Target/ARM/ARMInstrVFP.td
+43-83 files

LLVM/project 268d751mlir/include/mlir/Interfaces ValueBoundsOpInterface.h, mlir/lib/Dialect/Arith/IR ValueBoundsOpInterfaceImpl.cpp ArithDialect.cpp

[mlir][arith] Add ValueBoundsOpInterface external models for the arith integer CeilDiv, RemSI, RemUI, MaxUI, MinUI. (#204966)

Add ValueBoundsOpInterface external models for the arith integer
CeilDiv, RemSI, RemUI, MaxUI, MinUI.

Since the ValueBoundsConstraintSet infrastructure interprets unsigned
integers as signed, unsigned ops needed special handling.
In the unsigned ops we first verify that the integers can be proven as
positive, and if yes we add the appropriate constraints to the set.

The only exception for that is the RemUI, since the bound is only
dependent on the divider we don't care what's the sign of the lhs.

---------

Co-authored-by: Nir Herscovici <nir.herscovici at mobileye.com>
DeltaFile
+277-0mlir/test/Dialect/Arith/value-bounds-op-interface-impl.mlir
+132-0mlir/lib/Dialect/Arith/IR/ValueBoundsOpInterfaceImpl.cpp
+28-0mlir/lib/Interfaces/ValueBoundsOpInterface.cpp
+18-0mlir/include/mlir/Interfaces/ValueBoundsOpInterface.h
+3-1mlir/lib/Dialect/Arith/IR/ArithDialect.cpp
+458-15 files

LLVM/project 856abc7clang/include/clang/AST OpenMPClause.h, clang/lib/Parse ParseOpenMP.cpp

[Clang][OpenMP] Add parsing for dims modifier in num_teams and thread_limit
DeltaFile
+161-70clang/lib/Sema/SemaOpenMP.cpp
+124-0clang/test/OpenMP/dims_modifier_messages.cpp
+63-21clang/lib/Parse/ParseOpenMP.cpp
+62-2clang/include/clang/AST/OpenMPClause.h
+40-0clang/test/OpenMP/dims_modifier_ast_print.cpp
+23-11clang/lib/Sema/TreeTransform.h
+473-10414 files not shown
+596-14920 files

LLVM/project 126583dllvm/lib/Transforms/Scalar GVN.cpp, llvm/test/Transforms/GVN rle-coerced-noalias.ll

[GVN] Preserve scoped-alias metadata on coerced loads

When forwarding a wider load to a narrower load at an offset, GVN drops
the wider load's metadata. !noalias and !alias.scope are independent of
the load type and offset, and the wider load is not moved and still
accesses the same memory, so they remain valid and are now kept instead
of dropped.
DeltaFile
+12-7llvm/test/Transforms/GVN/rle-coerced-noalias.ll
+5-3llvm/lib/Transforms/Scalar/GVN.cpp
+17-102 files

LLVM/project 149d4b4llvm/test/Transforms/GVN rle-coerced-noalias.ll

[GVN] Add test for scoped-alias metadata dropped on coerced loads

Precommit test capturing current behavior: when GVN forwards a wider
load to a narrower load at an offset, dropUnknownNonDebugMetadata
strips !noalias and !alias.scope from the surviving wider load even
though that load is unchanged and the metadata stays valid.
DeltaFile
+94-0llvm/test/Transforms/GVN/rle-coerced-noalias.ll
+94-01 files

LLVM/project eb29d7fllvm/include/llvm/IR IntrinsicsRISCV.td, llvm/lib/Target/RISCV RISCVISelLowering.cpp RISCVInstrInfoP.td

[RISCV][P-ext] Add codegen for packed reduction sum (#206004)

The predsum/predsumu instructions reduce a packed vector to a scalar:
each element is sign- or zero-extended to the accumulator width and
added to the scalar accumulator rs2.

This patch adds the llvm.riscv.predsum and predsumu intrinsics along
with isel patterns for target-legal results (predsum.bs/hs/ws, plus
the paired predsum.dbs/dhs for a GPRPair source on RV32).

The remaining combinations have a target-illegal result and are split
in ReplaceNodeResults:
* On RV64: An i32 accumulator reduces at i64 and is then truncated
  (the 32-bit source is zero-extended first).
* On RV32: An i64 accumulator reduces to a 32-bit partial sum and is
  widening-accumulated via wadda/waddau.
DeltaFile
+155-0llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+65-0llvm/test/CodeGen/RISCV/rvp-simd-32.ll
+51-0llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+35-0llvm/lib/Target/RISCV/RISCVInstrInfoP.td
+8-0llvm/include/llvm/IR/IntrinsicsRISCV.td
+314-05 files