Changes

Summary

  1. [ELF] Do not report undefined weak references in shared libraries (details)
  2. [ORC] Pad section start to account for alignment offset in MachO GDB JIT plugin. (details)
  3. [NFC][MachineInstr] Pass-by-value DebugLoc in CreateMachineInstr (details)
  4. [X86] Fix fentry handling in X86IndirectBranchTracking.cpp (details)
  5. [mlir][sparse] Requiring emitCInterface parameter to be explicit (details)
  6. [mlir][OpenMP] Added omp.atomic.read lowering (details)
  7. [gn build] Port d9941f74549a (details)
Commit ce25eb12dd5abae6c769168a70a8f377b608228c by ikudrin
[ELF] Do not report undefined weak references in shared libraries

This fixes an issue introduced in D101996.

A weak reference in a shared library could be incorrectly reported if
there is another library that has a strong reference to the same symbol.

Differential Revision: https://reviews.llvm.org/D115041
The file was addedlld/test/ELF/allow-shlib-undefined-weak.s
The file was modifiedlld/ELF/InputFiles.cpp
Commit 02095f2dd7d96768432af8a53e2d743e881e7447 by Lang Hames
[ORC] Pad section start to account for alignment offset in MachO GDB JIT plugin.

In order to present a well-formed MachO debug object for debugger registration
the first block in each section must have a zero alignment offset (since there
is no way to represent a non-zero offset in a MachO section load command). This
patch updates the MachODebugObjectSynthesizer class to introduce a padding
padding block at the start of the section if necessary to guarantee a zero
alignment offset.
The file was addedllvm/test/ExecutionEngine/JITLink/X86/MachO_gdb_jit_nonzero_alignment_offsets.s
The file was modifiedllvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp
The file was addedllvm/test/ExecutionEngine/JITLink/X86/Inputs/MachO_strong_def_extra.s
Commit 2bd7384d3a99edd345fcc5e8ee8d550bd65dddb2 by mtrofin
[NFC][MachineInstr] Pass-by-value DebugLoc in CreateMachineInstr

DebugLoc is cheap to move, passing it by-val rather than const ref to
take advantage of the fact that it is consumed that way by the
MachineInstr ctor, which creates some optimization oportunities.

Differential Revision: https://reviews.llvm.org/D115208
The file was modifiedllvm/lib/CodeGen/MachineFunction.cpp
The file was modifiedllvm/include/llvm/CodeGen/MachineFunction.h
Commit dfcf69770bc522b9e411c66454934a37c1f35332 by phoebe.wang
[X86] Fix fentry handling in X86IndirectBranchTracking.cpp

When compiling with indirect branch tracking and fentry (-fcf-protection=branch -mfentry -pg) the X86IndirectBranchTrackingPass will attempt to place endbr in basic blocks, checking for Calls/IsCallReturnTwice. For calling the function IsCallReturnTwice(), the pass attempts to retrieve the first operand of the respective machine instruction. Since FENTRY_CALL is considered a call, and it does not have any argument, the condition inside the pass will attempt to call IsCallReturnTwice on the machine instruction, but since it does not have operands, it will lead into a crash.

Kudos to Alyssa Milburn for helping in the issue triage. The diff brings a test, but to reproduce the problem, follow the steps below.

```
echo "int main() {};" > repro.c
clang repro.c -fcf-protection=branch -mfentry -pg
```

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D111108
The file was addedllvm/test/CodeGen/X86/fentry-ibt.ll
The file was modifiedllvm/lib/Target/X86/X86IndirectBranchTracking.cpp
Commit d8731bfc93c2946de6d1e2242cea25d0a76aeb85 by 2998727+wrengr
[mlir][sparse] Requiring emitCInterface parameter to be explicit

Depends On D115004

Cleans up code legibility by requiring the `emitCInterface` parameter to be explicit at all call-sites, and defining boolean aliases for that parameter.

Reviewed By: aartbik, rriddle

Differential Revision: https://reviews.llvm.org/D115005
The file was modifiedmlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
Commit 31cf42bd9a71c53c7ddc6f0e3ec41fcea24f2f7c by Shraiysh.Vaishay
[mlir][OpenMP] Added omp.atomic.read lowering

This patch adds lowering from omp.atomic.read to LLVM IR along with the
memory ordering clause. Tests for the same are also added.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D115134
The file was modifiedmlir/test/Target/LLVMIR/openmp-llvm.mlir
The file was modifiedmlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
Commit 37fbf238f4427b651a16956eca1cb0e2ab5cdbfd by llvmgnsyncbot
[gn build] Port d9941f74549a
The file was modifiedllvm/utils/gn/secondary/llvm/unittests/Support/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Debuginfod/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/llvm/unittests/Debuginfod/BUILD.gn