FailedChanges

Summary

  1. Add flang out of tree buildbot (details)
Commit 073b104115cd8a184f8549bcc2a7ed2eac2bcc2f by diana.picus
Add flang out of tree buildbot

This builder has 2 stages: one for building llvm and mlir, and one for
building flang itself in a different build directory. In order to do an
out of tree build of flang, we need to run cmake with the path to the
flang subproject as source directory.

Differential Revision: https://reviews.llvm.org/D87085
The file was modifiedbuildbot/osuosl/master/config/slaves.py (diff)
The file was modifiedbuildbot/osuosl/master/config/builders.py (diff)
The file was addedzorg/buildbot/builders/FlangBuilder.py

Summary

  1. [lldb] Remove nothreadallow from SWIG's __str__ wrappers to work around a Python>=3.7 crash (details)
  2. [ARM] Expand cannotInsertWDLSTPBetween to the last instruction (details)
  3. [ARM][MVE] tail-predication: overflow checks for elementcount, cont'd (details)
  4. [Coroutines] Remove unused includes. NFC. (details)
  5. [obj2yaml][yaml2obj] - Stop recognizing SHT_MIPS_ABIFLAGS on non-MIPS targets. (details)
  6. [lldb] Reference STL types in import-std-module tests (details)
  7. [yaml2obj][obj2yaml] - Add a support for SHT_ARM_EXIDX section. (details)
  8. [InstCombine] Add tests for vector rotate by constants with undefs. (details)
  9. [AMDGPU] Split R600 and GCN bfi patterns (details)
  10. [AMDGPU] Make bfi patterns divergence-aware (details)
  11. [AMDGPU] Add bfi immediate pattern (details)
  12. [PowerPC] Clean-up mayRaiseFPException bits (details)
Commit 070a1d562b303e564e40d831f6dc125793e19b38 by Raphael Isemann
[lldb] Remove nothreadallow from SWIG's __str__ wrappers to work around a Python>=3.7 crash

Usually when we enter a SWIG wrapper function from Python, SWIG automatically
adds a `Py_BEGIN_ALLOW_THREADS`/`Py_END_ALLOW_THREADS` around the call to the SB
API C++ function. This will ensure that Python's GIL is released when we enter
LLDB and locked again when we return to the wrapper code.

D51569 changed this behaviour but only for the generated `__str__` wrappers. The
added `nothreadallow` disables the injection of the GIL release/re-acquire code
and the GIL is now kept locked when entering LLDB and is expected to be still
locked when returning from the LLDB implementation. The main reason for that was
that back when D51569 landed the wrapper itself created a Python string. These
days it just creates a std::string and SWIG itself takes care of getting the GIL
and creating the Python string from the std::string, so that workaround isn't
necessary anymore.

This patch just removes `nothreadallow` so that our `__str__` functions now
behave like all other wrapper functions in that they release the GIL when
calling into the SB API implementation.

