SuccessChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. [OpenCL] Add support of __opencl_c_3d_image_writes feature macro (details)
  2. [Clang][AArch64] Inline assembly support for the ACLE type 'data512_t' (details)
  3. [AArch64] Add a Machine Value Type for 8 consecutive registers (details)
  4. [AArch64] Legalize MVT::i64x8 in DAG isel lowering (details)
  5. [libc++] Improve LIBCXX_ENABLE_INCOMPLETE_FEATURES. (details)
  6. [OpenCL] Add support of __opencl_c_pipes feature macro. (details)
  7. [clang-repl] Fix building with win32 dylibs (details)
  8. [LLD][MinGW] Accept joined format for --stack (details)
  9. Import workflows from release/12.x branch (details)
  10. [RISCV] Restrict performANY_EXTENDCombine to prevent an infinite loop. (details)
Commit 6efead14f49f62e526d01bdfbeab2a7da847af4e by anton.zabaznov
[OpenCL] Add support of __opencl_c_3d_image_writes feature macro

This feature requires support of __opencl_c_images, so diagnostics for that is provided as well.
Also, ensure that cl_khr_3d_image_writes feature macro is set to the same value.

Reviewed By: Anastasia

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

(cherry picked from commit f16a4fcbe510d17b3f361d446eaf223208ded2bd)
The file was modifiedclang/lib/Sema/SemaType.cpp
The file was modifiedclang/test/Misc/opencl-c-3.0.incorrect_options.cl
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/Basic/Targets/AMDGPU.h
The file was modifiedclang/lib/Basic/OpenCLOptions.cpp
The file was modifiedclang/test/SemaOpenCL/unsupported-image.cl
Commit 1085fe3e0509aabbf8cea2c39b14ec092f4ca72f by alexandros.lamprineas
[Clang][AArch64] Inline assembly support for the ACLE type 'data512_t'

In LLVM IR terms the ACLE type 'data512_t' is essentially an aggregate
type { [8 x i64] }. When emitting code for inline assembly operands,
clang tries to scalarize aggregate types to an integer of the equivalent
length, otherwise it passes them by-reference. This patch adds a target
hook to tell whether a given inline assembly operand is scalarizable
so that clang can emit code to pass/return it by-value.

Differential Revision: https://reviews.llvm.org/D94098
The file was modifiedclang/lib/CodeGen/CGStmt.cpp
The file was modifiedclang/lib/Basic/Targets/AArch64.cpp
The file was modifiedclang/lib/CodeGen/TargetInfo.h
The file was modifiedclang/lib/CodeGen/TargetInfo.cpp
The file was addedclang/test/CodeGen/aarch64-ls64-inline-asm.c
Commit 91da2da618b553831884261db3ce1ed55ab0beb0 by alexandros.lamprineas
[AArch64] Add a Machine Value Type for 8 consecutive registers

Adds MVT::i64x8, a Machine Value Type needed for lowering inline assembly
operands which materialize a sequence of eight general purpose registers.

Differential Revision: https://reviews.llvm.org/D94096
The file was modifiedllvm/lib/CodeGen/ValueTypes.cpp
The file was modifiedllvm/utils/TableGen/CodeGenTarget.cpp
The file was modifiedllvm/include/llvm/Support/MachineValueType.h
The file was modifiedllvm/include/llvm/CodeGen/ValueTypes.td
Commit 7563727d70f44c41cd8a53ba91581b67f6c8e19a by alexandros.lamprineas
[AArch64] Legalize MVT::i64x8 in DAG isel lowering

This patch legalizes the Machine Value Type introduced in D94096 for loads
and stores. A new target hook named getAsmOperandValueType() is added which
maps i512 to MVT::i64x8. GlobalISel falls back to DAG for legalization.

Differential Revision: https://reviews.llvm.org/D94097
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.td
The file was modifiedllvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h
The file was modifiedllvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.h
The file was modifiedllvm/lib/Target/AArch64/AArch64RegisterInfo.td
The file was addedllvm/test/CodeGen/AArch64/ls64-inline-asm.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was modifiedllvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
Commit 4740e92e29da0916291f0eed2edc75c4b89df5f5 by koraq
[libc++] Improve LIBCXX_ENABLE_INCOMPLETE_FEATURES.

@tcanens pointed out the current behavior of the macro breaks the usage
pattern described in http://wg21.link/SD6
```
```

To support this usage pattern the hard errror is removed. Instead the
header includes nothing but the `<version>` header.

