Changes

Summary

  1. [SVE] Eliminate calls to default-false VectorType::get() from X86 (details)
  2. [diagtool] Install diagtool when LLVM_INSTALL_TOOLCHAIN_ONLY is ON. (details)
  3. [libc++] Fix issues with the triviality of std::array (details)
  4. [mlir][spirv] Clean up coop matrix assembly declaration. (details)
  5. [flang][NFC] Remove link-time dependency of Evaluate on Semantics (details)
  6. [gn build] (manually) port 0e265e31578 (details)
  7. [AMDGPU] Add loaded code object path URI definition to AMDGPUUsage (details)
  8. [gn build] Port 34cfed24ebd (details)
  9. [gn build] Port cf6cc662eee (details)
  10. [SVE] Eliminate calls to default-false VectorType::get() from Linker (details)
  11. [jitlink] R_X86_64_PC32 support for the elf x86 jitlinker (details)
  12. [SVE] Eliminate calls to default-false VectorType::get() from AMDGPU (details)
  13. AMDGPU: Move MIMG MMO check to verifier (details)
  14. AMDGPU: Add new baseline tests for setreg handling (details)
  15. AMDGPU: Optimize s_setreg_b32 to s_denorm_mode/s_round_mode (details)
  16. [AMDGPU] Remove assertion on S1024 SGPR to VGPR spill (details)
  17. [ValueLattice] Fix uninitialized-value after D79036 (details)
  18. Fix full unrolling with new pass manager. (details)
  19. NFC: Simplify O1 pass pipeline construction. (details)
  20. Use .empty() instead of .size() == 0 (NFC) (details)
  21. [lldb/Bindings] Raise exception when using properties that rely on lldb.target (details)
  22. [DWARF5] Added support for emission of .debug_macro.dwo section (details)
  23. [lldb/Test] use GetLoadAddress from scripted thread plan (details)
  24. [AArch64] Treat x18 as callee-saved in functions with windows calling convention on non-windows OSes (details)
  25. [test] Regenerate checks in aarch64_win64cc_vararg.ll with update_llc_test_checks.py. NFC. (details)
  26. [X86] Autogenerate complete checks. NFC (details)
  27. [lldb/CMake] Fix typo that prevented regenerating the bindings (details)
Commit 5a99ec10f5df7fa351e81b9bc90bf38e670653ae by ctetreau
[SVE] Eliminate calls to default-false VectorType::get() from X86

Reviewers: efriedma, sdesmalen, c-rhodes, craig.topper

Reviewed By: craig.topper

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80331
The file was modifiedllvm/lib/Target/X86/X86PartialReduction.cpp
The file was modifiedllvm/lib/Target/X86/X86InterleavedAccess.cpp
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/lib/Target/X86/X86InstrInfo.cpp
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.cpp
Commit 03559c684a9bfe4de142fa4a7d2ef1edf08a8ad3 by vsapsai
[diagtool] Install diagtool when LLVM_INSTALL_TOOLCHAIN_ONLY is ON.

Not sure about other platforms but `install-xcode-toolchain` was already
including diagtool in the toolchain. This change makes it possible to
install diagtool during Apple's 2-stage build.

Instead of dropping `if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)` conditional
I've switched to `add_clang_tool` which handles install targets. Also a
few other clang tools like clang-format, clang-scan-deps are using this
macro, so it is good to be consistent.

rdar://problem/15386909

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D80770
The file was modifiedclang/tools/diagtool/CMakeLists.txt
Commit 7265ff928a974a844b6301c139cbb0f957532da9 by maskray
[libc++] Fix issues with the triviality of std::array

The Standard is currently unimplementable. We have to pick between:

1. Not implementing constexpr support properly in std::array<T, 0>
2. Making std::array<T, 0> non-trivial even when T is trivial
3. Returning nullptr from std::array<T, 0>::begin()

Libc++ initially picked (1). In 77b9abfc8e89, we started implementing constexpr properly, but lost the guarantee of triviality. Since it seems like both (1) and (2) are really important, it seems like (3) is the only viable option for libc++, after all. This is also what other implementations are doing.

This patch moves libc++ from (1) to (3).

It also:
- Improves the test coverage for the various ways of initializing std::array
- Adds tests for the triviality of std::array
- Adds tests for the aggregate-ness of std::array

Reviewed By: #libc, miscco, EricWF, zoecarver

