SuccessChanges

Summary

  1. Add x86 REQUIRES to tests from 2c5f3d54c5ee / D85746 (details)
  2. [Flang][OpenMP] Fix issue in only a single nowait clause can appear on a sections directive. (details)
  3. [InstCombine] Add undef funnel shift amount test coverage (details)
  4. [mlir][Linalg] Make a Linalg CodegenStrategy available. (details)
  5. Analysis: only query size of sized objects. (details)
  6. [ValueTracking] Use assume's noundef operand bundle (details)
  7. [AMDGPU] Base getSubRegFromChannel on TableGen data (details)
  8. [clangd] Refine recoveryAST flags in clangd (details)
  9. [ASTImporter] Fix crash caused by unimported type of FromatAttr (details)
  10. [ASTImporter] Fix crash caused by unset AttributeSpellingListIndex (details)
  11. [clangd] Disable extract variable for RHS of assignments (details)
  12. [flang] Make flang build compatible with LLVM dylib (details)
  13. [lldb] Modernize PseudoTerminal::OpenFirstAvailablePrimary (details)
  14. [lldb-server][linux] Add ability to allocate memory (details)
  15. Revert "Reland "[SCEV] Model ptrtoint(SCEVUnknown) cast not as unknown, but as zext/trunc/self of SCEVUnknown"" and it's follow-ups (details)
  16. Fix a broken build for gcc <= 7.1 (details)
  17. [DebugInstrRef] Create DBG_INSTR_REFs in SelectionDAG (details)
Commit abaa8706e9443dad12f7cf83ff4b777ebc186bb6 by jeremy.morse
Add x86 REQUIRES to tests from 2c5f3d54c5ee / D85746
The file was modifiedllvm/test/DebugInfo/MIR/InstrRef/no-duplicates.mir
The file was modifiedllvm/test/DebugInfo/MIR/InstrRef/no-metainstrs.mir
The file was modifiedllvm/test/DebugInfo/MIR/InstrRef/instr-ref-roundtrip.mir
Commit 3291041641febf73ba98f074a946fe92331de90b by joshisameeran17
[Flang][OpenMP] Fix issue in only a single nowait clause can appear on a sections directive.

The OpenMP 5.0 standard restricts nowait clause to appear only once on sections
directive.
See OpenMP 5.0
  - 2.8.1
  - point 3 in restrictions.

Added a test with fix.

Reviewed By: DavidTruby

Differential Revision: https://reviews.llvm.org/D88556
The file was modifiedflang/lib/Semantics/check-omp-structure.cpp
The file was modifiedflang/test/Semantics/omp-sections01.f90
The file was modifiedflang/test/Semantics/omp-clause-validity01.f90
Commit 9b4db7f73331986768e113140e5b929b9cdcab33 by llvm-dev
[InstCombine] Add undef funnel shift amount test coverage
The file was modifiedllvm/test/Transforms/InstCombine/fsh.ll
Commit af5be38a01031ed3d9a9690c4ed881fbe781111f by nicolas.vasilache
[mlir][Linalg] Make a Linalg CodegenStrategy available.

This revision adds a programmable codegen strategy from linalg based on staged rewrite patterns. Testing is exercised on a simple linalg.matmul op.

Differential Revision: https://reviews.llvm.org/D89374
The file was addedmlir/test/Dialect/Linalg/codegen-strategy.mlir
The file was addedmlir/test/lib/Transforms/TestLinalgCodegenStrategy.cpp
The file was modifiedmlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
The file was addedmlir/lib/Dialect/Linalg/Transforms/CodegenStrategy.cpp
The file was modifiedmlir/lib/Conversion/VectorToSCF/CMakeLists.txt
The file was modifiedmlir/test/lib/Transforms/CMakeLists.txt
The file was addedmlir/include/mlir/Dialect/Linalg/Transforms/CodegenStrategy.h
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
Commit 630d2647986aa6d672dce184460d7ca3349eb006 by Tim Northover
Analysis: only query size of sized objects.

Recently we started looking into sret parameters, though the issue could crop
up elsewhere. If the pointee type is opaque, we should not try to compute its
size because that leads to an assertion failure.
The file was addedllvm/test/Transforms/InstCombine/object-size-opaque.ll
The file was modifiedllvm/lib/Analysis/MemoryBuiltins.cpp
Commit 9b3c2a72e4cb3b0ae27f87064c11f728452b2af9 by aqjune
[ValueTracking] Use assume's noundef operand bundle

This patch updates `isGuaranteedNotToBeUndefOrPoison` to use `llvm.assume`'s `noundef` operand bundle.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D89219
The file was modifiedllvm/include/llvm/Analysis/ValueTracking.h
The file was modifiedllvm/unittests/Analysis/ValueTrackingTest.cpp
The file was modifiedllvm/lib/Transforms/Utils/CanonicalizeFreezeInLoops.cpp
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
The file was modifiedllvm/lib/Transforms/Scalar/JumpThreading.cpp
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
The file was modifiedllvm/lib/Transforms/Scalar/DivRemPairs.cpp
The file was modifiedllvm/lib/Transforms/Scalar/SCCP.cpp
The file was modifiedllvm/test/Transforms/Inline/arg-attr-propagation.ll
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
The file was modifiedllvm/lib/Transforms/Utils/AssumeBundleBuilder.cpp
Commit 01549dd976faa93dcf18d7363ccf8b2509833f7c by carl.ritson
[AMDGPU] Base getSubRegFromChannel on TableGen data

