SuccessChanges

Summary

  1. [lldb] Modernize PseudoTerminal::OpenFirstAvailablePrimary (details)
  2. [lldb-server][linux] Add ability to allocate memory (details)
  3. Revert "Reland "[SCEV] Model ptrtoint(SCEVUnknown) cast not as unknown, but as zext/trunc/self of SCEVUnknown"" and it's follow-ups (details)
  4. Fix a broken build for gcc <= 7.1 (details)
  5. [DebugInstrRef] Create DBG_INSTR_REFs in SelectionDAG (details)
  6. [SystemZ] Bugfix in SystemZVectorConstantInfo (details)
  7. [InstCombine] visitCallInst - retain undefs in vector funnel shift amounts (details)
  8. [mlir][Linalg] Add missing dependency (details)
  9. [mlir] expand the legal floating-point types in the LLVM IR dialect type check (details)
  10. Fix `-Wparentheses` warnings. NFC. (details)
  11. [libc++] Remove signal-based checkpoints in libc++ tests (details)
  12. [flang] Rework host runtime folding and enable REAL(2) folding with it. (details)
  13. [SVE] Lower fixed length VECREDUCE_FADD operation (details)
  14. [lldb] Remove bogus ProcessMonitor forward-decls (details)
  15. [lldb] Fix TestGdbRemoteMemoryAllocation on windows (details)
  16. [profile] Remove useless msync when dumping gcda files (details)
  17. [InstCombine] Add m_SpecificIntAllowUndef pattern matcher (details)
  18. Fix conjuntion of -Werror,-Wsuggest-override with google/benchmark (details)
  19. [mlir][vulkan-runner] Fix buffer usage flags (details)
  20. Fix an apparent typo. `assert()` must not contain side-effects. NFC. (details)
Commit 6bb123b819c61c61197ec2ba54ceb6d16e9121cf by pavel
[lldb] Modernize PseudoTerminal::OpenFirstAvailablePrimary

replace char*+length combo with llvm::Error
The file was modifiedlldb/unittests/Host/MainLoopTest.cpp
The file was modifiedlldb/include/lldb/Host/PseudoTerminal.h
The file was modifiedlldb/source/Host/common/PseudoTerminal.cpp
The file was modifiedlldb/unittests/Editline/CMakeLists.txt
The file was modifiedlldb/source/Host/common/ProcessLaunchInfo.cpp
The file was modifiedlldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
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/NetBSD/NativeProcessNetBSD.cpp
The file was modifiedlldb/source/Plugins/Process/FreeBSDRemote/NativeProcessFreeBSD.h
The file was modifiedlldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
The file was modifiedlldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
The file was modifiedlldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
The file was addedlldb/test/API/tools/lldb-server/memory-allocation/Makefile
The file was addedlldb/test/Shell/Expr/nodefaultlib.cpp
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
The file was modifiedlldb/unittests/TestingSupport/Host/NativeProcessTestUtils.h
The file was modifiedlldb/source/Plugins/Process/FreeBSDRemote/NativeProcessFreeBSD.cpp
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
The file was modifiedlldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
The file was modifiedlldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
The file was modifiedlldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
The file was addedlldb/test/API/tools/lldb-server/memory-allocation/TestGdbRemoteMemoryAllocation.py
The file was addedlldb/test/API/tools/lldb-server/memory-allocation/main.c
The file was modifiedlldb/source/Plugins/Process/Linux/NativeProcessLinux.h
The file was modifiedlldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.h
The file was modifiedlldb/test/API/lang/c/stepping/TestStepAndBreakpoints.py
The file was modifiedlldb/include/lldb/Host/common/NativeProcessProtocol.h
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/Analysis/ScalarEvolution/no-wrap-add-exprs.ll
The file was modifiedllvm/unittests/Analysis/IVDescriptorsTest.cpp
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/test/Analysis/ScalarEvolution/ptrtoint.ll
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/CodeGen/ARM/lsr-undef-in-binop.ll
The file was modifiedllvm/test/Analysis/ScalarEvolution/add-expr-pointer-operand-sorting.ll
The file was modifiedllvm/lib/Transforms/Utils/SimplifyIndVar.cpp
The file was modifiedpolly/test/Isl/CodeGen/scev_looking_through_bitcasts.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 modifiedllvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
The file was addedllvm/test/DebugInfo/X86/instr-ref-selectiondag.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
Commit 6756d43af97ea39722af14504b286e302955c6b5 by paulsson
[SystemZ] Bugfix in SystemZVectorConstantInfo