Differential Revision: https://reviews.llvm.org/D80821
The file was modifiedlibcxx/include/array
The file was modifiedlibcxx/test/std/containers/sequences/array/aggregate.pass.cpp
The file was addedlibcxx/test/std/containers/sequences/array/array.cons/initialization.pass.cpp
The file was addedlibcxx/test/libcxx/containers/sequences/array/triviality.pass.cpp
The file was removedlibcxx/test/std/containers/sequences/array/array.cons/initializer_list.pass.cpp
The file was removedlibcxx/test/std/containers/sequences/array/array.cons/default.pass.cpp
The file was modifiedlibcxx/test/std/containers/sequences/array/iterators.pass.cpp
The file was modifiedlibcxx/test/std/containers/sequences/array/array.data/data.pass.cpp
The file was modifiedlibcxx/test/std/containers/sequences/array/array.data/data_const.pass.cpp
The file was modifiedlibcxx/test/std/containers/sequences/array/array.cons/implicit_copy.pass.cpp
Commit c652c306a6aa3b356cebae78caf4b33b63afb866 by thomasraoux
[mlir][spirv] Clean up coop matrix assembly declaration.

Address code review feedback and use declarative assembly format.

Differential Revision: https://reviews.llvm.org/D80687
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/cooperative-matrix.mlir
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/test/Dialect/SPIRV/cooperative-matrix.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVCooperativeMatrixOps.td
Commit 14f49599ccafc7e318fac609387c4dd68430925f by tkeith
[flang][NFC] Remove link-time dependency of Evaluate on Semantics

Summary:
Some Symbol-related functions used in Evaluate were moved to
Evaluate/tools.h. This includes changing some member functions that were
replaced by non-member functions `IsDummy`, `GetUsedModule`, and
`CountLenParameters`.

Some member functions were made inline in `Scope`, `Symbol`,
`ArraySpec`, and `DeclTypeSpec`. The definitions were preceded by a
comment explaining why they are inline.

`IsConstantShape` was expanded inline in `IsDescriptor` because it isn't
used anywhere else

After this change, at least when compiling with clang on macos,
`libFortranEvaluate.a` has no undefined symbols that are satisfied by
`libFortranSemantics.a`.

Reviewers: klausler, PeteSteinfeld, sscalpone, jdoerfert, DavidTruby

Reviewed By: PeteSteinfeld

Subscribers: llvm-commits

Tags: #flang, #llvm

Differential Revision: https://reviews.llvm.org/D80762
The file was modifiedflang/lib/Semantics/check-declarations.cpp
The file was modifiedflang/lib/Semantics/resolve-names-utils.cpp
The file was modifiedflang/lib/Evaluate/tools.cpp
The file was modifiedflang/lib/Evaluate/type.cpp
The file was modifiedflang/lib/Evaluate/check-expression.cpp
The file was modifiedflang/lib/Semantics/symbol.cpp
The file was modifiedflang/lib/Semantics/resolve-names.cpp
The file was modifiedflang/include/flang/Evaluate/tools.h
The file was modifiedflang/include/flang/Semantics/tools.h
The file was modifiedflang/lib/Semantics/type.cpp
The file was modifiedflang/include/flang/Semantics/scope.h
The file was modifiedflang/lib/Semantics/compute-offsets.cpp
The file was modifiedflang/lib/Semantics/tools.cpp
The file was modifiedflang/lib/Semantics/mod-file.cpp
The file was modifiedflang/include/flang/Semantics/type.h
The file was modifiedflang/include/flang/Semantics/symbol.h
The file was modifiedflang/lib/Semantics/scope.cpp
Commit 7d77b0545dd850f59209c47ea03cde048673b8dd by thakis
[gn build] (manually) port 0e265e31578
The file was addedllvm/utils/gn/secondary/clang/lib/Testing/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/clang/unittests/AST/BUILD.gn
Commit 7318e2400009ca07f059a047674b010a0c77081f by Tony.Tye
[AMDGPU] Add loaded code object path URI definition to AMDGPUUsage

Differential Revision: https://reviews.llvm.org/D80407
The file was modifiedllvm/docs/AMDGPUUsage.rst
Commit 26c070c8db165f8692751881fa3aa6793302717a by llvmgnsyncbot
[gn build] Port 34cfed24ebd
The file was modifiedllvm/utils/gn/secondary/llvm/unittests/MC/BUILD.gn
Commit 02f6f1ebb1f16e7e324df5201ce7003a4d9f2570 by llvmgnsyncbot
[gn build] Port cf6cc662eee
The file was modifiedllvm/utils/gn/secondary/clang/lib/Sema/BUILD.gn
Commit 77b1ed4b4a492d5236f936f14caedd44b275e472 by ctetreau
[SVE] Eliminate calls to default-false VectorType::get() from Linker