Reviewed By: ldionne, #libc

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

(cherry picked from commit d618a1cc5c3919d29ee27fa48de80bed4dcb3566)
The file was modifiedlibcxx/include/format
The file was modifiedlibcxx/include/ranges
Commit 568767b3b632bcb65690d8f7476ac6f333fbb38b by anton.zabaznov
[OpenCL] Add support of __opencl_c_pipes feature macro.

'pipe' keyword is introduced in OpenCL C 2.0: so do checks for OpenCL C version while
parsing and then later on check for language options to construct actual pipe. This feature
requires support of __opencl_c_generic_address_space, so diagnostics for that is provided as well.

This is the same patch as in D106748 but with a tiny fix in checking of diagnostic messages.
Also added tests when program scope global variables are not supported.

This is squashed cherry pick of D107154 and D107176
The file was modifiedclang/lib/Sema/Sema.cpp
The file was modifiedclang/test/CodeGenOpenCL/address-spaces.cl
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/lib/Basic/TargetInfo.cpp
The file was modifiedclang/test/Misc/opencl-c-3.0.incorrect_options.cl
The file was modifiedclang/test/CodeGenOpenCL/address-spaces-mangling.cl
The file was modifiedclang/include/clang/Basic/LangOptions.def
The file was modifiedclang/test/SemaOpenCL/invalid-pipes-cl2.0.cl
The file was modifiedclang/lib/Parse/ParseDecl.cpp
The file was modifiedclang/test/CodeGenOpenCL/pipe_types.cl
The file was modifiedclang/test/CodeGenOpenCL/pipe_types_mangling.cl
The file was modifiedclang/test/SemaOpenCL/storageclass.cl
The file was modifiedclang/lib/Basic/OpenCLOptions.cpp
The file was modifiedclang/test/SemaOpenCL/invalid-pipes-cl1.2.cl
Commit 332ac2f8794610c3afdb11099a32ec36382cb500 by martin
[clang-repl] Fix building with win32 dylibs

Use `clang_target_link_libraries` to avoid duplicate libraries when
the same symbol is provided both by a static library and a larger
dylib, fixing linking with win32 dylibs. This fixes errors like
these:

    ld.lld: error: duplicate symbol: llvm::createStringError(std::__1::error_code, char const*)
    >>> defined at libLLVMSupport.a(Error.cpp.obj)
    >>> defined at libLLVM-14git.dll

This matches how other clang tools declare their dependencies.

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

(cherry picked from commit 25a288b009f7d30b5392ea36c29570cbdcf238c3)
The file was modifiedclang/tools/clang-repl/CMakeLists.txt
Commit a6c39006e59ce92469b3a9369ebafd7c07ef54a0 by martin
[LLD][MinGW] Accept joined format for --stack

Postgresql uses `--stack=` in its Makefile.

Downstream issue: https://github.com/msys2/MINGW-packages/pull/9167

Reviewed By: mstorsjo

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

(cherry picked from commit 05b025edf4aecf19634e01b0974126e53a927a50)
The file was modifiedlld/MinGW/Options.td
The file was modifiedlld/test/MinGW/driver.test
Commit ddd8ca695da617842fa20a7b5196245f8465bcd8 by tstellar
Import workflows from release/12.x branch

(cherry picked from commit 7546a34044ae28b62bd43e6dc0952622e1b6e77f)
The file was added.github/workflows/libclang-abi-tests.yml
The file was added.github/workflows/libclc-tests.yml
The file was added.github/workflows/clang-tests.yml
The file was added.github/workflows/lld-tests.yml
The file was added.github/workflows/lldb-tests.yml
The file was added.github/workflows/llvm-tests.yml
Commit 9ac5717f9de68c411de08f359a9ae0ea97d75174 by tstellar
[RISCV] Restrict performANY_EXTENDCombine to prevent an infinite loop.

The sign_extend we insert here can get turned into a zero_extend if
the sign bit is known zero. This can enable a setcc combine that
shrinks compares with zero_extend. This reduces the use count of
the zero_extend allowing other combines to turn it back into an
any_extend.

This restricts the combine to only cases where the result is used
by a CopyToReg. This works for my original motivating case. I
hope the CopyToReg use will prevent any converted extends from
turning back into an any_extend.

Reviewed By: luismarques

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

(cherry picked from commit 54588bcc052e5b08f90e672c33d0c1ad4eda2424)
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was addedllvm/test/CodeGen/RISCV/pr51206.ll