SuccessChanges

Summary

  1. [X86][NFC] Fix RUN line bug in the testcase (details)
  2. libDebugInfoDWARF: Don't try to parse loclist[.dwo] headers when parsing debug_info[.dwo] (details)
  3. [LoopExtract][NewPM] Port -loop-extract to NPM (details)
  4. [test][NewPM] Pin -mergereturn tests to legacy PM (details)
  5. [AMDGPU] Cleanup memory legalizer interfaces (details)
  6. Revert "[clang] Improve handling of physical registers in inline assembly operands." (details)
  7. [lldb] Unconditionally strip the `.py(c)` extension when loading a module (details)
  8. [lldb] Remove lexical block and fix formatting LoadScriptingModule (NFC) (details)
  9. [ARM.td] Make instruction definitions visible to sched models (details)
  10. [libcxxabi,libunwind] support running tests in standalone mode (details)
  11. [test][lld] Mark TLS tests as REQUIRES: x86. (details)
  12. [clang-rename] Simplify the code of handling class paritial specializations, NFC. (details)
  13. [Attributor][NFC] Make `createShallowWrapper()` available outside of Attributor (details)
  14. [lldb] Reject redefinitions of persistent variables (details)
  15. Fix typos in the documentation of dynamic values in subview ops (details)
  16. [SVE] Add fatal error when running out of registers for SVE tuple call arguments (details)
  17. [Flang][OpenMP] Rework parser changes for OpenMP atomic construct. (details)
  18. [lldb] [test/Register] Add read/write tests for multithreaded process (details)
  19. [LoopFlatten] Precommit new test cases. NFC. (details)
  20. [SyntaxTree] Improve safety of `replaceChildRangeLowLevel` (details)
  21. [SyntaxTree] Bug fix in `MutationsImpl::addAfter`. (details)
Commit bd05afcb3f4093fe76dd64fe29255550bfd894ec by chen3.liu
[X86][NFC] Fix RUN line bug in the testcase

Testcase added in D78699 doesn't work because the wrong RUN line in the
testcase.

Differential Revision: https://reviews.llvm.org/D89361
The file was modifiedclang/test/CodeGen/X86/avx-union.c
Commit 9670a45c980c371c5ece8047a00b8b2abec73823 by dblaikie
libDebugInfoDWARF: Don't try to parse loclist[.dwo] headers when parsing debug_info[.dwo]

There's no way to know whether there's a loclist contribution to parse
if there's no loclistx encoding - and if there is one, there's no need
to walk back from the loclist_base (or, uin the case of
info.dwo/loclist.dwo - starting at 0 in the contribution) to parse the
header, instead rely on the DWARF32/64 and address size in the CU
that's already available.

This would come up in split DWARF (non-split wouldn't try to read a
loclist header in the absence of a loclist_base) when one unit had
location lists and another does not (because the loclists.dwo section
would be non-empty in that case - in the case where it's empty the
parsing would silently skip).

Simplify the testing a bit, rather than needing a whole dwp, etc - by
creating a malformed loclists.dwo section (and use single file Split
DWARF) that would trip up any attempt to parse it - but no attempt
should be made.
The file was addedllvm/test/tools/llvm-dwarfdump/X86/debug_loclists_unused_invalid.s
The file was modifiedllvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
Commit 518ec05a104a237b6ccae20e1e84c2b462fc3ca1 by aeubanks
[LoopExtract][NewPM] Port -loop-extract to NPM

-loop-extract-single is just -loop-extract on one loop.