In order to correctly load an all-ones FP NaN value into a floating point
register with a VGBM, the analyzed 32/64 FP bits must first be shifted left
(into element 0 of the vector register).

SystemZVectorConstantInfo has so far relied on element replication which has
bypassed the need to do this shift, but now it is clear that this must be
done in order to handle NaNs.

Review: Ulrich Weigand

Differential Revision: https://reviews.llvm.org/D89389
The file was modifiedllvm/lib/Target/SystemZ/SystemZISelLowering.cpp
The file was modifiedllvm/test/CodeGen/SystemZ/fp-const-12.ll
The file was modifiedllvm/test/CodeGen/SystemZ/vector-constrained-fp-intrinsics.ll
Commit 25a97c3a43d7bc469ec67dd4e901a507b9b11116 by llvm-dev
[InstCombine] visitCallInst - retain undefs in vector funnel shift amounts

By always performing a modulo on the shift amount constants this was causing undef amounts being replaced with zero, meaning we were losing funnel shift by splat (with undef) patterns.

Tweaked the shift amount bounds check to support (passthrough) undefs, and use Constant::mergeUndefsWith to preserve the undefs after folding.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
The file was modifiedllvm/test/Transforms/InstCombine/rotate.ll
The file was modifiedllvm/test/Transforms/InstCombine/funnel.ll
Commit d38277dbcf38826dde6dff39cd9854f41eab6357 by nicolas.vasilache
[mlir][Linalg] Add missing dependency
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
Commit 3ea4ccd857c3ab83aff9dcceeb82c33681658a32 by eschweitz
[mlir] expand the legal floating-point types in the LLVM IR dialect type check

This patch adds a couple missing LLVM IR dialect floating point types to
the legality check.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D89350
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMTypes.h
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
Commit b21ad3b66bce942ee6e0f5b1fcfdea31928005a7 by michael.hliao
Fix `-Wparentheses` warnings. NFC.
The file was modifiedclang/lib/Sema/SemaExpr.cpp
Commit 41d85fe0e168bf1e846e582a95f82ff8ecaf7c28 by Louis Dionne
[libc++] Remove signal-based checkpoints in libc++ tests

While this adds some convenience to the test suite, it prevents the tests
using these checkpoints from being used on systems where signals are not
available, such as some embedded systems. It will also prevent these tests
from being constexpr-friendly once e.g. std::map is made constexpr, due
to the use of statics.

Instead, one can always use a debugger to figure out exactly where a
test is failing when that isn't clear from the log output without
checkpoints.
The file was removedlibcxx/test/support/assert_checkpoint.h
The file was modifiedlibcxx/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp
The file was modifiedlibcxx/test/support/debug_mode_helper.h
The file was modifiedlibcxx/test/std/containers/map_allocator_requirement_test_templates.h
The file was modifiedlibcxx/test/support/container_debug_tests.h
The file was modifiedlibcxx/test/libcxx/debug/containers/db_string.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp
The file was modifiedlibcxx/test/std/containers/set_allocator_requirement_test_templates.h
The file was modifiedlibcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp
Commit 94d9a4fd886d6760a95fff89ad5c00264e18de4f by jperier
[flang] Rework host runtime folding and enable REAL(2) folding with it.

- Rework the host runtime table so that it is constexpr to avoid
  having to construct it and to store/propagate it.
- Make the interface simpler (remove many templates and a file)
- Enable 16bits float folding using 32bits float host runtime
- Move StaticMultimapView into its own header to use it for host
  folding

