SuccessChanges

Summary

  1. [NFC][MSAN] Extract llvm.abs handling into a function (details)
  2. [libc++] Fix the build with GCC < 10 (details)
  3. [HIP] Align device binary (details)
  4. Don't reject calls to MinGW's unusual _setjmp declaration. (details)
  5. [test][Coro][NewPM] Fix coro-elide.ll under NPM (details)
  6. [MetaRenamer][NewPM] Port metarenamer to NPM (details)
  7. Fix the test case from D88686 (details)
  8. [CUDA][HIP] Fix bound arch for offload action for fat binary (details)
  9. [fuzzer] Remove unused variable (details)
  10. Diagnose invalid target ID for AMDGPU toolchain for assembler (details)
  11. Revert "[Driver] Move detectLibcxxIncludePath to ToolChain" (details)
  12. [gn build] Port ace644030e6 (details)
  13. [CMake] Don't use CMakePushCheckState (details)
  14. [Sparc] Remove cast that truncates immediate operands to 32 bits. (details)
Commit aff896dea13fed04d79bbd1ce20d5e49fec720bc by Vitaly Buka
[NFC][MSAN] Extract llvm.abs handling into a function

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D88519
The file was modifiedllvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
Commit 04fce1515b7ae2fcf7986d8578c18cfd559c68b2 by Louis Dionne
[libc++] Fix the build with GCC < 10

For now, we still need to support older GCCs, so work around the lack of
__is_constructible on older GCCs.
The file was modifiedlibcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
The file was modifiedlibcxx/include/type_traits
Commit dc6a0b0ec7e3d72a4cc849af4e4aa6c6a29a53d2 by Yaxun.Liu
[HIP] Align device binary

To facilitate faster loading of device binaries and share them among processes,
HIP runtime favors their alignment being 4096 bytes. HIP runtime can load
unaligned device binaries, however, aligning them at 4096 bytes results in
faster loading and less shared memory usage.

This patch adds an option -bundle-align to clang-offload-bundler which allows
bundles to be aligned at specified alignment. By default it is 1, which is NFC
compared to existing format.

This patch then aligns embedded fat binary and device binary inside fat binary
at 4096 bytes.

It has been verified this change does not cause significant overall file size increase
for typical HIP applications (less than 1%).

Differential Revision: https://reviews.llvm.org/D88734
The file was modifiedclang/lib/Driver/ToolChains/HIP.cpp
The file was modifiedclang/test/Driver/hip-toolchain-no-rdc.hip
The file was modifiedclang/test/Driver/hip-toolchain-rdc.hip
The file was modifiedclang/tools/clang-offload-bundler/ClangOffloadBundler.cpp
The file was modifiedclang/test/CodeGenCUDA/device-stub.cu
The file was modifiedclang/lib/CodeGen/CGCUDANV.cpp
The file was modifiedclang/test/Driver/clang-offload-bundler.c
Commit 8fb2a235b0f22dedba72b8b559ba33171a8dcd09 by richard
Don't reject calls to MinGW's unusual _setjmp declaration.

We now recognize this function as a builtin despite it having an
unexpected number of parameters; make sure we don't enforce that it has
only 1 argument for its 2 parameters.
The file was modifiedclang/lib/Sema/SemaChecking.cpp
The file was modifiedclang/test/Sema/builtin-setjmp.c
The file was modifiedclang/include/clang/Basic/Builtins.def
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
Commit b113fa451061244e68af13328df9df46619bd0c3 by aeubanks
[test][Coro][NewPM] Fix coro-elide.ll under NPM
The file was modifiedllvm/test/Transforms/Coroutines/coro-elide.ll
Commit 321986fe68298ded3259bd1ffefe8cbdd60dbf18 by aeubanks
[MetaRenamer][NewPM] Port metarenamer to NPM

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D88690
The file was modifiedllvm/test/Transforms/MetaRenamer/main.ll
The file was modifiedllvm/lib/Transforms/Utils/MetaRenamer.cpp
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/test/Transforms/MetaRenamer/metarenamer.ll
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was addedllvm/include/llvm/Transforms/Utils/MetaRenamer.h
Commit 3847986fd2c838026b9d883bb61f2e419988c1a5 by jianzhouzh
Fix the test case from D88686