Reviewers: efriedma, tejohnson, sdesmalen, c-rhodes

Reviewed By: efriedma

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80326
The file was modifiedllvm/lib/Linker/IRMover.cpp
Commit 3f0841f6d0a0eb86a1c36cc0c76931ae9d7bc77a by jared.wyles
[jitlink] R_X86_64_PC32 support for the elf x86 jitlinker

Summary:

Adding in our first relocation type, and all the required plumbing to support the rest in following patches

Differential Revision: https://reviews.llvm.org/D80613

Reviewer: lhames
The file was modifiedllvm/include/llvm/ExecutionEngine/JITLink/ELF_x86_64.h
The file was modifiedllvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_relocations.s
The file was modifiedllvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
Commit aad936548247107b1afd92ea9229b396564063b9 by ctetreau
[SVE] Eliminate calls to default-false VectorType::get() from AMDGPU

Reviewers: efriedma, david-arm, fpetrogalli, arsenm

Reviewed By: david-arm

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, tschuett, hiraditya, rkruppe, psnobl, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80328
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
Commit f012c58abdb086ea093d48e7a705f98f9e9561c6 by Matthew.Arsenault
AMDGPU: Move MIMG MMO check to verifier
The file was modifiedllvm/test/CodeGen/AMDGPU/waitcnt-preexisting.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/coalescer-subreg-join.mir
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/merge-image-sample.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/nsa-vmem-hazard.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/postra-bundle-memops.mir
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/waitcnt-vmem-waw.mir
The file was modifiedllvm/lib/Target/AMDGPU/MIMGInstructions.td
The file was modifiedllvm/test/CodeGen/AMDGPU/memory_clause.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/merge-image-load.mir
Commit 4f300d499631504acdd32219254e939697202285 by Matthew.Arsenault
AMDGPU: Add new baseline tests for setreg handling

Most of these should be identical and use a common prefix, but
update_llc_test_checks is failing to generate shared checks for some
reason.
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.s.setreg.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.s.setreg.ll
Commit 0892a96a05a8943457a4a3e2547923087aa06226 by Matthew.Arsenault
AMDGPU: Optimize s_setreg_b32 to s_denorm_mode/s_round_mode

This is a custom inserter because it was less work than teaching
tablegen a way to indicate that it is sometimes OK to have a no side
effect instruction in the output of a side effecting pattern.

The asm is needed to look like a read of the mode register to prevent
it from being deleted. However, there seems to be a bug where the mode
register def instructions are moved across the asm sideeffect by the
post-RA scheduler.

Another oddity is the immediate is formatted differently between
s_denorm_mode and s_round_mode.
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.s.setreg.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIDefines.h
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.s.setreg.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SOPInstructions.td
Commit d04147789ff0b838f9dd6c592207d5f70bc0d025 by carl.ritson
[AMDGPU] Remove assertion on S1024 SGPR to VGPR spill

Summary:
Replace an assertion that blocks S1024 SGPR to VGPR spill.
The assertion pre-dates S1024 and is not wave size dependent.

Reviewers: arsenm, sameerds, rampitec

Reviewed By: arsenm

Subscribers: qcolombet, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80783
The file was modifiedllvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/spill-wide-sgpr.ll
Commit 034a7b6604067b0ccb36c761a5782456b76c447e by maskray
[ValueLattice] Fix uninitialized-value after D79036

Many check-clang-codegen tests failed.
The file was modifiedllvm/include/llvm/Analysis/ValueLattice.h
Commit c554c5e159aee43c5cd8236e077817e9f29dea78 by echristo
Fix full unrolling with new pass manager.

Last we looked at this and couldn't come up with a reason to change
it, but with a pragma for full loop unrolling we bypass every other
loop unroll and then fail to fully unroll a loop when the pragma is set.

Move the OnlyWhenForced out of the check and into the initialization
of the full unroll pass in the new pass manager. This doesn't show up
with the old pass manager.

Add a new option to opt so that we can turn off loop unrolling
manually since this is a difference between clang and opt.

Tested with check-clang and check-llvm.
The file was modifiedclang/test/Misc/loop-opt-setup.c
The file was modifiedllvm/tools/opt/NewPMDriver.cpp
The file was addedllvm/test/Transforms/LoopUnroll/FullUnroll.ll
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
Commit c2bb26d8613338b93a1aab54631d01e6a690bc29 by echristo
NFC: Simplify O1 pass pipeline construction.