-loop-extract depended on -break-crit-edges and -loop-simplify in the
legacy PM, but the NPM doesn't allow specifying pass dependencies like
that, so manually add those passes to the RUN lines where necessary.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D89016
The file was addedllvm/include/llvm/Transforms/IPO/LoopExtractor.h
The file was modifiedllvm/lib/Transforms/IPO/IPO.cpp
The file was modifiedllvm/test/Transforms/CodeExtractor/2004-03-14-DominanceProblem.ll
The file was modifiedllvm/test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll
The file was modifiedllvm/test/Transforms/CodeExtractor/LoopExtractor_crash.ll
The file was modifiedllvm/lib/Transforms/IPO/LoopExtractor.cpp
The file was modifiedllvm/test/Transforms/CodeExtractor/2004-03-17-MissedLiveIns.ll
The file was modifiedllvm/test/Transforms/CodeExtractor/LoopExtractor_min_wrapper.ll
The file was modifiedllvm/test/Transforms/CodeExtractor/BlockAddressSelfReference.ll
The file was modifiedllvm/test/Transforms/CodeExtractor/BlockAddressReference.ll
The file was modifiedllvm/test/Transforms/CodeExtractor/2004-03-14-NoSwitchSupport.ll
The file was modifiedllvm/test/Transforms/CodeExtractor/LoopExtractor.ll
The file was modifiedllvm/test/Transforms/CodeExtractor/2004-03-17-UpdatePHIsOutsideRegion.ll
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was modifiedllvm/test/Transforms/CodeExtractor/LoopExtractor_alloca.ll
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/test/Transforms/CodeExtractor/2004-03-13-LoopExtractorCrash.ll
The file was modifiedllvm/include/llvm/InitializePasses.h
Commit 4b6e3ad9b40111852aa717fee2768f964b6d70a7 by aeubanks
[test][NewPM] Pin -mergereturn tests to legacy PM

Looks like this pass isn't really used and hasn't been worked on in a
loooong time.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D89010
The file was modifiedllvm/test/Transforms/CodeExtractor/LoopExtractor_infinite.ll
The file was modifiedllvm/test/Transforms/UnifyFunctionExitNodes/unreachable-blocks-status.ll
Commit 907d799070c351b3da0b0f4b9669f230d46e6d8d by Tony.Tye
[AMDGPU] Cleanup memory legalizer interfaces

- Rename interfaces to be in terms of acquire and release.
- Improve comments.

Differential Revision: https://reviews.llvm.org/D89355
The file was modifiedllvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp
Commit 625fa47617022b2d1ed7b940f9621162874175ee by paulsson
Revert "[clang] Improve handling of physical registers in inline assembly operands."

This reverts commit c78da037783bda0f27f4d82060149166e6f0c796.

Temporarily reverted due to https://bugs.llvm.org/show_bug.cgi?id=47837.
The file was modifiedclang/test/CodeGen/systemz-inline-asm.c
The file was modifiedclang/lib/CodeGen/CGStmt.cpp
The file was removedclang/test/CodeGen/systemz-inline-asm-02.c
Commit 1197ee35b84e1fe1c1884b3228b95351719fbb09 by Jonas Devlieghere
[lldb] Unconditionally strip the `.py(c)` extension when loading a module

Currently we only strip the Python extension when the file exists on
disk because we assumed that if it didn't exist it was a module.
However, with the change from D89334 this is no longer the case as we
want to be able to import a relative path to a .py as a module. Since we
always import a scripting module as a "python module" we should always
strip the extension if present.

Differential revision: https://reviews.llvm.org/D89352
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
Commit 3b33b41604784f903c7c5c38665d75da93dbf805 by Jonas Devlieghere
[lldb] Remove lexical block and fix formatting LoadScriptingModule (NFC)
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
Commit 2ad82b0ed1b4ad9e6ac462d6fe9b1247186861e5 by eleviant
[ARM.td] Make instruction definitions visible to sched models

Differential revision: https://reviews.llvm.org/D89308
The file was modifiedllvm/lib/Target/ARM/ARMSchedule.td
The file was modifiedllvm/lib/Target/ARM/ARMScheduleA9.td
The file was modifiedllvm/lib/Target/ARM/ARM.td
Commit 8c03fdf34a659925a3f09c8f54016e47ea1c7519 by dominik.montada
[libcxxabi,libunwind] support running tests in standalone mode

