SuccessChanges

Summary

  1. [TableGen][GlobalISel] Fix tblgen optimization bug (details)
  2. [GlobalISel] Fix and tidy up documentation for ValueMapping class (NFC) (details)
  3. [X86] Make sure we do not clobber RBX with mwaitx when used as a base (details)
  4. [lldb] Correct wording of EXP_MSG (details)
  5. [SystemZ/ZOS] Additions to the build system. (details)
  6. [llvm-readelf][test] - Refine the sections-ext.test (details)
  7. [llvm-readobj] - Don`t crash when --section-symbols is requested for an object w/o .symtab. (details)
  8. [lldb/DWARF] More DW_AT_const_value fixes (details)
  9. [obj2yaml] - Cleanup error reporting (remove Error.cpp/.h files) (details)
  10. Copy m_plan_is_for_signal_trap member. (details)
  11. [libunwind] Convert x86, x86_64, arm64 register restore functions to C calling convention and name mangling (details)
  12. [gn build] Port 357dc1ed125 (details)
  13. [RDA] Don't visit the BB of the instruction in getReachingUniqueMIDef (details)
  14. [llvm-readobj/elf][test] - Add testing for EM_* specific OS/ABI values. (details)
  15. [llvm-readobj][test] - Commit trivial.obj.elf-amdhsa-gfx803 binary back. (details)
  16. [ARM] Increase MVE gather/scatter cost by MVECostFactor. (details)
Commit b2b9af5a1397f15fbbef18497359245d8d221b86 by bjorn.a.pettersson
[TableGen][GlobalISel] Fix tblgen optimization bug

When optimizing the table, PointerToAnyOperandMatchers would be
incorrectly reported as identical even though they have different
SizeInBits values. This bug was due to failing to overload the
isIdentical() method, which this patch addresses.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D86199
The file was modifiedllvm/utils/TableGen/GlobalISelEmitter.cpp
The file was addedllvm/test/TableGen/GlobalISelEmitterMatchTableOptimizer.td
Commit 5e23dc5b4702cb048f211903dacebed5a6df38d9 by bjorn.a.pettersson
[GlobalISel] Fix and tidy up documentation for ValueMapping class (NFC)

The documentation was missing a '*/' in '/*<2x32-bit> vadd {0, 64, VPR}',
and the example code are now aligned to improve readability.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D86201
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h
Commit cda6b0924257f162cc9299dae2d4bb134fac5d38 by pierre.gousseau
[X86] Make sure we do not clobber RBX with mwaitx when used as a base
pointer.

mwaitx uses EBX as one of its argument.
Using this instruction clobbers RBX as it is defined to hold one of the
input. When the backend uses dynamically allocated stack, RBX is used as
a reserved register for the base pointer.

This patch is adapted from @qcolombet patch for cmpxchg at r263325.

This fixes PR43528.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D73475
The file was modifiedllvm/lib/Target/X86/X86ExpandPseudo.cpp
The file was modifiedllvm/lib/Target/X86/X86InstrInfo.td
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was addedllvm/test/CodeGen/X86/base-pointer-and-mwaitx.ll
The file was modifiedllvm/lib/Target/X86/X86InstrCompiler.td
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.h
Commit 9ad5d37fd917a5b8b3ffe5c12145c85021ee2578 by david.spickett
[lldb] Correct wording of EXP_MSG

EXP_MSG generates a message to show on assert
failure. Currently it looks like:
AssertionError: False is not True : '<cmd>'
returns expected result, got '<actual output>'

Which seems to say that the test failed but
also got the expected result.

It should say:
AssertionError: False is not True : '<cmd>'
returned unexpected result, got '<actual output>'

Reviewed By: teemperor, #lldb

Differential Revision: https://reviews.llvm.org/D86603
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbtest.py
Commit 00d5f1ecccc6d8ece9ac6dd19e9ad807c8a60097 by kai
[SystemZ/ZOS] Additions to the build system.

This change extend the CMake files with the necessary additions
to build LLVM for z/OS.

Reviewed By: hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D83866
The file was modifiedllvm/CMakeLists.txt
The file was modifiedllvm/cmake/modules/GetHostTriple.cmake
The file was modifiedllvm/cmake/modules/HandleLLVMOptions.cmake
The file was modifiedllvm/cmake/modules/AddLLVM.cmake
Commit f65ab626e549f8ddd4cdf10ac12371de3af73aa7 by grimar
[llvm-readelf][test] - Refine the sections-ext.test

The `sections-ext.test` is a test for ELF that is used
to test `--st`, `--sr` and `--sd` extension options for `-S`.

There are 2 problems with it:
1) It is broken, because for CHECK lines it contains there is
no corresponding `FileCheck` call.

2) It uses the precompiled object: `trivial.obj.elf-i386`.
This is the last ELF test where `trivial.obj.elf-i386` is used so we can get
rid of the binary and use an YAML description.

Also, there is a `Inputs/trivial.ll` file that describes how `trivial*` objects
in `Inputs` folders are created. I've removed it from `ELF`, because it is not
actual anymore (we have no more input binaries created with the use of trivial.ll there)
and copied the refined versions of it to `COFF`, `MachO` and `wasm` Input folders.

Differential revision: https://reviews.llvm.org/D86462
The file was removedllvm/test/tools/llvm-readobj/ELF/Inputs/trivial.ll
The file was addedllvm/test/tools/llvm-readobj/wasm/Inputs/trivial.ll
The file was removedllvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-i386
The file was modifiedllvm/test/tools/llvm-readobj/ELF/sections-ext.test
The file was addedllvm/test/tools/llvm-readobj/COFF/Inputs/trivial.ll
The file was addedllvm/test/tools/llvm-readobj/MachO/Inputs/trivial.ll
Commit 7749e2de20d82a6bb8b8beaa74b2a8dbd8232067 by grimar
[llvm-readobj] - Don`t crash when --section-symbols is requested for an object w/o .symtab.

