SuccessChanges

Summary

  1. [Clang] Mutate long-double math builtins into f128 under IEEE-quad (details)
  2. [llvm-readobj] - Fix the compilation with GCC < 7.0. (details)
  3. [AArch64][GlobalISel] Fix fallbacks introduced for G_SITOFP in 8f283cafddfa8d6d01a94b48cdc5d25817569e91 (details)
  4. [libcxx testing] Fix UB in tests for std::lock_guard (details)
  5. [Debuginfo][DW_OP_implicit_pointer] (1/7) Support for DW_OP_LLVM_implicit_pointer (details)
  6. [llvm-nm] - Move MachO specific logic out from the dumpSymbolNamesFromObject(). NFC. (details)
  7. [libc] Allow customization of memcpy via flags. (details)
  8. [llvm-nm] - Simplify the code in dumpSymbolNamesFromObject. NFC. (details)
  9. [ARM][GISel] Treat calls as variadic even if only fixed arguments provided (details)
  10. [yaml2obj/obj2yaml] - Refine handling of SHT_GNU_verdef sections. (details)
  11. [llvm-readobj][test] - Remove excessive YAML fields from tests. (details)
Commit 168be4208304e36d3bb156b5c413b340a391383e by qiucofan
[Clang] Mutate long-double math builtins into f128 under IEEE-quad

Under -mabi=ieeelongdouble on PowerPC, IEEE-quad floating point semantic
is used for long double. This patch mutates call to related builtins
into f128 version on PowerPC. And in theory, this should be applied to
other targets when their backend supports IEEE 128-bit style libcalls.

GCC already has these mutations except nansl, which is not available on
PowerPC along with other variants (nans, nansf).

Reviewed By: RKSimon, nemanjai

Differential Revision: https://reviews.llvm.org/D92080
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedclang/test/CodeGen/math-builtins-long.c
Commit 1185d3f43d2186fa9291fe7779abf48d9b962ef4 by grimar
[llvm-readobj] - Fix the compilation with GCC < 7.0.

This addressed post commit comments for D93900.

GCC had an issue and requires placing a specialization of
`printUnwindInfo` to a namespace to compile:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
Commit 89e84dec1879417fb7eb96edaa55dac7eca204ab by Amara Emerson
[AArch64][GlobalISel] Fix fallbacks introduced for G_SITOFP in 8f283cafddfa8d6d01a94b48cdc5d25817569e91

If we have an integer->fp convert that has differing sizes, e.g. s32 to s64,
then don't try to convert it to AArch64::G_SITOF since it won't select.
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/select-fp-casts.mir
Commit 78036360573c35ea9e6a697d2eed92db893b4850 by ikudrin
[libcxx testing] Fix UB in tests for std::lock_guard

If mutex::try_lock() is called in a thread that already owns the mutex,
the behavior is undefined. The patch fixes the issue by creating another
thread, where the call is allowed.

Differential Revision: https://reviews.llvm.org/D94656
The file was modifiedlibcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/adopt_lock.pass.cpp
The file was modifiedlibcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp
Commit 104a9f99ccab9d6dbc07a70f569246c23feaf4c1 by AlokKumar.Sharma
[Debuginfo][DW_OP_implicit_pointer] (1/7) Support for DW_OP_LLVM_implicit_pointer

New dwarf operator DW_OP_LLVM_implicit_pointer is introduced (present only in LLVM IR)
This operator is required as it is different than DWARF operator
DW_OP_implicit_pointer in representation and specification (number
and types of operands) and later can not be used as multiple level.

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D84113
The file was addedllvm/test/DebugInfo/X86/LLVM_implicit_pointer.ll
The file was modifiedllvm/lib/IR/DebugInfoMetadata.cpp
The file was modifiedllvm/include/llvm/BinaryFormat/Dwarf.h
The file was modifiedllvm/docs/LangRef.rst
The file was modifiedllvm/lib/BinaryFormat/Dwarf.cpp
Commit bfb8f45ef3f46102d290f11039faa82456c920ae by grimar
[llvm-nm] - Move MachO specific logic out from the dumpSymbolNamesFromObject(). NFC.

`dumpSymbolNamesFromObject` is the method that dumps symbol names.

It has 563 lines, mostly because of huge piece of MachO specific code.
In this patch I move it to separate helper method.