Remove check for standalone and shared library mode in libcxxabi to
allow including tests in said mode. This check prevented running the
tests in standalone mode with static libraries, which is the case for
baremetal targets.

Fix check-unwind target trying to use a non-existent llvm-lit executable
in standalone mode. Copy the HandleOutOfTreeLLVM logic from libcxxabi to
libunwind in order to make the tests work in standalone mode.

Reviewed By: ldionne, #libc_abi, #libc

Differential Revision: https://reviews.llvm.org/D86540
The file was modifiedlibcxxabi/CMakeLists.txt
The file was modifiedlibunwind/CMakeLists.txt
The file was removedlibcxxabi/cmake/Modules/HandleOutOfTreeLLVM.cmake
The file was modifiedlibcxx/CMakeLists.txt
The file was modifiedlibcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake
The file was modifiedlibunwind/test/CMakeLists.txt
Commit dc128e5968ccc632f7875ece639b0d2c94b170a6 by me
[test][lld] Mark TLS tests as REQUIRES: x86.

Fixes http://lab.llvm.org:8011/#/builders/119/builds/92
The file was modifiedlld/test/COFF/tls-alignment-32.ll
The file was modifiedlld/test/COFF/tls-alignment-64.ll
Commit 27c691cf62a9b34789516a24233fa0ee7bbd8111 by hokein.wu
[clang-rename] Simplify the code of handling class paritial specializations, NFC.

Instead of collecting all specializations and doing a post-filterin, we
can just get all targeted specializations from getPartialSpecializationsizations.

Differential Revision: https://reviews.llvm.org/D89220
The file was modifiedclang/lib/AST/DeclTemplate.cpp
The file was modifiedclang/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp
The file was modifiedclang/include/clang/AST/DeclTemplate.h
Commit ce16be253c4d772c072325df5776b5324c2c90c1 by sstipanovic
[Attributor][NFC] Make `createShallowWrapper()` available outside of Attributor

D85703 will need to create shallow wrappers in order to track the spmd icv. We need to make it available.

Differential Revision: https://reviews.llvm.org/D89342
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
The file was modifiedllvm/include/llvm/Transforms/IPO/Attributor.h
Commit cb81e662a58908913f342520e4c010564a68126a by Raphael Isemann
[lldb] Reject redefinitions of persistent variables

Currently one can redefine a persistent variable and LLDB will just silently
ignore the second definition:

```
(lldb) expr int $i = 1
(lldb) expr int $i = 2
(lldb) expr $i
(int) $i = 1
```

This patch makes this an error and rejects the expression with the second
definition.

A nice follow up would be to refactor LLDB's persistent variables to not just be
a pair of type and name, but also contain some way to obtain the original
declaration and source code that declared the variable. That way we could
actually make a full diagnostic as we would get from redefining a variable twice
in the same expression.

Reviewed By: labath, shafik, JDevlieghere

Differential Revision: https://reviews.llvm.org/D89310
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
The file was modifiedlldb/test/API/commands/expression/persistent_variables/TestPersistentVariables.py
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
Commit 2b60291285b241fc19f5a4e3f2e814157e0f5984 by nicolas.vasilache
Fix typos in the documentation of dynamic values in subview ops

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D89338
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.td
Commit af57a0838eba528c2e5bd805d92c611435fca0d8 by david.sherwood
[SVE] Add fatal error when running out of registers for SVE tuple call arguments

When passing SVE types as arguments to function calls we can run
out of hardware SVE registers. This is normally fine, since we
switch to an indirect mode where we pass a pointer to a SVE stack
object in a GPR. However, if we switch over part-way through
processing a SVE tuple then part of it will be in registers and
the other part will be on the stack. This is wrong and we'd like
to avoid any silent ABI compatibility issues in future. For now,
I've added a fatal error when this happens until we can get a
proper fix.