llvm-readobj crashes when `-S --section-symbols` is used
on an object that has no symbol table.

The patch fixes it.

Differential revision: https://reviews.llvm.org/D86520
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
The file was modifiedllvm/test/tools/llvm-readobj/ELF/sections-ext.test
Commit 82982304d7095891b10faacdbf9b4eb73e92a92f by pavel
[lldb/DWARF] More DW_AT_const_value fixes

This fixes several issues in handling of DW_AT_const_value attributes:
- the first is that the size of the data given by data forms does not
  need to match the size of the underlying variable. We already had the
  case to handle this for DW_FORM_(us)data -- this extends the handling
  to other data forms. The main reason this was not picked up is because
  clang uses leb forms in these cases while gcc prefers the fixed-size
  ones.
- The handling of DW_AT_strp form was completely broken -- we would end
  up using the pointer value as the result. I've reorganized this code
  so that it handles all string forms uniformly.
- In case of a completely bogus form we would crash due to
  strlen(nullptr).

Depends on D86311.

Differential Revision: https://reviews.llvm.org/D86348
The file was addedlldb/test/Shell/SymbolFile/DWARF/DW_AT_const_value-bitfields.s
The file was modifiedlldb/test/Shell/SymbolFile/DWARF/DW_AT_const_value.s
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Commit 357dc1ed125e4bf55f1e99fb141fc054c285edbf by grimar
[obj2yaml] - Cleanup error reporting (remove Error.cpp/.h files)

This removes Error.cpp/.h files from obj2yaml.
These files are not needed because we are
using `Error`s instead of error codes widely and do
not need a logic related to obj2yaml specific
error codes anymore.

I had to adjust just a few lines of tool's code
to remove remaining dependencies.

Differential revision: https://reviews.llvm.org/D86536
The file was removedllvm/tools/obj2yaml/Error.h
The file was modifiedllvm/tools/obj2yaml/dwarf2yaml.cpp
The file was modifiedllvm/tools/obj2yaml/obj2yaml.cpp
The file was modifiedllvm/tools/obj2yaml/macho2yaml.cpp
The file was modifiedllvm/tools/obj2yaml/elf2yaml.cpp
The file was modifiedllvm/tools/obj2yaml/minidump2yaml.cpp
The file was modifiedllvm/tools/obj2yaml/CMakeLists.txt
The file was removedllvm/tools/obj2yaml/Error.cpp
Commit 642cb7865f35ad7dbac78d716fcddaff561e8639 by benny.kra
Copy m_plan_is_for_signal_trap member.

