UnstableChanges

Summary

  1. [mlir][linalg] Refactor PadTensorOpVectorizationPattern (NFC) (details)
  2. [AArch64] Remove SETCC of CSEL when the latter's condition can be inverted (details)
  3. [OPENMP]Fix PR50129: omp cancel parallel not working as expected. (details)
  4. [ConstantFolding] add copysign tests for more FP types; NFC (details)
  5. [clangd] Run code completion on each token coverd by --check-lines (details)
  6. [clang] use a different name for generated test cdb (details)
  7. [RISCV] Teach vsetvli insertion pass that operations on masks don't care about SEW/LMUL. (details)
  8. [OpenMP] fix spelling error in message-converter.pl (details)
  9. [Attributor] Allow lookupAAFor to return null on invalid state (details)
  10. [libcxx][gardening] Move all algorithms into their own headers. (details)
  11. [Attributor] Check HeapToStack's state for isKnownHeapToStack (details)
  12. [libcxx][ranges] Add `ranges::empty_view`. (details)
  13. [gn build] Port 7ed7d4ccb899 (details)
  14. [gn build] Port d31a2e7554ea (details)
  15. Add commutable attribute to opcodes for ARC (details)
  16. [libcxx][ranges] Add concepts in range.utility.helpers. (details)
  17. [AArch64][GlobalISel] Handle multiple phis in fixupPHIOpBanks (details)
  18. CUDA/HIP: Change device-use-host-var.cu's NOT "external" check to include variable name (details)
  19. [OpenCL] Add DWARF address spaces mapping for SPIR (details)
  20. [scudo] Always exclude Tag 0 (details)
  21. [profile] Add -fprofile-instr-generate tests for weak definition and various linkages (details)
Commit e789efc92a5aa6495a22bd3a93a03f640dc2f32a by springerm
[mlir][linalg] Refactor PadTensorOpVectorizationPattern (NFC)

* Rename PadTensorOpVectorizationPattern to GenericPadTensorOpVectorizationPattern.
* Make GenericPadTensorOpVectorizationPattern a private pattern, to be instantiated via populatePadTensorOpVectorizationPatterns.
* Factor out parts of PadTensorOpVectorizationPattern into helper functions.

This commit prepares PadTensorOpVectorizationPattern for a series of subsequent commits that add more specialized PadTensorOp vectorization patterns.

Differential Revision: https://reviews.llvm.org/D103681
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
The file was modifiedmlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
Commit a85f5874e2a4d4bad8c53d277e9df183122793ae by bradley.smith
[AArch64] Remove SETCC of CSEL when the latter's condition can be inverted

  setcc (csel 0, 1, cond, X), 1, ne ==> csel 0, 1, !cond, X

Where X is a condition code setting instruction.

Co-authored-by: Paul Walker <paul.walker@arm.com>

Differential Revision: https://reviews.llvm.org/D103256
The file was modifiedllvm/test/CodeGen/AArch64/sve-setcc.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Commit c84a5448b5ac3212303c553866e8d42a5a75ce30 by a.bataev
[OPENMP]Fix PR50129: omp cancel parallel not working as expected.

Need to emit a call for __kmpc_cancel_barrier in the exit block for
__kmpc_cancel function call if cancellation of the parallel block is
requested.

Differential Revision: https://reviews.llvm.org/D103646
The file was modifiedclang/test/OpenMP/cancellation_point_codegen.cpp
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.cpp
The file was modifiedclang/test/OpenMP/cancel_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_codegen.cpp
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_codegen.cpp
The file was modifiedllvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
The file was modifiedclang/test/OpenMP/parallel_master_taskloop_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_for_codegen.cpp
The file was modifiedllvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
Commit 8a4d05ddb3ff25c53299ff440032547d68b36397 by spatel
[ConstantFolding] add copysign tests for more FP types; NFC

D102673 proposes to ease the current type check, but
there doesn't appear to be any test coverage for that.
The file was modifiedllvm/test/Transforms/InstSimplify/ConstProp/copysign.ll
Commit eba3ee04d450230f7ac1f88b1abd7b09c600c82d by adamcz
[clangd] Run code completion on each token coverd by --check-lines

In --check mode we do not run code completion because it is too slow,
especially on larger files. With the introducation of --check-lines we
can narrow down the scope and thus we can afford to do code completion.