The new size of `dumpSymbolNamesFromObject` is 93 lines. With it it becomes
much easier to maintain it.

I had to change the type of 2 name fields to `std::string`, because MachO logic
uses temporarily buffer strings (e.g `ExportsNameBuffer`, `BindsNameBuffer` etc):

```
  std::string ExportsNameBuffer;
  raw_string_ostream EOS(ExportsNameBuffer);
```

these buffers were moved to `dumpSymbolsFromDLInfoMachO` by this patch and
invalidated after return. Technically, before this patch we had a situation
when local pointers (symbol names) were assigned to members of global static `SymbolList`,
what is dirty by itself.

Differential revision: https://reviews.llvm.org/D94667
The file was modifiedllvm/tools/llvm-nm/llvm-nm.cpp
Commit a10300a2b27c426556f9266364337d5d546a3c14 by gchatelet
[libc] Allow customization of memcpy via flags.

- Adds LLVM_LIBC_IS_DEFINED macro to libc/src/__support/common.h
- Adds a few knobs to memcpy to help with experimentations:
   - LLVM_LIBC_MEMCPY_X86_USE_ONLY_REPMOVSB replaces the implementation with a single call to rep;movsb
   - LLVM_LIBC_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE customizes where the usage of rep;movsb

Differential Revision: https://reviews.llvm.org/D94692
The file was modifiedlibc/src/__support/common.h
The file was modifiedlibc/src/string/x86/memcpy.cpp
Commit 021ea78a97ed8f4796d92a61cdf62284def36f1e by grimar
[llvm-nm] - Simplify the code in dumpSymbolNamesFromObject. NFC.

It is possible to simplify the logic that extracts symbol names.

D94667 made the `NMSymbol::Name` to be `std::string`,
what allowed this simplification.

Differential revision: https://reviews.llvm.org/D94669
The file was modifiedllvm/tools/llvm-nm/llvm-nm.cpp
Commit 3676ef105389f0a8fd7d0efa1477adc209f0b486 by oliver.stannard
[ARM][GISel] Treat calls as variadic even if only fixed arguments provided

For the ARM hard-float calling convention, calls to variadic functions
need to be treated diffrently, even if only the fixed arguments are
provided.

This fixes GCC-C-execute-pr68390 in the test-suite, which is failing on
the ARM GlobaISel bot.
The file was modifiedllvm/lib/Target/ARM/ARMCallLowering.cpp
The file was modifiedllvm/test/CodeGen/ARM/GlobalISel/irtranslator-varargs-lowering.ll
Commit d9afe8588e49f1a2779ab1fe7ff2ec39e8d080fd by grimar
[yaml2obj/obj2yaml] - Refine handling of SHT_GNU_verdef sections.

This patch:
1) Makes `Version`, `Flags`, `VersionNdx` and `Hash` fields to be `Optional<>`.
2) Disallows dumping version definitions that have `vd_version != 1`.
   `vd_version` identifies the version of the structure itself.
   (https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/symversion.html,
    https://docs.oracle.com/cd/E19683-01/816-7777/chapter6-80869/index.html)
3) Stops dumping default values for `Version`, `Flags`, `VersionNdx` and `Hash` fields.
4) Refines testing.

Differential revision: https://reviews.llvm.org/D94659
The file was modifiedllvm/include/llvm/ObjectYAML/ELFYAML.h
The file was modifiedllvm/lib/ObjectYAML/ELFYAML.cpp
The file was modifiedllvm/tools/obj2yaml/elf2yaml.cpp
The file was modifiedllvm/lib/ObjectYAML/ELFEmitter.cpp
The file was modifiedllvm/test/tools/obj2yaml/ELF/verdef-section.yaml
The file was modifiedllvm/test/tools/yaml2obj/ELF/verdef-section.yaml
Commit 45ef053bd70952d35e9bea58fc4af11d6e507ce2 by grimar
[llvm-readobj][test] - Remove excessive YAML fields from tests.

This removes excessive YAML keys from `SHT_GNU_verdef` sections.
Those keys are set by default.

Differential revision: https://reviews.llvm.org/D94660
The file was modifiedllvm/test/tools/llvm-readobj/ELF/versioninfo.test
The file was modifiedllvm/test/tools/llvm-readobj/ELF/dyn-symbols.test
The file was modifiedllvm/test/tools/llvm-readobj/ELF/verdef-invalid.test