Otherwise it would stay uninitialized. Found by msan.
The file was modifiedlldb/include/lldb/Symbol/UnwindPlan.h
Commit e524daa7e8719f4b43e6ebcf25fd4e7d74c5d1c4 by martin
[libunwind] Convert x86, x86_64, arm64 register restore functions to C calling convention and name mangling

Currently, the assembly functions for restoring register state have
been direct implementations of the Registers_*::jumpto() method
(contrary to the functions for saving register state, which are
implementations of the extern C function __unw_getcontext). This has
included having the assembly function name match the C++ mangling of
that method name (and having the function match the C++ member
function calling convention). To simplify the interface of the assembly
implementations, make the functions have C calling conventions and
name mangling.

This fixes building the library in with a MSVC C++ ABI with clang-cl,
which uses a significantly different method name mangling scheme.
(The library might not be of much use as C++ exception unwinder in such
an environment, but the libunwind.h interface for stepwise unwinding
still is usable, as is the _Unwind_Backtrace function.)

Differential Revision: https://reviews.llvm.org/D86041
The file was modifiedlibunwind/src/Registers.hpp
The file was modifiedlibunwind/src/UnwindRegistersRestore.S
Commit fc13d3d50e60e67b485720d5b2d049e8699249cc by llvmgnsyncbot
[gn build] Port 357dc1ed125
The file was modifiedllvm/utils/gn/secondary/llvm/tools/obj2yaml/BUILD.gn
Commit 85dd852a0d46684883fe3b4b19e780ba5d915b06 by samuel.tebbs
[RDA] Don't visit the BB of the instruction in getReachingUniqueMIDef

If the basic block of the instruction passed to getUniqueReachingMIDef
is a transitive predecessor of itself and has a definition of the
register, the function will return that definition even if it is after
the instruction given to the function. This patch stops the function
from scanning the instruction's basic block to prevent this.

Differential Revision: https://reviews.llvm.org/D86607
The file was modifiedllvm/lib/CodeGen/ReachingDefAnalysis.cpp
Commit cbedbd12e9837e049f0a936636a82ff39b75692b by grimar
[llvm-readobj/elf][test] - Add testing for EM_* specific OS/ABI values.

We have no tests for OS/ABI values specific to
EM_TI_C6000, ELFOSABI_AMDGPU_MESA3D and ELFOSABI_ARM machines.

Also, related arrays in the code are not grouped together.
(That is why such testing was missed I guess).

The patch fixes that all.

Differential revision: https://reviews.llvm.org/D86341
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
The file was modifiedllvm/test/tools/llvm-readobj/ELF/file-header-os-abi.test
The file was removedllvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-amdhsa-gfx803
Commit 4b5460762a9634ba6a96b9589e11a1f7a9beaa3f by grimar
[llvm-readobj][test] - Commit trivial.obj.elf-amdhsa-gfx803 binary back.

It was removed in rGcbedbd12e9837e049f0a936636a82ff39b75692b by mistake.
The file was addedllvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-amdhsa-gfx803
Commit 677c1590c03474c8238fbc21b9c0dae9b5e5f4d2 by david.green
[ARM] Increase MVE gather/scatter cost by MVECostFactor.

MVE Gather scatter codegeneration is looking a lot better than it used
to, but still has some issues. The instructions we currently model as 1
cycle per element, which is a bit low for some cases. Increasing the
cost by the MVECostFactor brings them in-line with our other instruction
costs. This will have the effect of only generating then when the extra
benefit is more likely to overcome some of the issues. Notably in
running out of registers and vectorizing loops that could otherwise be
SLP vectorized.

In the short-term whilst we look at other ways of dealing with those
more directly, we can increase the costs of gathers to make them more
likely to be beneficial when created.

Differential Revision: https://reviews.llvm.org/D86444
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll
The file was modifiedllvm/test/Analysis/CostModel/ARM/mve-gather-scatter-cost.ll