We vlog() the top completion result, but that's not really the point.
The most value will come from being able to reproduce crashes that occur
during code completion and require preamble build or index (and thus are
more difficult to reproduce with -code-complete-at).

Differential Revision: https://reviews.llvm.org/D103538
The file was modifiedclang-tools-extra/clangd/tool/Check.cpp
The file was modifiedclang-tools-extra/clangd/tool/ClangdMain.cpp
Commit b109172d993edacd9853a8bbb8128a94da014399 by goncharov.mikhail
[clang] use a different name for generated test cdb

if build system copied source files as readonly, then override of db_tu.json
will fail
The file was modifiedclang/test/ClangScanDeps/modules-pch.c
Commit c653711fd3a9ac8399a435f02054ef42cddc4db7 by craig.topper
[RISCV] Teach vsetvli insertion pass that operations on masks don't care about SEW/LMUL.

All that really matters is that the VLMAX of the preceding
instructions is the same as the VLMAX required by the mask
operation.

Also update the vmsge(u) handling to use the SEW/LMUL we use for
other mask register operations. We were matching it to the compare
before. Some cases will be improve if we fix masked compares to
use tail agnostic policy. I think they ignore the tail policy
anyway.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D103299
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vmsgeu-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-vselect.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vmsge-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vmsge-rv64.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vmsgeu-rv64.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/saddo-sdnode.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/setcc-fp-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/setcc-fp-rv64.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-setcc.ll
Commit 56dd158c329c424491485dd3c48616b64cdc13b1 by jonathan.l.peyton
[OpenMP] fix spelling error in message-converter.pl
The file was modifiedopenmp/runtime/tools/message-converter.pl
Commit 8bb713207d2cc6efeaa78850bbd89a3a5c65fe03 by jhuber6
[Attributor] Allow lookupAAFor to return null on invalid state

This patch adds an option to `lookupAAFor` that allows it to return a
nullptr if the state of the looked up attribute is invalid. This is so
future passes can use this to query other attributes with the guarantee
that they are valid.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D103556
The file was modifiedllvm/include/llvm/Transforms/IPO/Attributor.h
Commit 7ed7d4ccb8991e2b5b95334b508f8cec2faee737 by zoecarver
[libcxx][gardening] Move all algorithms into their own headers.

This is a fairly mechanical change, it just moves each algorithm into its own header. This is a NFC.

Note: during this change, I burned down all the includes, so this follows "include only and exactly what you use."