Pull O1 pass pipeline out into a separate function and simplify
buildFunctionSimplificationPipeline accordingly.
The file was modifiedllvm/include/llvm/Passes/PassBuilder.h
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
Commit 21fee0921d563f407e07b5e28592c2925da3704d by joker.eph
Use .empty() instead of .size() == 0 (NFC)

Cleanup / Fix a clang-tidy warning
The file was modifiedmlir/lib/Transforms/BufferPlacement.cpp
Commit 0800529fe605a03e9da1aca241a377eebcaa8cad by Jonas Devlieghere
[lldb/Bindings] Raise exception when using properties that rely on lldb.target

Several SBAddress properties use the lldb.target or lldb.process
convenience variables which are only set under the interactive script
interpreter. Unfortunately, users have been using these properties in
Python script and commands. This patch raises a Python exception to
force users to use GetLoadAddress instead.

Differential revision: https://reviews.llvm.org/D80848
The file was modifiedlldb/bindings/interface/SBAddress.i
The file was addedlldb/test/Shell/ScriptInterpreter/Python/Inputs/sbaddress.py
The file was addedlldb/test/Shell/ScriptInterpreter/Python/sb_address_exception.test
Commit 20c9bb44ec1a4a795215ff6964d264219f9b05f2 by SourabhSingh.Tomar
[DWARF5] Added support for emission of .debug_macro.dwo section

This patch adds support for emission of following DWARFv5 macro
forms in .debug_macro.dwo section:

- DW_MACRO_start_file
- DW_MACRO_end_file
- DW_MACRO_define_strx
- DW_MACRO_undef_strx

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D78866
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was addedllvm/test/DebugInfo/X86/debug-macro-dwo.ll
The file was modifiedllvm/include/llvm/MC/MCObjectFileInfo.h
The file was modifiedllvm/lib/MC/MCObjectFileInfo.cpp
Commit 2388a096e7865c043e83ece4e26654bd3d1a20d5 by Jonas Devlieghere
[lldb/Test] use GetLoadAddress from scripted thread plan

Commit 0800529fe605 adds a runtime error which triggers when using
SBAddress properties that use the current process/target from a
non-interactive session. TestThreadPlanCommands.py was doing exactly
this and this patch fixes that by use GetLoadAddress instead.
The file was modifiedlldb/test/API/functionalities/thread_plan/wrap_step_over.py
Commit cf97e0ec42b800ade5a18401a35ada96f355693f by martin
[AArch64] Treat x18 as callee-saved in functions with windows calling convention on non-windows OSes

Treat it as callee-saved, and always back it up. When windows code calls
entry points in unix code, marked with the windows calling convention,
that unix code can call other functions that isn't compiled with
-ffixed-x18 which may clobber x18 freely. By backing it up and restoring
it on return, we preserve the register across the function call,
fulfilling this part of the windows calling convention on another OS.

This isn't enough for making sure that x18 is preseved when non-windows
code does a callback to windows code, but is a clear improvement over
the current status quo. Additionally, wine is nowadays building many
modules as PE DLLs, which avoids the callback issue altogether for those
DLLs.

Differential Revision: https://reviews.llvm.org/D61892
The file was modifiedllvm/lib/Target/AArch64/AArch64CallingConvention.td
The file was addedllvm/test/CodeGen/AArch64/win64cc-backup-x18.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
The file was modifiedllvm/test/CodeGen/AArch64/aarch64_win64cc_vararg.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64FrameLowering.cpp
Commit 51089db6d7554cefc6c57e6f10a7f876e2dd629e by martin
[test] Regenerate checks in aarch64_win64cc_vararg.ll with update_llc_test_checks.py. NFC.
The file was modifiedllvm/test/CodeGen/AArch64/aarch64_win64cc_vararg.ll
Commit c65c1d78931e262b5117278a8ee0a703d1be073c by craig.topper
[X86] Autogenerate complete checks. NFC
The file was modifiedllvm/test/CodeGen/X86/i1narrowfail.ll
The file was modifiedllvm/test/CodeGen/X86/narrow_op-1.ll
Commit 92063228f85bfe22a6dfe20bf01c99ffe6ff3130 by Jonas Devlieghere
[lldb/CMake] Fix typo that prevented regenerating the bindings

A typo in the GLOB patter prevented us from detecting changes in the
interface files and trigger SWIG to regenerate the bindings.
The file was modifiedlldb/bindings/CMakeLists.txt