Reviewed By: klausler, PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D88981
The file was removedflang/lib/Evaluate/intrinsics-library-templates.h
The file was addedflang/include/flang/Common/static-multimap-view.h
The file was modifiedflang/lib/Evaluate/fold-implementation.h
The file was modifiedflang/include/flang/Evaluate/common.h
The file was modifiedflang/unittests/Evaluate/folding.cpp
The file was modifiedflang/lib/Evaluate/host.h
The file was modifiedflang/test/Evaluate/folding02.f90
The file was modifiedflang/include/flang/Evaluate/intrinsics-library.h
The file was modifiedflang/lib/Evaluate/fold-complex.cpp
The file was modifiedflang/lib/Evaluate/fold-real.cpp
The file was modifiedflang/lib/Evaluate/intrinsics-library.cpp
The file was modifiedflang/runtime/pgmath.h.inc
The file was modifiedflang/lib/Lower/IntrinsicCall.cpp
Commit 421f1b7294ef4dbe8f02d83fcd3b9eb604465bf5 by mcinally
[SVE] Lower fixed length VECREDUCE_FADD operation

Differential Revision: https://reviews.llvm.org/D89263
The file was modifiedllvm/test/CodeGen/AArch64/sve-fixed-length-fp-reduce.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Commit ea3a547f0be20d86b041778ae8e2779f2031f714 by pavel
[lldb] Remove bogus ProcessMonitor forward-decls

This class is not used in those files.
The file was modifiedlldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h
The file was modifiedlldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h
The file was modifiedlldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h
The file was modifiedlldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h
The file was modifiedlldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h
The file was modifiedlldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.h
Commit 36f22cd28d5e57c197ea374048a06dbdc5a08214 by pavel
[lldb] Fix TestGdbRemoteMemoryAllocation on windows

It appears that memory allocation actually works on windows (but it was
not fully wired up before 2c4226f8).
The file was modifiedlldb/test/API/tools/lldb-server/memory-allocation/TestGdbRemoteMemoryAllocation.py
Commit 5502bd66bb97f7cf3888a869b73091c51fdbba4c by calixte.denizet
[profile] Remove useless msync when dumping gcda files

Summary:
According the mmap man page (https://man7.org/linux/man-pages/man2/mmap.2.html) is only required to precisely control updates, so we can safely remove it.
Since gcda files are dumped just before to call exec** functions, dump need to be fast.
On my computer, Firefox built with --coverage needs ~1min40 to display something and in removing msync it needs ~8s.

Reviewers: void

Subscribers: #sanitizers, marco-c, sylvestre.ledru

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D81060
The file was modifiedcompiler-rt/lib/profile/GCDAProfiling.c
Commit 89a2a478708fb8821fb88ef3053e8d6bb5b59e08 by llvm-dev
[InstCombine] Add m_SpecificIntAllowUndef pattern matcher

m_SpecificInt doesn't accept undef elements in a vector splat value - tweak specific_intval to optionally allow undefs and add the m_SpecificIntAllowUndef variants.

Allows us to remove the m_APIntAllowUndef + comparison hack inside matchFunnelShift
The file was modifiedllvm/include/llvm/IR/PatternMatch.h
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
Commit cba533febc1e8a82f98f7ff5e0d083f57f865d26 by gchatelet
Fix conjuntion of -Werror,-Wsuggest-override with google/benchmark
The file was modifiedlibc/benchmarks/CMakeLists.txt
Commit acb7827d6217000541c5c0ce2b03049e4f49d23f by kevin.petit
[mlir][vulkan-runner] Fix buffer usage flags

The buffers are used as source or destination of transfer commands
so always add VK_BUFFER_USAGE_TRANSFER_{DST,SRC}_BIT to their usage
flags.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
The file was modifiedmlir/tools/mlir-vulkan-runner/VulkanRuntime.cpp
Commit ae40d2858e206eaa07ea5c2a032b3c6c50918d1b by michael.hliao
Fix an apparent typo. `assert()` must not contain side-effects. NFC.
The file was modifiedllvm/lib/CodeGen/StackMaps.cpp