SuccessChanges

Summary

  1. [mlir] [LLVMIR] Mark reductions as side-effect free (details)
  2. [SDAG] Improve MemSDNode::getBasePtr (details)
  3. [TargetLoweringObjectFileImpl] Make .llvmbc and .llvmcmd non-SHF_ALLOC (details)
Commit 66e536bc36fb51da1732c8f093f07b5c600df3fe by ajcbik
[mlir] [LLVMIR] Mark reductions as side-effect free

Attribute was missing from original base class.

Reviewed By: bkramer

Differential Revision: https://reviews.llvm.org/D86569
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td (diff)
Commit 514d6e9a8d91e739292c9024d677b8d3c6d43f0c by kparzysz
[SDAG] Improve MemSDNode::getBasePtr

It returned getOperand(1), except for STORE for which it returned
getOperand(2). Handle MSTORE, MGATHER, and MSCATTER as well.
The file was modifiedllvm/include/llvm/CodeGen/SelectionDAGNodes.h (diff)
Commit 82d0749749fafb0303414131dc570781376fdcfb by i
[TargetLoweringObjectFileImpl] Make .llvmbc and .llvmcmd non-SHF_ALLOC

There are two ways .llvmbc can be produced:

* clang -c -fembed-bitcode=all (which also produces .llvmcmd)
* LTO backend: ld.lld -mllvm -lto-embed-bitcode or -plugin-opt=-lto-embed-bitcode

.llvmbc and .llvmcmd have the SHF_ALLOC flag, so they can be dropped by
--gc-sections.

This patch sets SectionKind::Metadata to drop the SHF_ALLOC flag. This
is conceptually correct: the two sections are not part of the process
image, so SHF_ALLOC is not appropriate.

`test/LTO/X86/embed-bitcode.ll`: changed `llvm-objcopy -O binary --only-section` to
`llvm-objcopy --dump-section`. `-O binary` does not dump non-SHF_ALLOC sections.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D86374
The file was modifiedllvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (diff)
The file was addedllvm/test/CodeGen/X86/embed-bitcode.ll
The file was modifiedllvm/test/LTO/X86/embed-bitcode.ll (diff)