1. [ThinLTO] Make -lto-embed-bitcode an enum (details)
  2. [Coroutine][Sema] Tighten the lifetime of symmetric transfer returned handle (details)
  3. [SyntaxTree][Synthesis] Add support for Tree. (details)
  4. Re-apply "[ORC] Make MaterializationResponsibility immovable..." with fixes. (details)
  5. Fix -gz=zlib options for linker (details)
Commit 9a2bab5ea2f4aacbb267e634ff1189fa64143b76 by mtrofin
[ThinLTO] Make -lto-embed-bitcode an enum

The current behavior of -lto-embed-bitcode is not quite the same as that
of -fembed-bitcode. While both populate .llvmbc with bitcode, the latter
populates it with pre-optimized bitcode(*), while the former with
post-optimized. The scenarios driving them are different - the latter's
goal is to allow re-compilation, while the former, IIUC, is execution.

I plan to add a third mode for thinlto cases, closely-related to
-fembed-bitcode's scenario: adding the bitcode pre-optimization, but
post-merging. This would allow re-compilation without requiring the
other .bc files that were merged (akin to how -fembed-bitcode allows
recompilation without all the .h files)

The third mode can't co-exist with the current -lto-embed-bitcode mode,
because the latter would overwrite it. For clarity, we change
-lto-embed-bitcode to be an enum.

(*) That's the compiler semantics. The driver splits compilation in 2
phases, so if -fembed-bitcode is given to the driver, the .llvmbc is
optimized bitcode; if the option is passed to the compiler (after -cc1),
the section is pre-optimized.

Differential Revision:
The file was modifiedllvm/lib/LTO/LTOBackend.cpp
The file was modifiedllvm/test/LTO/X86/embed-bitcode.ll
Commit df477db5f9e0ea2a4890040b65002d93e33209b0 by xun
[Coroutine][Sema] Tighten the lifetime of symmetric transfer returned handle

In generating the code for symmetric transfer, a temporary object is created to store the returned handle from await_suspend() call of the awaiter. Previously this temp won't be cleaned up until very later, which ends up causing this temp to be spilled to the heap. However, we know that this temp will no longer be needed after the coro_resume call. We can clean it up right after.

Differential Revision:
The file was addedclang/test/CodeGenCoroutines/coro-semmetric-transfer.cpp
The file was modifiedclang/lib/Sema/SemaCoroutine.cpp
The file was modifiedclang/test/CodeGenCoroutines/Inputs/coroutine.h
Commit 7c37b82f5ba5883b331608b0077c0b30bf301874 by ecaldas
[SyntaxTree][Synthesis] Add support for Tree.

In a future patch
* Implement helper function to generate Trees for tests
* and test Tree methods, namely `findFirstLeaf` and `findLastLeaf`

Differential Revision:
The file was modifiedclang/unittests/Tooling/Syntax/SynthesisTest.cpp
The file was modifiedclang/lib/Tooling/Syntax/Synthesis.cpp
The file was modifiedclang/include/clang/Tooling/Syntax/BuildTree.h
Commit 7dcd0042e8b8581751bd9b915207058d2ab88e1d by Lang Hames
Re-apply "[ORC] Make MaterializationResponsibility immovable..." with fixes.

Re-applies c74900ca672 with fixes for the ThinLtoJIT example.
The file was modifiedllvm/examples/ThinLtoJIT/ThinLtoJIT.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/IRTransformLayer.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h
The file was modifiedllvm/examples/SpeculativeJIT/SpeculativeJIT.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/ObjectTransformLayer.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
The file was modifiedllvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/Core.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/Layer.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
The file was modifiedllvm/examples/ThinLtoJIT/ThinLtoInstrumentationLayer.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/Speculation.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/Speculation.h
The file was modifiedllvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/Core.cpp
The file was modifiedllvm/examples/ThinLtoJIT/ThinLtoInstrumentationLayer.cpp
The file was modifiedllvm/unittests/ExecutionEngine/Orc/LazyCallThroughAndReexportsTest.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/LazyReexports.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/Layer.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/IRTransformLayer.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/LLJIT.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/LazyReexports.cpp
Commit ccb4124a4172bf2cb2e1cd7c253f0f1654fce294 by Yaxun.Liu
Fix -gz=zlib options for linker

gcc translates -gz=zlib to --compress-debug-options=zlib for both assembler and linker
but clang only does this for assembler.

The linker needs --compress-debug-options=zlib option to compress the debug sections
in the generated executable or shared library.

Due to this bug, -gz=zlib has no effect on the generated executable or shared library.

This patch fixes that.

Differential Revision:
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.h
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp
The file was modifiedclang/lib/Driver/ToolChains/AMDGPU.cpp
The file was addedclang/test/Driver/
The file was addedclang/test/Driver/hip-gz-options.hip
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.cpp
The file was modifiedclang/test/Driver/compress.c
The file was modifiedclang/lib/Driver/ToolChains/HIP.cpp