Differential Revision: https://reviews.llvm.org/D103583
The file was addedlibcxx/include/__algorithm/partition_point.h
The file was addedlibcxx/include/__algorithm/find.h
The file was addedlibcxx/include/__algorithm/set_union.h
The file was modifiedlibcxx/include/module.modulemap
The file was addedlibcxx/include/__algorithm/rotate.h
The file was modifiedlibcxx/test/std/containers/sequences/array/compare.fail.cpp
The file was addedlibcxx/include/__algorithm/includes.h
The file was addedlibcxx/include/__algorithm/shift.h
The file was addedlibcxx/include/__algorithm/find_first_of.h
The file was addedlibcxx/include/__algorithm/uniform_int_distribution.h
The file was addedlibcxx/include/__algorithm/pop_heap.h
The file was addedlibcxx/include/__algorithm/all_of.h
The file was addedlibcxx/include/__algorithm/search.h
The file was addedlibcxx/include/__algorithm/find_if_not.h
The file was addedlibcxx/include/__algorithm/unique.h
The file was addedlibcxx/include/__functional/search.h
The file was addedlibcxx/include/__algorithm/comp.h
The file was modifiedlibcxx/include/experimental/functional
The file was addedlibcxx/include/__algorithm/copy.h
The file was addedlibcxx/include/__algorithm/partition.h
The file was addedlibcxx/include/__algorithm/move.h
The file was addedlibcxx/include/__algorithm/nth_element.h
The file was addedlibcxx/include/__algorithm/push_heap.h
The file was addedlibcxx/include/__algorithm/sift_down.h
The file was addedlibcxx/include/__algorithm/binary_search.h
The file was addedlibcxx/include/__algorithm/prev_permutation.h
The file was addedlibcxx/include/__algorithm/unwrap_iter.h
The file was addedlibcxx/include/__algorithm/none_of.h
The file was addedlibcxx/include/__algorithm/search_n.h
The file was addedlibcxx/include/__algorithm/max_element.h
The file was addedlibcxx/include/__algorithm/adjacent_find.h
The file was addedlibcxx/include/__algorithm/remove.h
The file was modifiedlibcxx/include/functional
The file was addedlibcxx/include/__algorithm/for_each_n.h
The file was addedlibcxx/include/__algorithm/partial_sort.h
The file was addedlibcxx/include/__algorithm/find_if.h
The file was addedlibcxx/include/__algorithm/count_if.h
The file was addedlibcxx/include/__algorithm/is_permutation.h
The file was addedlibcxx/include/__algorithm/mismatch.h
The file was addedlibcxx/include/__algorithm/minmax.h
The file was addedlibcxx/include/__algorithm/for_each.h
The file was addedlibcxx/include/__algorithm/any_of.h
The file was addedlibcxx/include/__algorithm/min.h
The file was addedlibcxx/include/__algorithm/upper_bound.h
The file was addedlibcxx/include/__algorithm/fill.h
The file was addedlibcxx/include/__algorithm/set_intersection.h
The file was addedlibcxx/include/__algorithm/reverse.h
The file was addedlibcxx/include/__algorithm/lower_bound.h
The file was addedlibcxx/include/__algorithm/sort_heap.h
The file was addedlibcxx/include/__algorithm/is_heap.h
The file was addedlibcxx/include/__algorithm/equal_range.h
The file was modifiedlibcxx/include/algorithm
The file was modifiedlibcxx/include/regex
The file was addedlibcxx/include/__algorithm/stable_sort.h
The file was addedlibcxx/include/__algorithm/clamp.h
The file was addedlibcxx/include/__algorithm/min_element.h
The file was addedlibcxx/include/__algorithm/generate.h
The file was addedlibcxx/include/__algorithm/lexicographical_compare.h
The file was addedlibcxx/include/__algorithm/half_positive.h
The file was addedlibcxx/include/__algorithm/sample.h
The file was addedlibcxx/include/__algorithm/stable_partition.h
The file was addedlibcxx/include/__algorithm/transform.h
The file was modifiedlibcxx/test/std/algorithms/alg.sorting/alg.min.max/requires_forward_iterator.fail.cpp
The file was addedlibcxx/include/__algorithm/comp_ref_type.h
The file was modifiedlibcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp
The file was addedlibcxx/include/__algorithm/is_partitioned.h
The file was addedlibcxx/include/__algorithm/equal.h
The file was addedlibcxx/include/__algorithm/set_difference.h
The file was modifiedlibcxx/include/__memory/temporary_buffer.h
The file was addedlibcxx/include/__algorithm/replace.h
The file was addedlibcxx/include/__algorithm/max.h
The file was addedlibcxx/include/__algorithm/set_symmetric_difference.h
The file was modifiedlibcxx/include/CMakeLists.txt
The file was addedlibcxx/include/__algorithm/find_end.h
The file was addedlibcxx/include/__algorithm/is_heap_until.h
The file was addedlibcxx/include/__algorithm/is_sorted.h
The file was addedlibcxx/include/__algorithm/make_heap.h
The file was addedlibcxx/include/__algorithm/count.h
The file was addedlibcxx/include/__algorithm/sort.h
The file was addedlibcxx/include/__algorithm/minmax_element.h
The file was addedlibcxx/include/__algorithm/shuffle.h
The file was addedlibcxx/include/__algorithm/merge.h
The file was addedlibcxx/include/__algorithm/inplace_merge.h
The file was addedlibcxx/include/__algorithm/next_permutation.h
Commit 4a08163c73d403aa7fd5baeff693b1986b6c8df2 by jhuber6
[Attributor] Check HeapToStack's state for isKnownHeapToStack

This patch changes the `isKnownHeapToStack` and `isAssumedHeapToStack`
member functions to return if a function call is going to be altered by
HeapToStack.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D103574
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
The file was modifiedllvm/include/llvm/Transforms/IPO/Attributor.h
Commit d31a2e7554ea1ddc37a4aa53318549036ae1d780 by zoecarver
[libcxx][ranges] Add `ranges::empty_view`.

