SuccessChanges

Summary

  1. [lldb] Don't run the debug info tests for the sanitized or matrix job (details)
Commit 76358849cf721e74bd950ec28dd8d94e8fa09af0 by Jonas Devlieghere
[lldb] Don't run the debug info tests for the sanitized or matrix job

rdar://74356937
The file was modifiedzorg/jenkins/monorepo_build.py (diff)

Summary

  1. [OpenMP][NFC] Pre-commit test changes regarding PR48933 (details)
  2. [OpenMP] Attribute target diagnostics properly (details)
  3. [OpenMP] Delay more diagnostics of potentially non-emitted code (details)
  4. [llvm-objcopy] Delete --build-id-link-{dir,input,output} (details)
  5. [AMDGPU] Add two TSFlags: IsAtomicNoRtn and IsAtomicRtn (details)
  6. [lto] Enable new PM when the PM config is non-empty (details)
  7. TransformUtils: Fix metadata handling in CloneModule (and improve CloneFunctionInto) (details)
  8. [clangd] Pass raw client capabilities to modules. NFC (details)
  9. Define new/delete in libc++ when using libcxxrt (details)
  10. [ValueTracking] add scan limit for assumes (details)
  11. [libc++] Mark __cpp_lib_constexpr_memory as being implemented (details)
  12. [LLDB] Skip TestMultipleTargets.py on Arm/AArch64 Linux (details)
  13. [RISCV][LegalizeTypes] Try to expand BITREVERSE before promoting if the promoted BITREVERSE would expand anyway. (details)
  14. [RISCV] Add support for fixed vector floating point setcc. (details)
  15. [libc++] Change `std::numeric_limits` to just `numeric_limits` in <chrono>. (details)
  16. [mlir][Vector] Add a canonicalization pattern for vector.contract + add (details)
Commit 3b2f19d0bc2803697526191a8a607efa0b38f7e4 by johannes
[OpenMP][NFC] Pre-commit test changes regarding PR48933

This will highlight the effective changes in subsequent commits.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D95903
The file was modifiedclang/test/OpenMP/nvptx_unsupported_type_messages.cpp
Commit f9286b434b764b366f1aad9249c04e7741ed5518 by johannes
[OpenMP] Attribute target diagnostics properly

Type errors in function declarations were not (always) diagnosed prior
to this patch. Furthermore, certain remarks did not get associated
properly which caused them to be emitted multiple times.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D95912
The file was modifiedclang/lib/Sema/SemaExpr.cpp
The file was modifiedclang/test/OpenMP/nvptx_unsupported_type_messages.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/Sema/Sema.cpp
The file was modifiedclang/lib/Sema/SemaDecl.cpp
Commit 1dd66e6111a8247c6c7931143251c0cf1442b905 by johannes
[OpenMP] Delay more diagnostics of potentially non-emitted code

Even code in target and declare target regions might not be emitted.
With this patch we delay more diagnostics and use laziness and linkage
to determine if a function is emitted (for the device). Note that we
still eagerly emit diagnostics for target regions, unfortunately, see
the TODO for the reason.

This hopefully fixes PR48933.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D95928
The file was modifiedclang/test/OpenMP/nvptx_target_exceptions_messages.cpp
The file was modifiedclang/test/OpenMP/nvptx_unsupported_type_messages.cpp
The file was modifiedclang/test/OpenMP/nvptx_allocate_messages.cpp
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
Commit c465429f286f50e52a8d2b3b39f38344f3381cce by i
[llvm-objcopy] Delete --build-id-link-{dir,input,output}

The few options are niche. They solved a problem which was traditionally solved
with more shell commands (`llvm-readelf -n` fetches the Build ID. Then
`ln` is used to hard link the file to a directory derived from the Build ID.)

Due to limitation, they are no longer used by Fuchsia and they don't appear to
be used elsewhere (checked with Google Search and Debian Code Search). So delete
them without a transition period.

Announcement: https://lists.llvm.org/pipermail/llvm-dev/2021-February/148446.html

