LLVM/project c4830afclang-tools-extra/clangd ConfigYAML.cpp

[clangd] Use unique_function for config handlers (#203008)

`ConfigYAML.cpp`'s `DictParser` owns its callbacks for one parse and
never copies them, so this replaces `std::function` with move-only
`llvm::unique_function` and removes the unused copy machinery for each
lambda.

In a matched Release AArch64 build, `ConfigYAML.cpp.o` shrank by 94,560
bytes, stripped clangd shrank by 16,848 bytes, unstripped clangd shrank
by 82,512 bytes, and dyld fixups fell by 336.

Validated with the 16 `ParseYAML` unit tests and `clangd --check`; 12
paired runs of 100,000 parses improved mean user CPU time by 3.46% (95%
CI: 1.31% to 5.61%).

Work towards #202616

AI tool disclosure: Co-authored with OpenAI Codex.
DeltaFile
+10-4clang-tools-extra/clangd/ConfigYAML.cpp
+10-41 files

LLVM/project 74822b4clang/docs ReleaseNotes.md, clang/lib/Sema SemaType.cpp

[clang][Sema] Fix rejected-valid for explicit object parameters in dependent nested classes context (#209107)

In #89078, we banned explicit object parameters from several invalid
contexts. This patch proposes we relax the restriction and allow
entering contexts so that nested classes can be visited correctly.

Close #136472
DeltaFile
+13-0clang/test/SemaCXX/cxx2b-deducing-this.cpp
+2-1clang/lib/Sema/SemaType.cpp
+1-0clang/docs/ReleaseNotes.md
+16-13 files

LLVM/project ffa026flibunwind/test aix_vapi_signal_unwind.pass.cpp

Adjust comment style for LIT directives
DeltaFile
+8-8libunwind/test/aix_vapi_signal_unwind.pass.cpp
+8-81 files

LLVM/project 424421aorc-rt/include CMakeLists.txt, orc-rt/lib/executor CMakeLists.txt

[orc-rt] Sort header and source lists in CMakeLists. NFC. (#209685)
DeltaFile
+11-11orc-rt/include/CMakeLists.txt
+1-1orc-rt/lib/executor/CMakeLists.txt
+12-122 files

LLVM/project d766b7dllvm/lib/Transforms/Coroutines MaterializationUtils.cpp

address review comment
DeltaFile
+1-1llvm/lib/Transforms/Coroutines/MaterializationUtils.cpp
+1-11 files

LLVM/project f102dcfllvm/test/Transforms/Coroutines coro-materialize-check-operands.ll

additional test case
DeltaFile
+37-0llvm/test/Transforms/Coroutines/coro-materialize-check-operands.ll
+37-01 files

LLVM/project 06fdb69llvm/lib/Target/RISCV RISCVInstrInfoZilx.td RISCVISelDAGToDAG.h

Address comments: remove AddedComplexity, use iota, ...

Created using spr 1.3.6-beta.1
DeltaFile
+58-53llvm/lib/Target/RISCV/RISCVInstrInfoZilx.td
+4-6llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
+1-1llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+63-603 files

LLVM/project 94ea3f4llvm/lib/Target/RISCV RISCVInstrInfoZilx.td

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.6-beta.1

[skip ci]
DeltaFile
+58-45llvm/lib/Target/RISCV/RISCVInstrInfoZilx.td
+58-451 files

LLVM/project 454a66allvm/include/llvm/Passes CodeGenPassBuilder.h, llvm/include/llvm/Target TargetOptions.h TargetMachine.h

[CodeGen][NPM] Disable Machine verifier at the end of default pipelines (#208357)

keeping discussions in https://github.com/llvm/llvm-project/pull/176693.
Adds target option to disable machine verifier at the end of default
pilelines (O0,O1..). Also ref.
https://github.com/llvm/llvm-project/pull/201004 for discussions
regarding why this is required (temporarily atleast) so that NPM
migration is unblocked. should be removed once we have fixed all the
latent verifier issues.
DeltaFile
+9-5llvm/include/llvm/Target/TargetOptions.h
+3-1llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+3-0llvm/include/llvm/Target/TargetMachine.h
+0-3llvm/test/CodeGen/AMDGPU/llc-pipeline-npm.ll
+1-1llvm/include/llvm/Passes/CodeGenPassBuilder.h
+16-105 files

LLVM/project 11ebc0ellvm/lib/Target/AMDGPU AMDGPUInstructionSelector.cpp AMDGPUInstructionSelector.h, llvm/test/CodeGen/AMDGPU/GlobalISel select-merge-values-build-vector-s16.mir merge-values-s16-true16.ll

 [AMDGPU][GlobalISel] Select s16 G_MERGE_VALUES into wider scalars (#207999)

With real-true16 (default on `gfx11`/`gfx12`), a scalar `s16` is a
register type, so the `G_MERGE_VALUES` legality rule started accepting
scalar merges built from `s16` pieces, e.g. `s64 = G_MERGE_VALUES(4 x
s16)`. The instruction selector has no pattern for that shape. So this
aborts with `cannot select` on something like:

```mlir
define amdgpu_kernel void @k(ptr %p) {
    store i136 0, ptr %p, align 8
    ret void
}
```

Make it selectable rather than restricting legalization: Pack pairs of
`s16` with `S_PACK_LL_B32_B16` then `REG_SEQUENCE`.

Assisted-by: Claude

Signed-off-by: Keshav Vinayak Jha <keshavvinayakjha at gmail.com>
DeltaFile
+92-0llvm/test/CodeGen/AMDGPU/GlobalISel/select-merge-values-build-vector-s16.mir
+54-0llvm/test/CodeGen/AMDGPU/GlobalISel/merge-values-s16-true16.ll
+48-1llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+1-0llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
+195-14 files

LLVM/project 9a1ee19llvm/lib/Target/BPF BPFCheckAndAdjustIR.cpp, llvm/test/CodeGen/BPF sink-min-max.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+146-118llvm/test/CodeGen/BPF/sink-min-max.ll
+4-0llvm/lib/Target/BPF/BPFCheckAndAdjustIR.cpp
+0-1llvm/utils/profcheck-xfail.txt
+150-1193 files

LLVM/project 9b1e021llvm/test/CodeGen/BPF sink-min-max.ll

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+138-116llvm/test/CodeGen/BPF/sink-min-max.ll
+138-1161 files

LLVM/project 24c693bllvm/test/CodeGen/BPF sink-min-max.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+138-116llvm/test/CodeGen/BPF/sink-min-max.ll
+138-1161 files

LLVM/project f8d8dc1llvm/lib/Support raw_ostream.cpp, llvm/unittests/Support raw_ostream_test.cpp

[Support] Treat Windows "NUL" as the null device in writeToOutput (#208179)

llvm-objcopy (via writeToOutput) only special-cased "/dev/null", so on
Windows an output path of "NUL" fell through to TempFile::create() +
rename. Windows reserves "NUL" as a device name, so the rename fails
with "permission denied". This broke clang-offload-bundler's SYCL fat
object step when the driver is invoked with `-o nul` in downstream test
https://github.com/intel/llvm/blob/sycl/sycl/test/include_deps/header_reach.cpp

Assisted by: Claude
DeltaFile
+29-0llvm/unittests/Support/raw_ostream_test.cpp
+9-1llvm/lib/Support/raw_ostream.cpp
+38-12 files

LLVM/project f859de8llvm/test lit.cfg.py

[LLVM] Use kwargs for ShTest constructor (#209676)

Since extra_substitutions is not the first argument (although it will be
soon).

Fixes https://lab.llvm.org/buildbot/#/builders/223/builds/7170.

This was broken by 3f46a5e91cdf2ade1d8ca350f4a57af8221407ea.
DeltaFile
+1-1llvm/test/lit.cfg.py
+1-11 files

LLVM/project 897abc0llvm/include/llvm/ADT GenericCycleImpl.h GenericCycleInfo.h

[𝘀𝗽𝗿] initial version

Created using spr 1.3.5-bogner
DeltaFile
+3-9llvm/include/llvm/ADT/GenericCycleImpl.h
+1-5llvm/include/llvm/ADT/GenericCycleInfo.h
+4-142 files

LLVM/project 80aaec7llvm/lib/Target/RISCV RISCVInstrInfoZilx.td

Address comments

Created using spr 1.3.6-beta.1
DeltaFile
+58-45llvm/lib/Target/RISCV/RISCVInstrInfoZilx.td
+58-451 files

LLVM/project fd9e8c1bolt/test/X86 dwarf-inline-range-plt-shift.s, clang/unittests/ScalableStaticAnalysis/Serialization/JSONFormatTest SharedLexicalRepresentationFormatTest.cpp

fix

Created using spr 1.3.7
DeltaFile
+1,437-0llvm/test/Instrumentation/MemorySanitizer/X86/avx512dq-intrinsics.ll
+614-0bolt/test/X86/dwarf-inline-range-plt-shift.s
+317-0llvm/lib/Target/NVPTX/NVPTXPromoteParamAlign.cpp
+259-0clang/unittests/ScalableStaticAnalysis/Serialization/JSONFormatTest/SharedLexicalRepresentationFormatTest.cpp
+217-0llvm/test/CodeGen/NVPTX/promote-param-align.ll
+141-64llvm/include/llvm/ADT/GenericCycleImpl.h
+2,985-64114 files not shown
+5,469-1,188120 files

LLVM/project e0f43b0bolt/test/X86 dwarf-inline-range-plt-shift.s, clang/unittests/ScalableStaticAnalysis/Serialization/JSONFormatTest SharedLexicalRepresentationFormatTest.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+1,437-0llvm/test/Instrumentation/MemorySanitizer/X86/avx512dq-intrinsics.ll
+614-0bolt/test/X86/dwarf-inline-range-plt-shift.s
+317-0llvm/lib/Target/NVPTX/NVPTXPromoteParamAlign.cpp
+259-0clang/unittests/ScalableStaticAnalysis/Serialization/JSONFormatTest/SharedLexicalRepresentationFormatTest.cpp
+217-0llvm/test/CodeGen/NVPTX/promote-param-align.ll
+141-64llvm/include/llvm/ADT/GenericCycleImpl.h
+2,985-64114 files not shown
+5,469-1,188120 files

LLVM/project cb95e60bolt/test/X86 dwarf-inline-range-plt-shift.s, clang/unittests/ScalableStaticAnalysis/Serialization/JSONFormatTest SharedLexicalRepresentationFormatTest.cpp

fix

Created using spr 1.3.7
DeltaFile
+1,437-0llvm/test/Instrumentation/MemorySanitizer/X86/avx512dq-intrinsics.ll
+614-0bolt/test/X86/dwarf-inline-range-plt-shift.s
+317-0llvm/lib/Target/NVPTX/NVPTXPromoteParamAlign.cpp
+259-0clang/unittests/ScalableStaticAnalysis/Serialization/JSONFormatTest/SharedLexicalRepresentationFormatTest.cpp
+217-0llvm/test/CodeGen/NVPTX/promote-param-align.ll
+141-64llvm/include/llvm/ADT/GenericCycleImpl.h
+2,985-64114 files not shown
+5,469-1,188120 files

LLVM/project cb4298dbolt/test/X86 dwarf-inline-range-plt-shift.s, clang/unittests/ScalableStaticAnalysis/Serialization/JSONFormatTest SharedLexicalRepresentationFormatTest.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+1,437-0llvm/test/Instrumentation/MemorySanitizer/X86/avx512dq-intrinsics.ll
+614-0bolt/test/X86/dwarf-inline-range-plt-shift.s
+317-0llvm/lib/Target/NVPTX/NVPTXPromoteParamAlign.cpp
+259-0clang/unittests/ScalableStaticAnalysis/Serialization/JSONFormatTest/SharedLexicalRepresentationFormatTest.cpp
+217-0llvm/test/CodeGen/NVPTX/promote-param-align.ll
+141-64llvm/include/llvm/ADT/GenericCycleImpl.h
+2,985-64113 files not shown
+5,468-1,187119 files

LLVM/project 848d409flang/lib/Lower/OpenMP OpenMP.cpp, mlir/lib/Dialect/OpenMP/IR OpenMPDialect.cpp

[flang][OpenMP] Lower target in_reduction (#199967)

This patch carries `in_reduction` through `omp.target` for host
execution.

The lowering looks up the task-reduction private storage with
`__kmpc_task_reduction_get_th_data` and binds the target region argument
to that private pointer. This makes uses inside the target region refer
to the task-private reduction storage instead of continuing to use the
original variable.

This also fixes the `omp::TargetOp::build(TargetOperands)` path so
`in_reduction` operands are preserved instead of being dropped.

On the Flang side, `target in_reduction` list items are added to the
target map entries when needed, giving the translation a matching mapped
value to rewrite.

### Stack / review order

    [21 lines not shown]
DeltaFile
+128-21mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+124-14mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+107-0mlir/test/Target/LLVMIR/openmp-target-in-reduction.mlir
+88-15flang/lib/Lower/OpenMP/OpenMP.cpp
+88-3mlir/test/Target/LLVMIR/openmp-todo.mlir
+85-0mlir/test/Dialect/OpenMP/invalid.mlir
+620-5314 files not shown
+1,029-7920 files

LLVM/project bd1983ellvm/lib/TableGen TGParser.cpp

[TableGen] V is always a TypedInit, so use cast (#209208)

No need to dyn_cast. It is functionally impossible for V to not be a
TypedInit at this point.
DeltaFile
+1-3llvm/lib/TableGen/TGParser.cpp
+1-31 files

LLVM/project 7c7f62cllvm/utils/lit/tests shtest-format.py, llvm/utils/lit/tests/Inputs/shtest-format write-bad-encoding.py write-control-chars.py

[lit] Remove external shell tests for shtest-format

fail.txt was redundant with an internal shell test.

Move the other tests into the internal shell directory as they are not
redundant.

Reviewers: arichardson, jh7370, hnrklssn, ilovepi

Pull Request: https://github.com/llvm/llvm-project/pull/209552
DeltaFile
+32-66llvm/utils/lit/tests/shtest-format.py
+0-6llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-control-chars.py
+6-0llvm/utils/lit/tests/Inputs/shtest-format/write-bad-encoding.py
+6-0llvm/utils/lit/tests/Inputs/shtest-format/write-control-chars.py
+0-6llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py
+5-0llvm/utils/lit/tests/Inputs/shtest-format/fail_with_bad_encoding.txt
+49-788 files not shown
+57-10114 files

LLVM/project 5377d14compiler-rt/test/builtins/Unit lit.cfg.py, llvm/include/llvm/ADT GenericCycleImpl.h GenericCycleInfo.h

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+141-64llvm/include/llvm/ADT/GenericCycleImpl.h
+105-8llvm/lib/CodeGen/ReplaceWithVeclib.cpp
+87-0llvm/test/CodeGen/X86/sincos-fpmath.ll
+53-28llvm/include/llvm/ADT/GenericCycleInfo.h
+2-35compiler-rt/test/builtins/Unit/lit.cfg.py
+8-18llvm/test/CodeGen/X86/veclib-llvm.sincos.ll
+396-15345 files not shown
+467-37051 files

LLVM/project 00112b0compiler-rt/test lit.common.cfg.py, compiler-rt/test/builtins/Unit lit.cfg.py

[compiler-rt] Drop support for using the external shell

The lit external shell is going to be removed soon, so drop support for
using it to run the compiler-rt tests.

Reviewers: petrhosek, ilovepi, thurstond

Pull Request: https://github.com/llvm/llvm-project/pull/209626
DeltaFile
+2-35compiler-rt/test/builtins/Unit/lit.cfg.py
+1-9compiler-rt/test/lit.common.cfg.py
+3-442 files

LLVM/project 6b641b9bolt/test/X86 dwarf-inline-range-plt-shift.s, clang/unittests/ScalableStaticAnalysis/Serialization/JSONFormatTest SharedLexicalRepresentationFormatTest.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+1,437-0llvm/test/Instrumentation/MemorySanitizer/X86/avx512dq-intrinsics.ll
+614-0bolt/test/X86/dwarf-inline-range-plt-shift.s
+317-0llvm/lib/Target/NVPTX/NVPTXPromoteParamAlign.cpp
+259-0clang/unittests/ScalableStaticAnalysis/Serialization/JSONFormatTest/SharedLexicalRepresentationFormatTest.cpp
+217-0llvm/test/CodeGen/NVPTX/promote-param-align.ll
+141-64llvm/include/llvm/ADT/GenericCycleImpl.h
+2,985-64126 files not shown
+5,569-1,244132 files

LLVM/project dcbf2a9clang-tools-extra/clangd/test lit.cfg.py, clang-tools-extra/include-cleaner/test lit.cfg.py

[clang-tools-extra] Drop option to use external shell

The external shell is going to be removed from lit soon, so drop the
option to enable using it.

Reviewers: petrhosek, compnerd, ilovepi

Pull Request: https://github.com/llvm/llvm-project/pull/209625
DeltaFile
+1-12clang-tools-extra/include-cleaner/test/lit.cfg.py
+1-12clang-tools-extra/clangd/test/lit.cfg.py
+1-10clang-tools-extra/test/lit.cfg.py
+3-343 files

LLVM/project 6745a13bolt/test/X86 dwarf-inline-range-plt-shift.s, clang/unittests/ScalableStaticAnalysis/Serialization/JSONFormatTest SharedLexicalRepresentationFormatTest.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+1,437-0llvm/test/Instrumentation/MemorySanitizer/X86/avx512dq-intrinsics.ll
+614-0bolt/test/X86/dwarf-inline-range-plt-shift.s
+317-0llvm/lib/Target/NVPTX/NVPTXPromoteParamAlign.cpp
+259-0clang/unittests/ScalableStaticAnalysis/Serialization/JSONFormatTest/SharedLexicalRepresentationFormatTest.cpp
+217-0llvm/test/CodeGen/NVPTX/promote-param-align.ll
+141-64llvm/include/llvm/ADT/GenericCycleImpl.h
+2,985-64126 files not shown
+5,569-1,244132 files

LLVM/project a2fac66flang-rt/test lit.cfg.py, flang/test lit.cfg.py

[Flang] Drop option to use external shell for testing

The external shell will be deleted soon, so drop the option to enable
the use of it for testing flang/flang-rt.

Reviewers: petrhosek, clementval, ilovepi

Pull Request: https://github.com/llvm/llvm-project/pull/209624
DeltaFile
+1-12flang/test/lit.cfg.py
+1-11flang-rt/test/lit.cfg.py
+2-232 files