It seems that one buildnot RSS value is much higher after munmap than
local run.
The file was modifiedcompiler-rt/test/dfsan/munmap_release_shadow.c
Commit cbd420c5ed8568774ace3ad8385b2346288e152c by Yaxun.Liu
[CUDA][HIP] Fix bound arch for offload action for fat binary

Currently CUDA/HIP toolchain uses "unknown" as bound arch
for offload action for fat binary. This causes -mcpu or -march
with "unknown" added in HIPToolChain::TranslateArgs or
CUDAToolChain::TranslateArgs.

This causes issue for https://reviews.llvm.org/D88377 since
HIP toolchain needs to check -mcpu in HIPToolChain::TranslateArgs.

The bound arch of offload action for fat binary is not really
used, therefore set it to CudaArch::UNUSED.

Differential Revision: https://reviews.llvm.org/D88524
The file was modifiedclang/lib/Basic/Targets/NVPTX.cpp
The file was addedclang/test/Driver/hip-toolchain-device-only.hip
The file was modifiedclang/lib/Driver/Driver.cpp
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
The file was modifiedclang/test/Driver/hip-phases.hip
The file was modifiedclang/include/clang/Basic/Cuda.h
The file was modifiedclang/lib/Basic/Cuda.cpp
Commit c56bb45e839940fffabcbf928a3778cfffc31ddd by julian.lettner
[fuzzer] Remove unused variable

`TempAutoDictionary` is never used.  Maybe a leftover of a previous
experiment?

Differential Revision: https://reviews.llvm.org/D88763
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerMutate.h
Commit 2cd75f738ec6b150719a9468372d77b7064ff340 by Yaxun.Liu
Diagnose invalid target ID for AMDGPU toolchain for assembler

AMDGPU toolchain currently only diagnose invalid target ID for OpenCL
source compilation. Invalid target ID is not diagnosed for assembler.

This patch fixes that.

Differential Revision: https://reviews.llvm.org/D88377
The file was addedclang/test/Driver/amdgpu-invalid-target-id.s
The file was modifiedclang/lib/Driver/ToolChains/AMDGPU.cpp
The file was modifiedclang/lib/Driver/ToolChains/HIP.cpp
The file was modifiedclang/lib/Driver/ToolChains/AMDGPU.h
Commit 9a48411f35a122ac8755a8453887b919c77daf3f by phosek
Revert "[Driver] Move detectLibcxxIncludePath to ToolChain"

This reverts commit a594fd28e373cb7cd348cf01f6a90e055bf6cf6d which
is failign on some bots.
The file was modifiedclang/lib/Driver/ToolChains/Fuchsia.cpp
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp
The file was modifiedclang/include/clang/Driver/ToolChain.h
The file was modifiedclang/lib/Driver/ToolChain.cpp
Commit c8e73920ee61951096909a1d3cbfe7f2fa5bf814 by llvmgnsyncbot
[gn build] Port ace644030e6
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/clang-tidy/readability/BUILD.gn
Commit 64f2855f15d8496be2275ea82f8996868b618b15 by phosek
[CMake] Don't use CMakePushCheckState

When we call cmake_pop_check_state, we undo any changes to REQUIRED
variables performed by HandleLLVMOptions which is undesirable. Rather
use replacement which is what we've used prior to 8d26760a.

Differential Revision: https://reviews.llvm.org/D88756
The file was modifiedllvm/runtimes/CMakeLists.txt
Commit 9ae95a0f8f1bc9bd9e8eb30a5a9444fbdca5cc29 by brad
[Sparc] Remove cast that truncates immediate operands to 32 bits.

Patch by: Mark Kettenis

Test provided by Jessica Clarke.

Differential Revision: https://reviews.llvm.org/D87210
The file was modifiedllvm/lib/Target/Sparc/SparcAsmPrinter.cpp
The file was modifiedllvm/test/CodeGen/SPARC/inlineasm-v9.ll