Generate (at runtime) the table used to drive getSubRegFromChannel,
base on AMDGPUSubRegIdxRanges from TableGen data.
The is a step closer to it being staticly generated by TableGen and
allows getSubRegFromChannel handle all bitwidths in the mean time.

Reviewed By: rampitec, arsenm, foad

Differential Revision: https://reviews.llvm.org/D89217
The file was modifiedllvm/lib/Target/AMDGPU/SIRegisterInfo.h
The file was modifiedllvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
Commit 3fcca804b2916b68d34523e9f88c77272a256d77 by hokein.wu
[clangd] Refine recoveryAST flags in clangd

so that we could start experiment for C.

Previously, these flags in clangd were only meaningful for C++. We need
to flip them for C, this patch repurpose these flags.

- if true, just set it.
- if false, just respect the value in clang.

this would allow us to keep flags on for C++, and optionally flip them on for C.

Differential Revision: https://reviews.llvm.org/D89233
The file was modifiedclang-tools-extra/clangd/ClangdServer.h
The file was modifiedclang-tools-extra/clangd/unittests/TestTU.cpp
The file was modifiedclang-tools-extra/clangd/unittests/FindTargetTests.cpp
The file was modifiedclang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
The file was modifiedclang-tools-extra/clangd/tool/ClangdMain.cpp
The file was modifiedclang-tools-extra/clangd/Compiler.cpp
Commit dd965711c9f0e4b6e1dc9b465fe049c38e05d5aa by gabor.marton
[ASTImporter] Fix crash caused by unimported type of FromatAttr

During the import of FormatAttrs we forgot to import the type (e.g
`__scanf__`) of the attribute. This caused a segfault when we wanted to
traverse the AST (e.g. by the dump() method).

Differential Revision: https://reviews.llvm.org/D89319
The file was addedclang/test/ASTMerge/attr/Inputs/FormatAttr.cpp
The file was modifiedclang/unittests/AST/ASTImporterTest.cpp
The file was addedclang/test/ASTMerge/attr/testFormatAttr.cpp
The file was modifiedclang/lib/AST/ASTImporter.cpp
Commit 73c6beb2f7053fe8b5150072c2b5cd930de38a22 by gabor.marton
[ASTImporter] Fix crash caused by unset AttributeSpellingListIndex

During the import of attributes we forgot to set the spelling list
index. This caused a segfault when we wanted to traverse the AST
(e.g. by the dump() method).

Differential Revision: https://reviews.llvm.org/D89318
The file was modifiedclang/unittests/AST/ASTImporterTest.cpp
The file was addedclang/test/ASTMerge/attr/testRestrictAttr.cpp
The file was modifiedclang/lib/AST/ASTImporter.cpp
The file was addedclang/test/ASTMerge/attr/Inputs/RestrictAttr.cpp
Commit 82a71822a54d76c62bf730d8c0e8e86d68c60159 by kadircet
[clangd] Disable extract variable for RHS of assignments

Differential Revision: https://reviews.llvm.org/D89307
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp
The file was modifiedclang-tools-extra/clangd/unittests/TweakTests.cpp
Commit cde06f783ce9811ed5e6d4c9a4e803b76842eccc by sguelton
[flang] Make flang build compatible with LLVM dylib

Harmonize usage of LLVM components througout Flang.

Explicit LLVM Libs where used across several CMakeFIles, which led to
incompatibilities with LLVM shlibs.
Fortunately, the LLVM component system can be relied on to harmoniously handle
both cases.

Differential Revision: https://reviews.llvm.org/D87893
The file was modifiedflang/unittests/CMakeLists.txt
The file was modifiedflang/CMakeLists.txt
The file was modifiedflang/tools/flang-driver/CMakeLists.txt
The file was modifiedflang/unittests/Evaluate/CMakeLists.txt
The file was modifiedflang/cmake/modules/AddFlang.cmake
The file was modifiedflang/unittests/Decimal/CMakeLists.txt
The file was modifiedflang/unittests/Runtime/CMakeLists.txt
Commit 6bb123b819c61c61197ec2ba54ceb6d16e9121cf by pavel
[lldb] Modernize PseudoTerminal::OpenFirstAvailablePrimary

replace char*+length combo with llvm::Error
The file was modifiedlldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
The file was modifiedlldb/source/Host/common/ProcessLaunchInfo.cpp
The file was modifiedlldb/source/Host/common/PseudoTerminal.cpp
The file was modifiedlldb/unittests/Host/MainLoopTest.cpp
The file was modifiedlldb/include/lldb/Host/PseudoTerminal.h
The file was modifiedlldb/unittests/Editline/CMakeLists.txt
The file was modifiedlldb/unittests/Editline/EditlineTest.cpp
Commit 2c4226f8ac2c925d7e1d59d1de1660cd1dd63f31 by pavel
[lldb-server][linux] Add ability to allocate memory

