LLVM/project 2a338aellvm/utils/FileCheck FileCheck.cpp

Apply clang-format
DeltaFile
+2-2llvm/utils/FileCheck/FileCheck.cpp
+2-21 files

LLVM/project 0b65233libcxx/docs/ReleaseNotes 23.rst, libcxx/include algorithm

[libc++] Implement `ranges::fold_right` (#193997)

- Part of https://github.com/llvm/llvm-project/issues/105208.
- Closes https://github.com/llvm/llvm-project/issues/174060.
DeltaFile
+196-0libcxx/test/std/algorithms/alg.nonmodifying/alg.fold/ranges.fold_right.pass.cpp
+47-0libcxx/include/__algorithm/ranges_fold.h
+8-0libcxx/include/algorithm
+3-4libcxx/test/benchmarks/algorithms/nonmodifying/fold.bench.cpp
+4-0libcxx/test/libcxx/algorithms/nodiscard.verify.cpp
+2-2libcxx/docs/ReleaseNotes/23.rst
+260-63 files not shown
+263-89 files

LLVM/project 94e005dllvm/test/CodeGen/DirectX discard_error.ll firstbitlow_error.ll

[DirectX] Update error messages after #194061 (#195553)

Since DirectX is an experimental target these tests aren't failing on
public bots, but they obviously do when building DirectX.
DeltaFile
+1-1llvm/test/CodeGen/DirectX/discard_error.ll
+1-1llvm/test/CodeGen/DirectX/firstbitlow_error.ll
+1-1llvm/test/CodeGen/DirectX/firstbitshigh_error.ll
+1-1llvm/test/CodeGen/DirectX/firstbituhigh_error.ll
+1-1llvm/test/CodeGen/DirectX/saturate_errors.ll
+5-55 files

LLVM/project b4e81b9llvm/test/CodeGen/DirectX/ContainerData RuntimeInfoCS.ll

[DirectX] Add missing test update for #191528 (#195552)

In #191528 we added the string table to the YAML and updated many tests
that were affected, but it looks like this one was missed.
DeltaFile
+4-0llvm/test/CodeGen/DirectX/ContainerData/RuntimeInfoCS.ll
+4-01 files

LLVM/project 6e72c62lld/ELF OutputSections.cpp, lld/test/ELF relocatable-crel.s

[ELF] Remove duplicate SHT_CREL writeTo branch and cover discarded section symbol path. NFC (#195558)

OutputSection::writeTo had two identical
`if (type == SHT_CREL && !(flags & SHF_ALLOC))` blocks added together in
0af07c078798 (#98115). Drop a dead copy.

A section relocation against a /DISCARD/'d section sees the section
symbol demoted to Undefined. Add a -r --crel case to relocatable-crel.s
that exercises that path.
DeltaFile
+22-0lld/test/ELF/relocatable-crel.s
+0-6lld/ELF/OutputSections.cpp
+22-62 files

LLVM/project 8a4f8baclang/lib/CIR/CodeGen CIRGenBuiltinNVPTX.cpp CIRGenFunction.h

[CIR][NVPTX][NFC] Add initial NVPTX builtin infrastructure (#195214)
DeltaFile
+1,016-0clang/lib/CIR/CodeGen/CIRGenBuiltinNVPTX.cpp
+4-0clang/lib/CIR/CodeGen/CIRGenFunction.h
+2-0clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+1-0clang/lib/CIR/CodeGen/CMakeLists.txt
+1,023-04 files

LLVM/project 9da250cflang/lib/Semantics resolve-names.cpp, flang/test/Lower/OpenACC acc-host-data-cuda-host-assoc.f90

[flang][cuda][openacc] Fix OpenACC use_device host association symbol copies (#194705)

When a use_device object comes from host association, the OpenACC
construct scope may already contain a HostAssocDetails symbol. Reusing
that symbol prevents semantics from applying the CUDA DEVICE attribute,
because the copied symbol is not an object entity. The fix materializes
the expected host-associated symbol in the containing scope, then
replaces the OpenACC-scope symbol with an ObjectEntityDetails copy that
can carry the device attribute.

This allows generic resolution and lowering to see the device version
inside the host_data construct while preserving the host-associated
binding needed by lowering.
DeltaFile
+29-11flang/lib/Semantics/resolve-names.cpp
+24-0flang/test/Lower/OpenACC/acc-host-data-cuda-host-assoc.f90
+53-112 files

LLVM/project 25f8dbdllvm/include/llvm/FileCheck FileCheck.h, llvm/lib/FileCheck FileCheck.cpp FileCheckImpl.h

[FileCheck][NFC] Complete FileCheckDiag class hierarchy

This patch depends on PR #???? and finishes its effort to decouple the
`-dump-input` presentation layer (in
`llvm/utils/FileCheck/FileCheck.cpp`) and the FileCheck library's
diagnostic emission (in `llvm/lib/FileCheck/FileCheck.cpp`).

The focus of this patch is finally eliminating `enum MatchType` and
completing the `FileCheckDiag` class hierarchy.  That enables the
following improvements.

Replace MatchTy and InputRange
==============================

`-dump-input` needs some means to determine (1) whether some notes
should be filtered in by `-dump-input-filter=error`, and (2) where to
place some notes in the input dump.  Without this patch series, the
FileCheck library provides that information by copying the following
from a match result to any note that does not have its own versions:

    [47 lines not shown]
DeltaFile
+229-75llvm/include/llvm/FileCheck/FileCheck.h
+93-69llvm/utils/FileCheck/FileCheck.cpp
+41-41llvm/lib/FileCheck/FileCheck.cpp
+14-13llvm/unittests/FileCheck/FileCheckTest.cpp
+1-3llvm/lib/FileCheck/FileCheckImpl.h
+378-2015 files

LLVM/project 1f468c7llvm/include/llvm/FileCheck FileCheck.h, llvm/lib/FileCheck FileCheck.cpp

[FileCheck][NFC] Introduce MatchResultDiag and MatchNoteDiag

This patch depends on PR #???? and continues its effort to decouple
the `-dump-input` presentation layer (in
`llvm/utils/FileCheck/FileCheck.cpp`) and the FileCheck library's
diagnostic emission (in `llvm/lib/FileCheck/FileCheck.cpp`).

Similar to compiler errors/warnings/remarks vs. notes, the
`FileCheckDiag` series emitted by the FileCheck library contains match
results, each of which might be followed by a series of associated
notes before the next match result.  Without this patch series, that
association is not formally modeled by `FileCheckDiag` or clearly
documented, and `-dump-input` is not able to easily reason about it.

This patch improves the situation by introducing two `FileCheckDiag`
derived classes: `MatchResultDiag` and `MatchNoteDiag`.  It extends
`FileCheckDiagList` to directly associate each `MatchNoteDiag` with
its `MatchResultDiag`.  Thus:
- `FileCheckDiagList::adjustPrevDiags` no longer has to determine that

    [9 lines not shown]
DeltaFile
+121-32llvm/include/llvm/FileCheck/FileCheck.h
+60-41llvm/utils/FileCheck/FileCheck.cpp
+18-30llvm/lib/FileCheck/FileCheck.cpp
+22-10llvm/unittests/FileCheck/FileCheckTest.cpp
+221-1134 files

LLVM/project 0730d35llvm/include/llvm/FileCheck FileCheck.h, llvm/lib/FileCheck FileCheck.cpp FileCheckImpl.h

[FileCheck][NFC] Introduce FileCheckDiagList for -dump-input

Problem
=======

`FileCheckDiag` and its `enum MatchType` have outgrown their original
purpose.  The `-dump-input` presentation layer (in
`llvm/utils/FileCheck/FileCheck.cpp`) and the FileCheck library's
diagnostic emission (in `llvm/lib/FileCheck/FileCheck.cpp`) are too
tightly coupled.  The interactions are subtle to understand and
maintain.  It is difficult for the former to reason about the latter's
emitted diagnostics in order to present them in the most readable
manner.

Solution
========

This patch is the first in an NFC series that removes `MatchType` from
`FileCheckDiag` and refactors `FileCheckDiag` as the base class of a

    [33 lines not shown]
DeltaFile
+48-51llvm/lib/FileCheck/FileCheck.cpp
+29-32llvm/utils/FileCheck/FileCheck.cpp
+14-14llvm/unittests/FileCheck/FileCheckTest.cpp
+25-1llvm/include/llvm/FileCheck/FileCheck.h
+8-10llvm/lib/FileCheck/FileCheckImpl.h
+124-1085 files

LLVM/project 353935bclang/lib/CIR/Dialect/Transforms LoweringPrepare.cpp

Simplify `RegisterFunction` call on target divergance
DeltaFile
+8-12clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
+8-121 files

LLVM/project 6283decllvm/lib/DWARFLinker/Parallel DWARFLinkerCompileUnit.cpp DIEAttributeCloner.cpp, llvm/test/tools/dsymutil null-die.test

[DWARFLinker] Treat NULL DIE references as resolution failures in parallel (#195363)

CompileUnit::resolveDIEReference returned whatever getDIEIndexForOffset
pointed at, even when the entry was a NULL tombstone. The classic linker
checks DWARFDie::isNULL(). Mirror that here so callers get std::nullopt
and warn.

Also fix the "cann't" typo at the two warning sites to match classic,
and enable `--linker parallel` in null-die.test.
DeltaFile
+14-4llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp
+2-1llvm/test/tools/dsymutil/null-die.test
+1-1llvm/lib/DWARFLinker/Parallel/DIEAttributeCloner.cpp
+1-1llvm/lib/DWARFLinker/Parallel/DependencyTracker.cpp
+18-74 files

LLVM/project 1f83fdbllvm/test/tools/llvm-profgen filter-build-id.test, llvm/test/tools/llvm-profgen/Inputs buildid-cs-noprobe.aggperfscript buildid-cs-noprobe.perfscript

Revert "[llvm-profgen] Support [buildid:]0xaddr format in perfscript input" (#195551)

Reverts llvm/llvm-project#190863 due to buildbot breakage e.g.,
https://lab.llvm.org/buildbot/#/builders/52/builds/16951

```
Failed Tests (1):
  LLVM :: tools/llvm-profgen/filter-build-id.test
```
```
==llvm-profgen==3809550==ERROR: AddressSanitizer: container-overflow on address 0x6e80441e1762 at pc 0x6216c3f2cdce bp 0x7fff3c3ddf60 sp 0x7fff3c3dd710
READ of size 8 at 0x6e80441e1762 thread T0
    #0 0x6216c3f2cdcd in MemcmpInterceptorCommon(void*, int (*)(void const*, void const*, unsigned long), void const*, void const*, unsigned long) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:848:7
    #1 0x6216c3f2d25c in bcmp /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:894:10
    #2 0x6216c400b836 in operator== /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/ADT/StringRef.h:914:10
    #3 0x6216c400b836 in operator!= /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/ADT/StringRef.h:917:69
    #4 0x6216c400b836 in llvm::sampleprof::PerfScriptReader::extractCallstack(llvm::sampleprof::TraceStream&, llvm::SmallVectorImpl<unsigned long>&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/tools/llvm-profgen/PerfReader.cpp:801:36
    #5 0x6216c400d37a in llvm::sampleprof::HybridPerfReader::parseSample(llvm::sampleprof::TraceStream&, unsigned long) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/tools/llvm-profgen/PerfReader.cpp:881:8
    #6 0x6216c40150d8 in parseSample /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/tools/llvm-profgen/PerfReader.cpp:1118:3

    [31 lines not shown]
DeltaFile
+13-58llvm/tools/llvm-profgen/PerfReader.cpp
+0-57llvm/test/tools/llvm-profgen/filter-build-id.test
+0-11llvm/test/tools/llvm-profgen/Inputs/buildid-cs-noprobe.aggperfscript
+0-9llvm/test/tools/llvm-profgen/Inputs/buildid-cs-noprobe.perfscript
+13-1354 files

LLVM/project 2dccc37lld/test/ELF riscv-reloc-rvc.s riscv-reloc-add.s

[test] Cover R_RISCV_ADD/SUB and R_RISCV_RVC_{BRANCH,JUMP} (#195555)

These were uncovered according to an LLVM_BUILD_INSTRUMENTED_COVERAGE
build.

llvm-mc resolves `.L1 - .L0` differences at assembly time, so
riscv-reloc-add.s doesn't emit the R_RISCV_ADD*/R_RISCV_SUB* pairs it
was meant to test.

Add riscv-reloc-rvc.s, modeled on riscv-branch.s/riscv-jal.s, to
exercise R_RISCV_RVC_BRANCH and R_RISCV_RVC_JUMP. Drive offsets via
-Ttext + --defsym to land precise values that isolate complementary
extractBits groups.
DeltaFile
+48-0lld/test/ELF/riscv-reloc-rvc.s
+11-4lld/test/ELF/riscv-reloc-add.s
+59-42 files

LLVM/project 92e2dfbclang/lib/CIR/CodeGen CIRGenBuiltinNVPTX.cpp, clang/test/CIR/CodeGenBuiltins/NVPTX builtins-nvptx-sync.cu builtins-sm90.cu

[CIR][NVPTX] Implement sync and cluster barrier builtins
DeltaFile
+30-33clang/lib/CIR/CodeGen/CIRGenBuiltinNVPTX.cpp
+45-0clang/test/CIR/CodeGenBuiltins/NVPTX/builtins-nvptx-sync.cu
+44-0clang/test/CIR/CodeGenBuiltins/NVPTX/builtins-sm90.cu
+119-333 files

LLVM/project 4adca7eclang/lib/CIR/CodeGen CIRGenBuiltinNVPTX.cpp

fix fmt
DeltaFile
+4-6clang/lib/CIR/CodeGen/CIRGenBuiltinNVPTX.cpp
+4-61 files

LLVM/project 7287ab0clang/lib/CIR/CodeGen CIRGenBuiltinNVPTX.cpp CIRGenBuiltin.cpp

Address comments and add missing OG builtins.
DeltaFile
+68-0clang/lib/CIR/CodeGen/CIRGenBuiltinNVPTX.cpp
+2-1clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+70-12 files

LLVM/project 1b1af5allvm/test/tools/llvm-profgen filter-build-id.test, llvm/test/tools/llvm-profgen/Inputs buildid-cs-noprobe.aggperfscript buildid-cs-noprobe.perfscript

Revert "[llvm-profgen] Support [buildid:]0xaddr format in perfscript input (#…"

This reverts commit 8f46a9db2fd043c790a2eb579196c71778884053.
DeltaFile
+13-58llvm/tools/llvm-profgen/PerfReader.cpp
+0-57llvm/test/tools/llvm-profgen/filter-build-id.test
+0-11llvm/test/tools/llvm-profgen/Inputs/buildid-cs-noprobe.aggperfscript
+0-9llvm/test/tools/llvm-profgen/Inputs/buildid-cs-noprobe.perfscript
+13-1354 files

LLVM/project 7608c5fclang/test/CXX/drs cwg26xx.cpp, clang/www cxx_dr_status.html

[clang][NFC] Mark CWG2629 as implemented and add a test (#195490)

This is ill-formed:
```cpp
switch (0.0) {}
```
Before [CWG2629](https://wg21.link/cwg2629) though, this was allowed:
```cpp
switch (double d = 0.0) {} // Value of 'd' is implicitly converted to an integer
```
Clang however has always rejected both: https://godbolt.org/z/GYc4hhrnz
DeltaFile
+7-0clang/test/CXX/drs/cwg26xx.cpp
+1-1clang/www/cxx_dr_status.html
+8-12 files

LLVM/project e8a85b2lld/ELF InputSection.h Target.h

[ELF] Remove unused functions. NFC (#195546)
DeltaFile
+0-5lld/ELF/InputSection.h
+0-1lld/ELF/Target.h
+0-62 files

LLVM/project 441a18dclang-tools-extra/clang-tidy/modernize UseUsingCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Preserve typedef comments in `modernize-use-using` (#180372)

Keep comment blocks between the typedef type and name by capturing the
raw lexer range and avoid injecting unrelated tokens into the
replacement.

Fixes https://github.com/llvm/llvm-project/issues/159518.
DeltaFile
+283-49clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp
+67-0clang-tools-extra/test/clang-tidy/checkers/modernize/use-using.cpp
+6-2clang-tools-extra/docs/ReleaseNotes.rst
+356-513 files

LLVM/project 268813dlld/ELF Symbols.cpp, lld/test/ELF symbol-ordering-file-warnings.s

[ELF] maybeWarnUnorderableSymbol: drop redundant `d &&`, assert isShared. NFC (#195543)

Test Defined first via dyn_cast. Lazy/Common/Placeholder cannot reach
here: readCallGraph runs after replaceCommonSymbols, buildSectionOrder
runs after demoteSymbolsAndComputeIsPreemptible, and redirectSymbols
detaches Placeholder foo at v1 stubs from objectFiles.

In symbol-ordering-file-warnings.s, add a common-symbol case and use
`count 0` for empty-output checks.
DeltaFile
+13-11lld/test/ELF/symbol-ordering-file-warnings.s
+11-11lld/ELF/Symbols.cpp
+24-222 files

LLVM/project d362f21llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer sincos.ll

Small improvements

Created using spr 1.3.7
DeltaFile
+62-1llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+14-28llvm/test/Transforms/SLPVectorizer/sincos.ll
+76-292 files

LLVM/project 92a10f4lld/ELF Symbols.cpp, lld/test/ELF common-shared.s

[ELF] Simplify checkDuplicate; cover SharedSymbol/CommonSymbol resolve. NFC (#195541)

Drop the redundant isDefined() check.

Extend common-shared.s to also exercise the case where the
SharedSymbol's
st_size is not larger than the incoming CommonSymbol's.
DeltaFile
+19-7lld/test/ELF/common-shared.s
+1-1lld/ELF/Symbols.cpp
+20-82 files

LLVM/project 928b14bllvm/lib/Target/AVR AVRISelDAGToDAG.cpp AVRAsmPrinter.cpp, llvm/test/CodeGen/AVR issue-167244.ll

[AVR] Fix selecting inline assembly operands (#195066)
DeltaFile
+33-0llvm/test/CodeGen/AVR/issue-167244.ll
+10-0llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp
+7-1llvm/lib/Target/AVR/AVRAsmPrinter.cpp
+50-13 files

LLVM/project aec3ce0clang/docs UndefinedBehaviorSanitizer.rst, compiler-rt/include/sanitizer ubsan_interface.h

[compiler-rt][UBSan] Add __ubsan_default_suppressions() hook (#194862)

In line with commit 5c62af5 and 83566da.

Assisted-by: Gemini

---------

Co-authored-by: Vitaly Buka <vitalybuka at google.com>
DeltaFile
+24-0compiler-rt/test/ubsan/TestCases/Misc/Posix/ubsan_suppressions.cpp
+10-0clang/docs/UndefinedBehaviorSanitizer.rst
+8-0compiler-rt/include/sanitizer/ubsan_interface.h
+7-0compiler-rt/lib/ubsan/ubsan_diag.cpp
+4-0compiler-rt/lib/ubsan/ubsan_flags.h
+1-0llvm/utils/gn/secondary/compiler-rt/lib/ubsan/BUILD.gn
+54-04 files not shown
+58-010 files

LLVM/project 739e513llvm/test/Transforms/SLPVectorizer/X86 arith-sub-usubo.ll arith-sub-ssubo.ll

Rebase, improves vectorization of extractvalues with vec calls

Created using spr 1.3.7
DeltaFile
+248-2,746llvm/test/Transforms/SLPVectorizer/X86/arith-sub-usubo.ll
+248-2,746llvm/test/Transforms/SLPVectorizer/X86/arith-sub-ssubo.ll
+248-2,746llvm/test/Transforms/SLPVectorizer/X86/arith-add-uaddo.ll
+248-2,746llvm/test/Transforms/SLPVectorizer/X86/arith-add-saddo.ll
+326-843llvm/test/Transforms/SLPVectorizer/X86/arith-mul-umulo.ll
+354-587llvm/test/Transforms/SLPVectorizer/X86/arith-mul-smulo.ll
+1,672-12,4141 files not shown
+1,752-12,4157 files

LLVM/project 0af78eeclang/test/Headers __clang_hip_math.hip, llvm/include/llvm/IR Instruction.h

[IR] Drop parameter attributes (#195516)

Previously `dropPoisonGeneratingReturnAttributes` only considers
poison-generating attributes on return values. However, it is not enough
as shown in
https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/245/files.

This patch also drops parameter attributes, as
`dropUBImplyingAttrsAndMetadata` does.

IR diff shows this patch doesn't block existing transformations:
https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/246
Compile-time impact looks neutral:
https://llvm-compile-time-tracker.com/compare.php?from=d184d9ad0e9f7f34f05d88b7245e7a9a248b245b&to=cdc17034e313657bfd87936e01fa21abd55e184a&stat=instructions:u
DeltaFile
+16-8llvm/lib/IR/Instruction.cpp
+7-8llvm/include/llvm/IR/Instruction.h
+3-2clang/test/Headers/__clang_hip_math.hip
+2-2llvm/test/Transforms/InstCombine/ispow2.ll
+1-1llvm/lib/IR/Operator.cpp
+29-215 files

LLVM/project 35c7191mlir/include/mlir/Analysis/Presburger Matrix.h, mlir/lib/Analysis/Presburger Matrix.cpp

[MLIR][Presburger] Conversion between Int- and FracMatrix (#192822)

A straightforward conversion between `IntMatrix` and `FracMatrix`. This
is one further preparation PR.

The next step for upstreaming is to find a particular solution `x` to
the system `Ax = Bp + C`, which might contain fractions while `A`, `B`
and `C` are IntMatrices. That's the reason we need these conversion
helpers.

---------

Co-authored-by: Arjun Pitchanathan <arjunpitchanathan at gmail.com>
DeltaFile
+18-0mlir/lib/Analysis/Presburger/Matrix.cpp
+8-0mlir/include/mlir/Analysis/Presburger/Matrix.h
+26-02 files

LLVM/project becb707llvm/include/llvm/ADT FoldingSet.h ImmutableSet.h, llvm/lib/IR Intrinsics.cpp

Rebase, address comments

Created using spr 1.3.7
DeltaFile
+214-184llvm/test/CodeGen/X86/subcarry.ll
+94-105llvm/include/llvm/ADT/FoldingSet.h
+61-69llvm/include/llvm/ADT/ImmutableSet.h
+52-0llvm/test/Transforms/SLPVectorizer/X86/shuffled-gathered-vectors.ll
+31-13llvm/lib/IR/Intrinsics.cpp
+36-7llvm/utils/TableGen/Basic/CodeGenIntrinsics.cpp
+488-37831 files not shown
+719-62437 files