Differential Revision: https://reviews.llvm.org/D96310
The file was modifiedllvm/tools/llvm-objcopy/CopyConfig.h
The file was modifiedllvm/tools/llvm-objcopy/COFF/COFFObjcopy.cpp
The file was modifiedllvm/docs/ReleaseNotes.rst
The file was modifiedllvm/tools/llvm-objcopy/MachO/MachOObjcopy.cpp
The file was removedllvm/test/tools/llvm-objcopy/ELF/no-build-id-no-notes.test
The file was removedllvm/test/tools/llvm-objcopy/ELF/bad-build-id.test
The file was removedllvm/test/tools/llvm-objcopy/ELF/build-id-link-dir.test
The file was modifiedllvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
The file was modifiedllvm/tools/llvm-objcopy/wasm/WasmObjcopy.cpp
The file was removedllvm/test/tools/llvm-objcopy/ELF/no-build-id.test
The file was modifiedllvm/docs/CommandGuide/llvm-objcopy.rst
The file was modifiedllvm/tools/llvm-objcopy/CopyConfig.cpp
The file was modifiedllvm/tools/llvm-objcopy/ObjcopyOpts.td
Commit 5cf9292ce341d2002f5d6e0189d54e29f9e71afe by Stanislav.Mekhanoshin
[AMDGPU] Add two TSFlags: IsAtomicNoRtn and IsAtomicRtn

We are using AtomicNoRet map in multiple places to determine
if an instruction atomic, rtn or nortn atomic. This method
does not work always since we have some instructions which
only has rtn or nortn version.

One such instruction is ds_wrxchg_rtn_b32 which does not have
nortn version. This has caused changes in memory legalizer
tests.

Differential Revision: https://reviews.llvm.org/D96639
The file was modifiedllvm/lib/Target/AMDGPU/MIMGInstructions.td
The file was modifiedllvm/lib/Target/AMDGPU/FLATInstructions.td
The file was modifiedllvm/test/CodeGen/AMDGPU/memory-legalizer-local-agent.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/memory-legalizer-local-system.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.td
The file was modifiedllvm/lib/Target/AMDGPU/DSInstructions.td
The file was modifiedllvm/lib/Target/AMDGPU/BUFInstructions.td
The file was modifiedllvm/lib/Target/AMDGPU/SIDefines.h
The file was modifiedllvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/memory-legalizer-local-workgroup.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.h
The file was modifiedllvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrFormats.td
Commit 715dc556b782f718ce1815aaf5c58626f5fe839c by benny.kra
[lto] Enable new PM when the PM config is non-empty

This restores the behavior before 964f8103c58d, which broke 2 tests:
  LLVM :: tools/llvm-lto2/X86/pipeline.ll
  lld :: ELF/lto/ltopasses-custom.ll
The file was modifiedllvm/lib/LTO/LTOBackend.cpp
Commit 22a52dfddcefad4f275eb8ad1cc0e200074c2d8a by Duncan P. N. Exon Smith
TransformUtils: Fix metadata handling in CloneModule (and improve CloneFunctionInto)

This commit fixes how metadata is handled in CloneModule to be sound,
and improves how it's handled in CloneFunctionInto (although the latter
is still awkward when called within a module).

Ruiling Song pointed out in PR48841 that CloneModule was changed to
unsoundly use the RF_ReuseAndMutateDistinctMDs flag (renamed in
fa35c1f80f0ea080a7cbc581416929b0a654f25c for clarity). This flag papered
over a crash caused by other various changes made to CloneFunctionInto
over the past few years that made it unsound to use cloning between
different modules.

(This commit partially addresses PR48841, fixing the repro from
preprocessed source but not textual IR. MDNodeMapper::mapDistinctNode
became unsound in df763188c9a1ecb1e7e5c4d4ea53a99fbb755903 and this
commit does not address that regression.)

RF_ReuseAndMutateDistinctMDs is designed for the IRMover to use,
avoiding unnecessary clones of all referenced metadata when linking
between modules (with IRMover, the source module is discarded after
linking). It never makes sense to use when you're not discarding the
source. This commit drops its incorrect use in CloneModule.

Sadly, the right thing to do with metadata when cloning a function is
complicated, and this patch doesn't totally fix it.

The first problem is that there are two different types of referenceable
metadata and it's not obvious what to with one of them when remapping.