Differential Revision: https://reviews.llvm.org/D103208
The file was modifiedlibcxx/include/ranges
The file was addedlibcxx/include/__ranges/empty_view.h
The file was modifiedlibcxx/docs/OneRangesProposalStatus.csv
The file was addedlibcxx/test/std/ranges/range.adaptors/range.empty/empty_view.pass.cpp
The file was modifiedlibcxx/include/CMakeLists.txt
Commit bde24a114d810a51dfba0c59c711236fc0730973 by llvmgnsyncbot
[gn build] Port 7ed7d4ccb899
The file was modifiedllvm/utils/gn/secondary/libcxx/include/BUILD.gn
Commit a1cdd4efad41d5ba64c14da33d4617be3aa23716 by llvmgnsyncbot
[gn build] Port d31a2e7554ea
The file was modifiedllvm/utils/gn/secondary/libcxx/include/BUILD.gn
Commit 12592a439ae53fe35f6b70ee7e2eea60000d3063 by danila
Add commutable attribute to opcodes for ARC

This patch sets the isCommutable attribute for several opcodes that have
the "reg = OPCODE reg, reg" format.

Differential Revision: https://reviews.llvm.org/D103653
The file was modifiedllvm/lib/Target/ARC/ARCInstrInfo.td
Commit 89599e8b201a85c4555e72580b7137e4cce71c94 by zoecarver
[libcxx][ranges] Add concepts in range.utility.helpers.

There are no changes to public APIs.

Differential Revision: https://reviews.llvm.org/D103493
The file was modifiedlibcxx/include/concepts
The file was addedlibcxx/test/libcxx/ranges/range.utility.helpers/different_from.compile.pass.cpp
The file was modifiedlibcxx/include/__iterator/concepts.h
The file was addedlibcxx/test/libcxx/ranges/range.utility.helpers/has_arrow.compile.pass.cpp
The file was addedlibcxx/test/libcxx/ranges/range.utility.helpers/simple_view.compile.pass.cpp
The file was modifiedlibcxx/include/__ranges/view.h
The file was modifiedlibcxx/include/__iterator/iterator_traits.h
Commit 507d193ea7ef20ec77615b55836b4653f736cef3 by Jessica Paquette
[AArch64][GlobalISel] Handle multiple phis in fixupPHIOpBanks

If we ended up with two phi instructions in a block, and we needed to fix up
the banks for the first one, we'd end up inserting our COPY before the second
phi.

E.g.

```
%x = G_PHI ...
%fixup = COPY ...
%y = G_PHI ...
```

This is invalid MIR, and breaks assumptions made by the register allocator later
down the line. With the verifier enabled, it also emits a verification error.

This teaches fixupPHIOpBanks to walk past any phi instructions in the block
when emitting the fixup copies.

Here's an example of the crashing code (same as added testcase):
https://godbolt.org/z/h5j1x3o6e

Differential Revision: https://reviews.llvm.org/D103582
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/preselect-process-phis.mir
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
Commit 4d9f8527dbfbc998baf35eec868c9dec1f8d1224 by kzhuravl_dev
CUDA/HIP: Change device-use-host-var.cu's NOT "external" check to include variable name

Otherwise it is causing one of our build jobs to fail,
it is using "external" as directory, and NOT is
failing because "external" is found in ModuleID.

Differential Revision: https://reviews.llvm.org/D103658
The file was modifiedclang/test/CodeGenCUDA/device-use-host-var.cu
Commit 333987b0458926332e9a1f96869ef47da25fa9b1 by stuart.brady
[OpenCL] Add DWARF address spaces mapping for SPIR

Extend debug info handling by adding DWARF address space mapping for
SPIR, with corresponding test case.

Reviewed By: Anastasia

Differential Revision: https://reviews.llvm.org/D103097
The file was addedclang/test/CodeGenOpenCL/spir-debug-info-pointer-address-space.cl
The file was modifiedclang/lib/Basic/Targets/SPIR.h
Commit ba04c7c128b1214edf8888b129f9e841852a629b by Vitaly Buka
[scudo] Always exclude Tag 0

prepareTaggedChunk uses Tag 0 for header.

Android already PR_MTE_TAG_MASK to 0xfffe,
but with the patch we will not need to deppend
on the system configuration.

Reviewed By: pcc

Differential Revision: https://reviews.llvm.org/D103134
The file was modifiedcompiler-rt/lib/scudo/standalone/memtag.h
Commit b19c0ac7dd61c6929a633f636bded7623d6e7065 by i
[profile] Add -fprofile-instr-generate tests for weak definition and various linkages
The file was addedcompiler-rt/test/profile/Linux/coverage-linkage.cpp
The file was addedcompiler-rt/test/profile/Linux/coverage-linkage-lld.cpp