The motivation here is actually to work around another potential bug in LLDB.
When one calls into the LLDB SB API while holding the GIL and that call causes
LLDB to interpret some Python script via `ScriptInterpreterPython`, then the GIL
will be unlocked when the control flow returns from the SB API. In the case of
the `__str__` wrapper this would cause that the next call to a Python function
requiring the GIL would fail (as SWIG will not try to reacquire the GIL as it
isn't aware that LLDB removed it).

The reason for this unexpected GIL release seems to be a workaround for recent
Python versions:
```
    // The only case we should go further and acquire the GIL: it is unlocked.
    if (PyGILState_Check())
      return;
```

The early-exit here causes `InitializePythonRAII::m_was_already_initialized` to
be always false and that causes that `InitializePythonRAII`'s destructor always
directly unlocks the GIL via `PyEval_SaveThread`. I'm investigating how to
properly fix this bug in a follow up patch, but for now this straightforward
patch seems to be enough to unblock my other patches (and it also has the
benefit of removing this workaround).

The test for this is just a simple test for `std::deque` which has a synthetic
child provider implemented as a Python script. Inspecting the deque object will
cause `expect_expr` to create a string error message by calling
`str(deque_object)`. Printing the ValueObject causes the Python script for the
synthetic children to execute which then triggers the bug described above where
the GIL ends up being unlocked.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D88302
The file was addedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/deque/main.cpp
The file was addedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/deque/TestDataFormatterLibcxxDeque.py
The file was addedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/deque/Makefile
The file was modifiedlldb/bindings/macros.swig
Commit e4b9867cb69acc272157ef1baaecd9848ad18ecc by david.green
[ARM] Expand cannotInsertWDLSTPBetween to the last instruction

9d9a11c7be037 added this check for predicatable instructions between the
D/WLSTP and the loop's start, but it was missing the last instruction in
the block. Change it to use some iterators instead.

Differential Revision: https://reviews.llvm.org/D88354
The file was modifiedllvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/mov-operand.ll
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/it-block-mov.mir
Commit f39f92c1f610fcdfad74730a3e3df881e32a28c2 by sjoerd.meijer
[ARM][MVE] tail-predication: overflow checks for elementcount, cont'd

This is a reimplementation of the overflow checks for the elementcount,
i.e. the 2nd argument of intrinsic get.active.lane.mask. The element
count is lowered in each iteration of the tail-predicated loop, and
we must prove that this expression doesn't overflow.

Many thanks to Eli Friedman and Sam Parker for all their help with
this work.

Differential Revision: https://reviews.llvm.org/D88086
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/tail-pred-basic.ll
The file was removedllvm/test/CodeGen/Thumb2/LowOverheadLoops/tail-pred-forced.ll
The file was modifiedllvm/lib/Target/ARM/MVETailPredication.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/tail-pred-const.ll
Commit 7e5a356d2bd232267aac2484519ac2c5658eca08 by benny.kra
[Coroutines] Remove unused includes. NFC.
The file was modifiedllvm/include/llvm/Transforms/Coroutines/CoroSplit.h
The file was modifiedllvm/lib/Transforms/Coroutines/CoroSplit.cpp
Commit ea0f66e84856519e08b255fd1010d7f07ad0dabd by grimar
[obj2yaml][yaml2obj] - Stop recognizing SHT_MIPS_ABIFLAGS on non-MIPS targets.

Currently we are always recognizing the `SHT_MIPS_ABIFLAGS` section,
even on non-MIPS targets.

The problem of doing this is briefly discussed in D88228 which does the same for `SHT_ARM_EXIDX`:

"The problem is that `SHT_ARM_EXIDX` shares the value with `SHT_X86_64_UNWIND (0x70000001U)`.
We might have other machine specific conflicts, e.g.
`SHT_ARM_ATTRIBUTES` vs `SHT_MSP430_ATTRIBUTES` vs `SHT_RISCV_ATTRIBUTES (0x70000003U)`."

I think we should only recognize target specific sections when the machine type
matches. I.e. `SHT_MIPS_*` should be recognized only on `MIPS`, `SHT_ARM_*`
only on `ARM` etc.

This patch stops recognizing `SHT_MIPS_ABIFLAGS` on `non-MIPS` targets.

Note: I had to update `ScalarEnumerationTraits<ELFYAML::MIPS_ISA>::enumeration`, because
otherwise test crashes, calling `llvm_unreachable`.

Differential revision: https://reviews.llvm.org/D88294
The file was modifiedllvm/tools/obj2yaml/elf2yaml.cpp
The file was modifiedllvm/test/tools/yaml2obj/ELF/mips-abi-flags.yaml
The file was modifiedllvm/lib/ObjectYAML/ELFYAML.cpp
The file was modifiedllvm/test/tools/obj2yaml/ELF/mips-abi-flags.yaml
Commit cabee89bed69ce37c9e588f9190ed9c33f6bfdee by Raphael Isemann
[lldb] Reference STL types in import-std-module tests

With the recent patches to the ASTImporter that improve template type importing
(D87444), most of the import-std-module tests can now finally import the
type of the STL container they are testing. This patch removes most of the casts
that were added to simplify types to something the ASTImporter can import
(for example, std::vector<int>::size_type was casted to `size_t` until now).
Also adds the missing tests that require referencing the container type (for
example simply printing the whole container) as here we couldn't use a casting
workaround.

The only casts that remain are in the forward_list tests that reference
the iterator and the stack test. Both tests are still failing to import the
respective container type correctly (or crash while trying to import).
The file was modifiedlldb/test/API/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/unique_ptr/TestUniquePtrFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/forward_list/TestForwardListFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/basic/TestImportStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/unique_ptr-dbg-info-content/main.cpp
The file was modifiedlldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardListFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/list/TestListFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDequeFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/weak_ptr/TestWeakPtrFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentListFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/deque-basic/TestDequeFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectorsFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/vector/TestVectorFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/shared_ptr/TestSharedPtrFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/conflicts/TestStdModuleWithConflicts.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/weak_ptr-dbg-info-content/TestDbgInfoContentWeakPtrFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/empty-module/TestEmptyStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/shared_ptr-dbg-info-content/TestSharedPtrDbgInfoContentFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/vector-bool/TestVectorBoolFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/queue/TestQueueFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/unique_ptr/main.cpp
The file was modifiedlldb/test/API/commands/expression/import-std-module/pair/TestPairFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/forward_decl_from_module/TestForwardDeclFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/no-std-module/TestMissingStdModule.py
Commit dab991716483f2b80bf8dbf8e7ba26ba3d49855d by grimar
[yaml2obj][obj2yaml] - Add a support for SHT_ARM_EXIDX section.

This adds the support for SHT_ARM_EXIDX sections to obj2yaml/yaml2obj tools.

SHT_ARM_EXIDX is a ARM specific index table filled with entries.
Each entry consists of two 4-bytes values (words).
(https://developer.arm.com/documentation/ihi0038/c/?lang=en#index-table-entries)

Differential revision: https://reviews.llvm.org/D88228
The file was modifiedllvm/lib/ObjectYAML/ELFYAML.cpp
The file was modifiedllvm/lib/ObjectYAML/ELFEmitter.cpp
The file was modifiedllvm/test/tools/llvm-readobj/ELF/ARM/unwind-non-relocatable.test
The file was addedllvm/test/tools/obj2yaml/ELF/arm-exidx-section.yaml
The file was modifiedllvm/tools/obj2yaml/elf2yaml.cpp
The file was modifiedllvm/include/llvm/ObjectYAML/ELFYAML.h
The file was addedllvm/test/tools/yaml2obj/ELF/arm-exidx-section.yaml
Commit 0c671bfe00a120131c0fe070e5e7b7b613e823f1 by llvm-dev
[InstCombine] Add tests for vector rotate by constants with undefs.
The file was modifiedllvm/test/Transforms/InstCombine/rotate.ll
Commit 286d3fc7500dfa6a947b217d0e87d1764d2242b8 by jay.foad
[AMDGPU] Split R600 and GCN bfi patterns

This is in preparation for making the GCN patterns divergence-aware.
NFC.

Differential Revision: https://reviews.llvm.org/D88244
The file was modifiedllvm/lib/Target/AMDGPU/EvergreenInstructions.td
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructions.td
The file was modifiedllvm/lib/Target/AMDGPU/SIInstructions.td
Commit 2806f586dca78756cc2fbadf09c0859dda4a760e by jay.foad
[AMDGPU] Make bfi patterns divergence-aware

This tends to increase code size but more importantly it reduces vgpr
usage, and could avoid costly readfirstlanes if the result needs to be
in an sgpr.

Differential Revision: https://reviews.llvm.org/D88245
The file was modifiedllvm/lib/Target/AMDGPU/SIInstructions.td
The file was modifiedllvm/test/CodeGen/AMDGPU/bfi_int.ll
The file was modifiedllvm/lib/Target/AMDGPU/SOPInstructions.td
The file was modifiedllvm/test/CodeGen/AMDGPU/insert_vector_dynelt.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/insert_vector_elt.v2i16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/insert_vector_elt.ll
Commit bab1a17ad7761ae61e5841c2fb905de59cb8c2da by jay.foad
[AMDGPU] Add bfi immediate pattern

Differential Revision: https://reviews.llvm.org/D88246
The file was modifiedllvm/test/CodeGen/AMDGPU/insert_vector_elt.v2i16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/shrink-add-sub-constant.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIInstructions.td
Commit 40e86ca749a7c38875858d1005f34d1e2f53743b by qiucofan
[PowerPC] Clean-up mayRaiseFPException bits

According to POWER ISA, floating point instructions altering exception
bits in FPSCR should be 'may raise FP exception'. (excluding those
read or write the whole FPSCR directly, like mffs/mtfsf) We need to
model FPSCR well in future patches to handle the special case properly.

Instructions added mayRaiseFPException:
- fre(s)/frsqrte(s)
- fmadd(s)/fmsub(s)/fnmadd(s)/fnmsub(s)
- xscmpoqp/xscmpuqp/xscmpeqdp/xscmpgedp/xscmpgtdp
- xscvdphp/xscvhpdp/xvcvhpsp/xvcvsphp/xsrqpxp
- xsmaxcdp/xsincdp/xsmaxjdp/xsminjdp

Instructions removed mayRaiseFPException:
- xstdivdp/xvtdiv(d|s)p/xstsqrtdp/xvtsqrt(d|s)p
- xsabsdp/xsnabsdp/xvabs(d|s)p/xvnabs(d|s)p
- xsnegdp/xscpsgndp/xvneg(d|s)p/xvcpsgn(d|s)p
- xvcvsxwdp/xvcvuxwdp
- xscvdpspn/xscvspdpn

Reviewed By: steven.zhang

Differential Revision: https://reviews.llvm.org/D87738
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrVSX.td
The file was modifiedllvm/test/CodeGen/PowerPC/nofpexcept.ll
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.td

Summary

  1. Add flang out of tree buildbot (details)
Commit 073b104115cd8a184f8549bcc2a7ed2eac2bcc2f by diana.picus
Add flang out of tree buildbot

This builder has 2 stages: one for building llvm and mlir, and one for
building flang itself in a different build directory. In order to do an
out of tree build of flang, we need to run cmake with the path to the
flang subproject as source directory.

Differential Revision: https://reviews.llvm.org/D87085
The file was modifiedbuildbot/osuosl/master/config/slaves.py
The file was modifiedbuildbot/osuosl/master/config/builders.py
The file was addedzorg/buildbot/builders/FlangBuilder.py