- `!0 = !{!1}` is metadata's version of a constant. Programatically it's
  called "uniqued" (probably a better term would be "constant") because,
  like `ConstantArray`, it's stored in uniquing tables. Once it's
  constructed, it's illegal to change its arguments.
- `!0 = distinct !{!1}` is a bit closer to a global variable. It's legal
  to change the operands after construction.

What should be done with distinct metadata when cloning functions within
the same module?

- Should new, cloned nodes be created?
- Should all references point to the same, old nodes?

The answer depends on whether that metadata is effectively owned by a
function.

And that's the second problem. Referenceable metadata's ownership model
is not clear or explicit. Technically, it's all stored on an
LLVMContext. However, any metadata that is `distinct`, that transitively
references a `distinct` node, or that transitively references a
GlobalValue is specific to a Module and is effectively owned by it. More
specifically, some metadata is effectively owned by a specific Function
within a module.

Effectively function-local metadata was introduced somewhere around
c10d0e5ccd12f049bddb24dcf8bbb7fbbc6c68f2, which made it illegal for two
functions to share a DISubprogram attachment.

When cloning a function within a module, you need to clone the
function-local debug info and suppress cloning of global debug info (the
status quo suppresses cloning some global debug info but not all). When
cloning a function to a new/different module, you need to clone all of
the debug info.

Here's what I think we should do (eventually? soon? not this patch
though):
- Distinguish explicitly (somehow) between pure constant metadata owned
  by the LLVMContext, global metadata owned by the Module, and local
  metadata owned by a GlobalValue (such as a function).
- Update CloneFunctionInto to trigger cloning of all "local" metadata
  (only), perhaps by adding a bit to RemapFlag. Alternatively, split
  out a separate function CloneFunctionMetadataInto to prime the
  metadata map that callers are updated to call ahead of time as
  appropriate.

Here's the somewhat more isolated fix in this patch:
- Converted the `ModuleLevelChanges` parameter to `CloneFunctionInto` to
  an enum called `CloneFunctionChangeType` that is one of
  LocalChangesOnly, GlobalChanges, DifferentModule, and ClonedModule.
- The code maintaining the "functions uniquely own subprograms"
  invariant is now only active in the first two cases, where a function
  is being cloned within a single module. That's necessary because this
  code inhibits cloning of (some) "global" metadata that's effectively
  owned by the module.
- The code maintaining the "all compile units must be explicitly
  referenced by !llvm.dbg.cu" invariant is now only active in the
  DifferentModule case, where a function is being cloned into a new
  module in isolation.
- CoroSplit.cpp's call to CloneFunctionInto in CoroCloner::create
  uses LocalChangeOnly, since fa635d730f74f3285b77cc1537f1692184b8bf5b
  only set `ModuleLevelChanges` to trigger cloning of local metadata.
- CloneModule drops its unsound use of RF_ReuseAndMutateDistinctMDs
  and special handling of !llvm.dbg.cu.
- Fixed some outdated header docs and left a couple of FIXMEs.

Differential Revision: https://reviews.llvm.org/D96531
The file was modifiedllvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
The file was modifiedllvm/lib/Transforms/Coroutines/CoroSplit.cpp
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
The file was modifiedllvm/unittests/Transforms/Utils/CloningTest.cpp
The file was modifiedllvm/lib/Transforms/Utils/CloneFunction.cpp
The file was modifiedllvm/include/llvm/Transforms/Utils/Cloning.h
The file was modifiedllvm/lib/Target/AMDGPU/R600OpenCLImageTypeLoweringPass.cpp
The file was modifiedllvm/lib/Transforms/Utils/CloneModule.cpp
Commit 4d700fb0603e6fbdd6f597443b29414f7e133912 by sam.mccall
[clangd] Pass raw client capabilities to modules. NFC
The file was modifiedclang-tools-extra/clangd/Protocol.cpp
The file was modifiedclang-tools-extra/clangd/unittests/ClangdLSPServerTests.cpp
The file was modifiedclang-tools-extra/clangd/Module.h
The file was modifiedclang-tools-extra/clangd/Protocol.h
The file was modifiedclang-tools-extra/clangd/ClangdLSPServer.cpp
Commit 328261019f50a76b11fa625739cbf32ceb2ce2f7 by dimitry
Define new/delete in libc++ when using libcxxrt

