SuccessChanges

Summary

  1. [ASan] Introduce a way set different ways of emitting module destructors. (details)
  2. patch (details)
  3. [Docs] Mention clone depth feature of git in LLVM getting started (details)
  4. [libc][NFC] Merge llvmlibc and llvmlibm targets in to a single target. (details)
  5. Revert "patch" it wass my mistake inusing git (details)
  6. Reduce the number of attributes attached to each function (details)
  7. [ThinLTO, NewPM] Run OptimizerLastEPCallbacks from buildThinLTOPreLinkDefaultPipeline (details)
  8. [asan] Increase CHECK limit in __sanitizer_annotate_contiguous_container (details)
Commit 7d3ef103b55a28a5ca6983dcef63f24ddc3986f1 by Dan Liew
[ASan] Introduce a way set different ways of emitting module destructors.

Previously there was no way to control how module destructors were emitted
by `ModuleAddressSanitizerPass`. However, we want language frontends (e.g. Clang)
to be able to decide how to emit these destructors (if at all).

This patch introduces the `AsanDtorKind` enum that represents the different ways
destructors can be emitted. There are currently only two valid ways to emit destructors.

* `Global` - Use `llvm.global_dtors`. This was the previous behavior and is the default.
* `None`   - Do not emit module destructors.

The `ModuleAddressSanitizerPass` and the various wrappers around it have been updated
to take the `AsanDtorKind` as an argument.

The `-asan-destructor-kind=` command line argument has been introduced to make this
easy to test from `opt`. If this argument is specified it overrides the value passed
to the `ModuleAddressSanitizerPass` constructor.

Note that `AsanDtorKind` is not `bool` because we will introduce a new way to
emit destructors in a subsequent patch.

Note that `AsanDtorKind` is given its own header file because if it is declared
in `Transforms/Instrumentation/AddressSanitizer.h` it leads to compile error
(Module is ambiguous) when trying to use it in
`clang/Basic/CodeGenOptions.def`.

rdar://71609176

Differential Revision: https://reviews.llvm.org/D96571
The file was modifiedllvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
The file was addedllvm/test/Instrumentation/AddressSanitizer/no_global_dtors.ll
The file was addedllvm/include/llvm/Transforms/Instrumentation/AddressSanitizerOptions.h
The file was modifiedllvm/include/llvm/Transforms/Instrumentation/AddressSanitizer.h
Commit 3f30cd73795d17f071cc03926fea28943c65f05f by shivam98.tkg
patch
The file was addedllvm/test/Examples/BrainF/HelloWorld.ll
The file was addedllvm/test/Examples/BrainF/HelloWorld.test
Commit 9a9d56eb3e69219f6bafc02c396fb6584b54114f by shivam98.tkg
[Docs] Mention clone depth feature of git in LLVM getting started

The current size of the llvm-project repository exceeds 1 GB. A shallow clone can save a lot of space and time. Some developers might not aware of this feature.

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D97118
The file was modifiedllvm/docs/GettingStarted.rst
Commit 8d4ac5337f196967fa7266a7f65d6b827911416a by sivachandra
[libc][NFC] Merge llvmlibc and llvmlibm targets in to a single target.

The single target is called llvmlibc. We can add back smaller libm and
other targets in future if required.
The file was modifiedlibc/CMakeLists.txt
The file was modifiedlibc/config/linux/aarch64/entrypoints.txt
The file was modifiedlibc/lib/CMakeLists.txt
The file was modifiedlibc/config/linux/x86_64/entrypoints.txt
The file was modifiedlibc/test/src/CMakeLists.txt
Commit 0f279c7a5c34eaae797c325c18614def21eba921 by shivam98.tkg
Revert "patch" it wass my mistake inusing git

This reverts commit 3f30cd73795d17f071cc03926fea28943c65f05f.
The file was removedllvm/test/Examples/BrainF/HelloWorld.ll
The file was removedllvm/test/Examples/BrainF/HelloWorld.test
Commit 053dc95839b3b8a36db46f8c419e36e632e989cd by Dávid Bolvanský
Reduce the number of attributes attached to each function

Patch takes advantage of the implicit default behavior to reduce the number of attributes, which in turns reduces compilation time.

Reviewed By: serge-sans-paille

Differential Revision: https://reviews.llvm.org/D97116
The file was modifiedclang/lib/CodeGen/CodeGenFunction.cpp
The file was modifiedclang/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c
The file was modifiedclang/test/CodeGenCXX/dllexport.cpp
The file was modifiedclang/test/CodeGen/aarch64-poly128.c
The file was modifiedclang/test/CodeGenCXX/dllexport-ctor-closure.cpp
The file was modifiedclang/test/CodeGen/aarch64-poly64.c
The file was modifiedclang/test/CodeGen/aarch64-neon-ldst-one.c
Commit 8560c2d4268c32fb57a99993ffeb99b3745e0999 by Vitaly Buka
[ThinLTO, NewPM] Run OptimizerLastEPCallbacks from buildThinLTOPreLinkDefaultPipeline

-O1 and above do dont call real optimizer pipeline in ThinLTO PreLink.
Also clang can't add PostLink OptimizerLastEPCallbacks for in-process ThinLTO.
This results in missing sanitizer passes with ThinLTO.

Simple working solution is just call OptimizerLastEPCallbacks
at the end of buildThinLTOPreLinkDefaultPipeline.

Differential Revision: https://reviews.llvm.org/D96320
The file was modifiedclang/test/Driver/asan.c
The file was modifiedclang/test/Driver/tsan.c
The file was modifiedclang/lib/CodeGen/BackendUtil.cpp
The file was modifiedclang/test/Driver/sancov.c
The file was modifiedclang/test/Driver/msan.c
The file was modifiedclang/test/Driver/dfsan.c
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
Commit bc897bad66170e7db845373695b0a09c554bbd4b by Vitaly Buka
[asan] Increase CHECK limit in __sanitizer_annotate_contiguous_container

Asan allocator already support up to (1 << 40) bytes allocations.
The file was modifiedcompiler-rt/lib/asan/asan_poisoning.cpp