Differential Revision: https://reviews.llvm.org/D89326
The file was modifiedllvm/lib/Target/AArch64/AArch64CallingConvention.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was addedllvm/test/CodeGen/AArch64/sve-calling-convention-tuples-broken.ll
Commit d95d3d2a42cb43fca956efe60ab5965d84b0efd5 by joshisameeran17
[Flang][OpenMP] Rework parser changes for OpenMP atomic construct.

`OmpStructureChecker` is supposed to work only with `parser::OmpClause`
after tablegen changes for OpenMP and OpenACC were introduced.
Hence `OmpMemoryOrderClause`, `OmpAtomicMemoryOrderClause` and similar ones were failing
to catch semantic errors, inspite of having code for semantic checks.
This patch tries to change parser for `OmpMemoryOrderClause` and similar dependent ones
and use `OmpClauseList` which resides/comes from common tablegen for OpenMP/OpenACC eventually using `parser::OmpClause`.

This patch also tries to :
1. Change `OmpCriticalDirective` in `openmp-parsers.cpp` to support `OmpClauseList`.
2. Check-flang regresses when changes were introduced due to missing semantic checks in OmpCritical, patch implements them at the minimal level to pass the regression.
3. Change tablegen to support Hint clause.
4. Adds missing source locations `CharBlock Source` in each atomic construct.
5. Remove dead code realted to `memory-order-clauses` after moving to `OmpClauseList`.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D88965
The file was modifiedflang/test/Semantics/omp-atomic.f90
The file was modifiedflang/lib/Semantics/check-omp-structure.h
The file was addedflang/test/Parser/omp-atomic-unparse.f90
The file was modifiedflang/include/flang/Parser/dump-parse-tree.h
The file was modifiedflang/include/flang/Parser/parse-tree.h
The file was modifiedflang/lib/Parser/openmp-parsers.cpp
The file was modifiedflang/lib/Semantics/check-omp-structure.cpp
The file was modifiedflang/lib/Parser/unparse.cpp
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMP.td
Commit caedbc317a5a4f046c345c136387e3ca199d8503 by mgorny
[lldb] [test/Register] Add read/write tests for multithreaded process

Add a test to verify that 'register read' and 'register write' commands
work correctly in a multithreaded program, in particular that they read
or write registers for the correct thread.  The tests use locking
to ensure that events are serialized and the test can execute reliably.

Differential Revision: https://reviews.llvm.org/D89248
The file was addedlldb/test/Shell/Register/x86-multithread-read.test
The file was addedlldb/test/Shell/Register/x86-multithread-write.test
The file was addedlldb/test/Shell/Register/Inputs/x86-multithread-write.cpp
The file was addedlldb/test/Shell/Register/Inputs/x86-multithread-read.cpp
Commit 20c7ab87a78c8d808a7d1e662d5bfd580dcdc12e by sjoerd.meijer
[LoopFlatten] Precommit new test cases. NFC.
The file was addedllvm/test/Transforms/LoopFlatten/limit-not-invariant.ll
Commit 4178f8f2f08e14abb341fb32dd0f4cc9320df072 by ecaldas
[SyntaxTree] Improve safety of `replaceChildRangeLowLevel`

* Add assertions for other preconditions.
* If nothing is modified, don't mark it.

Differential Revision: https://reviews.llvm.org/D89303
The file was modifiedclang/lib/Tooling/Syntax/Tree.cpp
Commit 72732acade77d5ee55a818e2da77a2c5b7033ccb by ecaldas
[SyntaxTree] Bug fix in `MutationsImpl::addAfter`.

* Add assertions to other `MutationsImpl` member functions
* `findPrevious` is a free function

Differential Revision: https://reviews.llvm.org/D89314
The file was modifiedclang/lib/Tooling/Syntax/Mutations.cpp