Always turn on LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS, if libcxxrt is used
as the C++ ABI library, since libcxxrt does not provide the full set
ofnew and delete operators. In particular, the aligned versions of these
operators are completely missing. This primarily addresses builds on
FreeBSD, as this platform uses libcxxrt by default.

Also, attempt to provide a FreeBSD.cmake cache file, with hopefully sane
settings, partially copied from the Apple.cmake cache file. This needs
more work, probably some additions to ci build scripts (although I am
not aware of any 'official' FreeBSD build bots).

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D96720
The file was modifiedlibcxx/cmake/Modules/HandleLibCXXABI.cmake
The file was addedlibcxx/cmake/caches/FreeBSD.cmake
Commit 378941f611ab46b985721874081df88bdf3b7cb1 by spatel
[ValueTracking] add scan limit for assumes

In the motivating example from https://llvm.org/PR49171 and
reduced test here, we would unroll and clone assumes so much
that compile-time effectively became infinite while analyzing
all of those assumes.
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
The file was addedllvm/test/Transforms/LoopUnroll/assume-timeout.ll
Commit 5d0d465ad4d25398519b85879d61fc126abd641c by Louis Dionne
[libc++] Mark __cpp_lib_constexpr_memory as being implemented
The file was modifiedlibcxx/include/version
The file was modifiedlibcxx/utils/generate_feature_test_macro_components.py
The file was modifiedlibcxx/test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp
The file was modifiedlibcxx/docs/FeatureTestMacroTable.rst
The file was modifiedlibcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp
Commit c2123a82cd0076c548d2b8c2acc14408681d7f89 by omair.javaid
[LLDB] Skip TestMultipleTargets.py on Arm/AArch64 Linux

TestMultipleTargets.py fails randomly on Arm/AArch64 Linux buildbot with
no reasonable clues. I am marking it skipped for avoiding LLDB buildbot
failures due to this test.
The file was modifiedlldb/test/API/api/multiple-targets/TestMultipleTargets.py
Commit eb75f250feb6822d57be95e8535e28724cde6e9d by craig.topper
[RISCV][LegalizeTypes] Try to expand BITREVERSE before promoting if the promoted BITREVERSE would expand anyway.

If we're going to end up expanding anyway, we should do it early
so we don't create extra operations to handle the bytes added by
promotion.

Simlilar was done for BSWAP previously.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D96681
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h
The file was modifiedllvm/test/CodeGen/RISCV/rv32Zbp.ll
The file was modifiedllvm/test/CodeGen/RISCV/rv64Zbp.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Commit 7ba2e1c6011eeb1b91ce3f5d8fa7187b7518e77a by craig.topper
[RISCV] Add support for fixed vector floating point setcc.

This is annoying because the condition code legalization belongs
to LegalizeDAG, but our custom handler runs in Legalize vector ops
which occurs earlier.

This adds some of the mask binary operations so that we can combine
multiple compares that we need for expansion.

I've also fixed up RISCVISelDAGToDAG.cpp to handle copies of masks.

This patch contains a subset of the integer setcc patch as well.
That patch is dependent on the integer binary ops patch. I'll rebase
based on what order the patches go in.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D96567
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
The file was addedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-setcc.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
Commit 5f58374bbef356a4fd1565426257a4a24478a880 by arthur.j.odwyer
[libc++] Change `std::numeric_limits` to just `numeric_limits` in <chrono>.

The namespace is unnecessary, and libc++ style is not to include it on type names.
(As opposed to function names, where qualification affects ADL; and in certain
function signatures where `std::` and `_VSTD::` might be mangled differently.
This is none of those situations.)
The file was modifiedlibcxx/include/chrono
Commit 02d053ed2d2ef626c3fc747f5224fad605b46060 by nicolas.vasilache
[mlir][Vector] Add a canonicalization pattern for vector.contract + add

Differential Revision: https://reviews.llvm.org/D96701
The file was modifiedmlir/lib/Dialect/Vector/VectorOps.cpp
The file was modifiedmlir/test/Dialect/Vector/canonicalize.mlir
The file was modifiedmlir/include/mlir/Dialect/Vector/VectorOps.td