This patch adds support for the _M and _m gdb-remote packets, which
(de)allocate memory in the inferior. This works by "injecting" a
m(un)map syscall into the inferior. This consists of:
- finding an executable page of memory
- writing the syscall opcode to it
- setting up registers according to the os syscall convention
- single stepping over the syscall

The advantage of this approach over calling the mmap function is that
this works even in case the mmap function is buggy or unavailable. The
disadvantage is it is more platform-dependent, which is why this patch
only works on X86 (_32 and _64) right now. Adding support for other
linux architectures should be easy and consist of defining the
appropriate syscall constants. Adding support for other OSes depends on
the its ability to do a similar trick.

Differential Revision: https://reviews.llvm.org/D89124
The file was modifiedlldb/source/Plugins/Process/FreeBSDRemote/NativeProcessFreeBSD.cpp
The file was modifiedlldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
The file was modifiedlldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.h
The file was modifiedlldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
The file was modifiedlldb/test/API/lang/c/stepping/TestStepAndBreakpoints.py
The file was addedlldb/test/Shell/Expr/nodefaultlib.cpp
The file was modifiedlldb/unittests/TestingSupport/Host/NativeProcessTestUtils.h
The file was modifiedlldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
The file was modifiedlldb/source/Plugins/Process/FreeBSDRemote/NativeProcessFreeBSD.h
The file was modifiedlldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
The file was addedlldb/test/API/tools/lldb-server/memory-allocation/TestGdbRemoteMemoryAllocation.py
The file was modifiedlldb/source/Plugins/Process/Linux/NativeProcessLinux.h
The file was modifiedlldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
The file was modifiedlldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
The file was modifiedlldb/include/lldb/Host/common/NativeProcessProtocol.h
The file was modifiedlldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
The file was addedlldb/test/API/tools/lldb-server/memory-allocation/Makefile
The file was addedlldb/test/API/tools/lldb-server/memory-allocation/main.c
Commit 7ee6c402474a2f5fd21c403e7529f97f6362fdb3 by lebedev.ri
Revert "Reland "[SCEV] Model ptrtoint(SCEVUnknown) cast not as unknown, but as zext/trunc/self of SCEVUnknown"" and it's follow-ups

While we haven't encountered an earth-shattering problem with this yet,
by now it is pretty evident that trying to model the ptr->int cast
implicitly leads to having to update every single place that assumed
no such cast could be needed. That is of course the wrong approach.

Let's back this out, and re-attempt with some another approach,
possibly one originally suggested by Eli Friedman in
https://bugs.llvm.org/show_bug.cgi?id=46786#c20
which should hopefully spare us this pain and more.

This reverts commits 1fb610429308a7c29c5065f5cc35dcc3fd69c8b1,
7324616660fc0995fa8c166e3c392361222d5dbc,
aaafe350bb65dfc24c2cdad4839059ac81899fbe,
e92a8e0c743f83552fac37ecf21e625ba3a4b11e.

I've kept&improved the tests though.
The file was modifiedllvm/test/CodeGen/X86/ragreedy-hoist-spill.ll
The file was modifiedllvm/test/Analysis/ScalarEvolution/ptrtoint-constantexpr-loop.ll
The file was modifiedllvm/test/Analysis/ScalarEvolution/ptrtoint.ll
The file was modifiedllvm/unittests/Analysis/IVDescriptorsTest.cpp
The file was modifiedllvm/lib/Transforms/Utils/SimplifyIndVar.cpp
The file was modifiedllvm/test/CodeGen/ARM/lsr-undef-in-binop.ll
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/test/Analysis/ScalarEvolution/no-wrap-add-exprs.ll
The file was modifiedpolly/test/Isl/CodeGen/scev_looking_through_bitcasts.ll
The file was modifiedllvm/test/Analysis/ScalarEvolution/add-expr-pointer-operand-sorting.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll
Commit e6b4179c5d282905a8ad17c57153b991c42d1126 by hokein.wu
Fix a broken build for gcc <= 7.1

we need add a "this->" inside the lambda body to workaround it. Rewrite
it to normal for-range loop.
The file was modifiedclang/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp
Commit c4e7857d4eaccbd23cdc155486d5c276c8d66ebd by jeremy.morse
[DebugInstrRef] Create DBG_INSTR_REFs in SelectionDAG

When given the -experimental-debug-variable-locations option (via -Xclang
or to llc), have SelectionDAG generate DBG_INSTR_REF instructions instead
of DBG_VALUE. For now, this only happens in a limited circumstance: when
the value referred to is not a PHI and is defined in the current block.
Other situations introduce interesting problems, addresed in later patches.

Practically, this patch hooks into InstrEmitter and if it can find a
defining instruction for a value, gives it an instruction number, and
points the DBG_INSTR_REF at that <instr, operand> pair.

Differential Revision: https://reviews.llvm.org/D85747
The file was addedllvm/test/DebugInfo/X86/instr-ref-selectiondag.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp