platform/upstream/llvm.git
4 years ago[LegalizeTypes][X86] When splitting a vselect for type legalization, don't split...
Craig Topper [Sun, 6 Oct 2019 18:43:03 +0000 (18:43 +0000)]
[LegalizeTypes][X86] When splitting a vselect for type legalization, don't split a setcc condition if the setcc input is legal and vXi1 conditions are supported

Summary: The VSELECT splitting code tries to split a setcc input as well. But on avx512 where mask registers are well supported it should be better to just split the mask and use a single compare.

Reviewers: RKSimon, spatel, efriedma

Reviewed By: spatel

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68359

llvm-svn: 373863

4 years ago[Sema] Avoids an assertion failure when an invalid conversion declaration is used
Richard Smith [Sun, 6 Oct 2019 18:40:59 +0000 (18:40 +0000)]
[Sema] Avoids an assertion failure when an invalid conversion declaration is used

Summary:
When using a user-defined conversion function template with a deduced return type the compiler gives a set of warnings:
```
bug.cc:252:44: error: cannot specify any part of a return type in the declaration of a conversion function; use an alias template to declare a conversion to 'auto (Ts &&...) const'
  template <typename... Ts> operator auto()(Ts &&... xs) const;
                                           ^~~~~~~~~~~~~~~~~~~
bug.cc:252:29: error: conversion function cannot convert to a function type
  template <typename... Ts> operator auto()(Ts &&... xs) const;
                            ^
error: pointer to function type cannot have 'const' qualifier
```
after which it triggers an assertion failure. It seems the last error is incorrect and doesn't have any location information. This patch stops the compilation after the second warning.

Fixes bug 31422.

Patch by Mark de Wever!

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: bbannier, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D64820

llvm-svn: 373862

4 years agogn build: make windows build less broken
Nico Weber [Sun, 6 Oct 2019 18:11:53 +0000 (18:11 +0000)]
gn build: make windows build less broken

llvm-svn: 373858

4 years ago[LOOPGUARD] Remove asserts in getLoopGuardBranch
Whitney Tsang [Sun, 6 Oct 2019 16:39:43 +0000 (16:39 +0000)]
[LOOPGUARD] Remove asserts in getLoopGuardBranch
Summary: The assertion in getLoopGuardBranch can be a 'return nullptr'
under if condition.
Authored By: DTharun
Reviewer: Whitney, fhahn
Reviewed By: Whitney, fhahn
Subscribers: fhahn, llvm-commits
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D66084

llvm-svn: 373857

4 years ago[Docs] Removes Programming Documentation page
DeForest Richards [Sun, 6 Oct 2019 16:10:11 +0000 (16:10 +0000)]
[Docs] Removes Programming Documentation page

Removes Programming Documentation page. Also moves existing topics on Programming Documentation page to User Guides and Reference pages.

llvm-svn: 373856

4 years ago[X86][SSE] resolveTargetShuffleInputs - call getTargetShuffleInputs instead of using...
Simon Pilgrim [Sun, 6 Oct 2019 15:42:25 +0000 (15:42 +0000)]
[X86][SSE] resolveTargetShuffleInputs - call getTargetShuffleInputs instead of using setTargetShuffleZeroElements directly. NFCI.

llvm-svn: 373855

4 years ago[Docs] Adds new Getting Started/Tutorials page
DeForest Richards [Sun, 6 Oct 2019 15:36:37 +0000 (15:36 +0000)]
[Docs] Adds new Getting Started/Tutorials page

Adds a new page for Getting Started/Tutorials topics. Also updates existing topic categories on the User Guides and Reference pages.

llvm-svn: 373854

4 years agoRevert [DAGCombine] Match more patterns for half word bswap
Sanjay Patel [Sun, 6 Oct 2019 15:27:34 +0000 (15:27 +0000)]
Revert [DAGCombine] Match more patterns for half word bswap

This reverts r373850 (git commit 25ba49824d2d4f2347b4a7cb1623600a76ce9433)

This patch appears to cause multiple codegen regression test failures - http://lab.llvm.org:8011/builders/clang-cmake-armv7-quick/builds/10680

llvm-svn: 373853

4 years ago[NFC] Replace 'isDarwin' with 'IsDarwin'
Xiangling Liao [Sun, 6 Oct 2019 14:44:22 +0000 (14:44 +0000)]
[NFC] Replace 'isDarwin' with 'IsDarwin'

Summary: Replace 'isDarwin' with 'IsDarwin' based on LLVM naming convention.

Differential Revision: https://reviews.llvm.org/D68336

llvm-svn: 373852

4 years ago[InstCombine] fold fneg disguised as select+fmul (PR43497)
Sanjay Patel [Sun, 6 Oct 2019 14:15:48 +0000 (14:15 +0000)]
[InstCombine] fold fneg disguised as select+fmul (PR43497)

Extends rL373230 and solves the motivating bug (although in a narrow way):
https://bugs.llvm.org/show_bug.cgi?id=43497

llvm-svn: 373851

4 years ago[DAGCombine] Match more patterns for half word bswap
Amaury Sechet [Sun, 6 Oct 2019 14:14:55 +0000 (14:14 +0000)]
[DAGCombine] Match more patterns for half word bswap

Summary: It ensures that the bswap is generated even when a part of the subtree already matches a bswap transform.

Reviewers: craig.topper, efriedma, RKSimon, lebedev.ri

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68250

llvm-svn: 373850

4 years ago[X86][AVX] combineExtractSubvector - merge duplicate variables. NFCI.
Simon Pilgrim [Sun, 6 Oct 2019 13:25:10 +0000 (13:25 +0000)]
[X86][AVX] combineExtractSubvector - merge duplicate variables. NFCI.

llvm-svn: 373849

4 years ago[InstCombine] add fast-math-flags for better test coverage; NFC
Sanjay Patel [Sun, 6 Oct 2019 13:19:05 +0000 (13:19 +0000)]
[InstCombine] add fast-math-flags for better test coverage; NFC

llvm-svn: 373848

4 years ago[InstCombine] don't assume 'inbounds' for bitcast pointer to GEP transform (PR43501)
Sanjay Patel [Sun, 6 Oct 2019 13:08:08 +0000 (13:08 +0000)]
[InstCombine] don't assume 'inbounds' for bitcast pointer to GEP transform (PR43501)

https://bugs.llvm.org/show_bug.cgi?id=43501
We can't declare a GEP 'inbounds' in general. But we may salvage that information if
we have known dereferenceable bytes on the source pointer.

Differential Revision: https://reviews.llvm.org/D68244

llvm-svn: 373847

4 years ago[X86][SSE] matchVectorShuffleAsBlend - use Zeroable element mask directly.
Simon Pilgrim [Sun, 6 Oct 2019 12:38:38 +0000 (12:38 +0000)]
[X86][SSE] matchVectorShuffleAsBlend - use Zeroable element mask directly.

We can make use of the Zeroable mask to indicate which elements we can safely set to zero instead of creating a target shuffle mask on the fly.

This allows us to remove createTargetShuffleMask.

This is part of the work to fix PR43024 and allow us to use SimplifyDemandedElts to simplify shuffle chains - we need to get to a point where the target shuffle masks isn't adjusted by its source inputs in setTargetShuffleZeroElements but instead we cache them in a parallel Zeroable mask.

llvm-svn: 373846

4 years ago[X86] Enable AVX512BW for memcmp()
David Zarzycki [Sun, 6 Oct 2019 10:25:52 +0000 (10:25 +0000)]
[X86] Enable AVX512BW for memcmp()

llvm-svn: 373845

4 years ago[clang-format][docs] Fix the Google C++ and Chromium style guide URLs
Paul Hoad [Sun, 6 Oct 2019 09:37:58 +0000 (09:37 +0000)]
[clang-format][docs] Fix the Google C++ and Chromium style guide URLs

Summary: The Google C++ and Chromium style guides are broken in the clang-format docs. This patch updates them.

Reviewers: djasper, MyDeveloperDay

Reviewed By: MyDeveloperDay

Subscribers: cfe-commits

Tags: #clang

Patch by: m4tx

Differential Revision: https://reviews.llvm.org/D61256

llvm-svn: 373844

4 years agoAMDGPU/GlobalISel: Fall back on weird G_EXTRACT offsets
Matt Arsenault [Sun, 6 Oct 2019 01:41:22 +0000 (01:41 +0000)]
AMDGPU/GlobalISel: Fall back on weird G_EXTRACT offsets

llvm-svn: 373842

4 years agoAMDGPU/GlobalISel: RegBankSelect mul24 intrinsics
Matt Arsenault [Sun, 6 Oct 2019 01:37:39 +0000 (01:37 +0000)]
AMDGPU/GlobalISel: RegBankSelect mul24 intrinsics

llvm-svn: 373841

4 years agoAMDGPU/GlobalISel: RegBankSelect DS GWS intrinsics
Matt Arsenault [Sun, 6 Oct 2019 01:37:38 +0000 (01:37 +0000)]
AMDGPU/GlobalISel: RegBankSelect DS GWS intrinsics

llvm-svn: 373840

4 years agoAMDGPU/GlobalISel: Lower G_ATOMIC_CMPXCHG_WITH_SUCCESS
Matt Arsenault [Sun, 6 Oct 2019 01:37:37 +0000 (01:37 +0000)]
AMDGPU/GlobalISel: Lower G_ATOMIC_CMPXCHG_WITH_SUCCESS

llvm-svn: 373839

4 years agoGlobalISel: Partially implement lower for G_EXTRACT
Matt Arsenault [Sun, 6 Oct 2019 01:37:35 +0000 (01:37 +0000)]
GlobalISel: Partially implement lower for G_EXTRACT

Turn into shift and truncate. Doesn't yet handle pointers.

llvm-svn: 373838

4 years agoAMDGPU/GlobalISel: Fix RegBankSelect for sendmsg intrinsics
Matt Arsenault [Sun, 6 Oct 2019 01:37:34 +0000 (01:37 +0000)]
AMDGPU/GlobalISel: Fix RegBankSelect for sendmsg intrinsics

This wasn't updated for the immarg handling change.

llvm-svn: 373837

4 years ago[FastISel] Copy the inline assembly dialect to the INLINEASM instruction.
Craig Topper [Sat, 5 Oct 2019 23:21:17 +0000 (23:21 +0000)]
[FastISel] Copy the inline assembly dialect to the INLINEASM instruction.

Fixes PR43575.

llvm-svn: 373836

4 years ago[X86][AVX] Push sign extensions of comparison bool results through bitops (PR42025)
Simon Pilgrim [Sat, 5 Oct 2019 20:49:34 +0000 (20:49 +0000)]
[X86][AVX] Push sign extensions of comparison bool results through bitops (PR42025)

As discussed on PR42025, with more complex boolean math we can end up with many truncations/extensions of the comparison results through each bitop.

This patch handles the cases introduced in combineBitcastvxi1 by pushing the sign extension through the AND/OR/XOR ops so its just the original SETCC ops that gets extended.

Differential Revision: https://reviews.llvm.org/D68226

llvm-svn: 373834

4 years ago[SLP] avoid reduction transform on patterns that the backend can load-combine
Sanjay Patel [Sat, 5 Oct 2019 18:03:58 +0000 (18:03 +0000)]
[SLP] avoid reduction transform on patterns that the backend can load-combine

I don't see an ideal solution to these 2 related, potentially large, perf regressions:
https://bugs.llvm.org/show_bug.cgi?id=42708
https://bugs.llvm.org/show_bug.cgi?id=43146

We decided that load combining was unsuitable for IR because it could obscure other
optimizations in IR. So we removed the LoadCombiner pass and deferred to the backend.
Therefore, preventing SLP from destroying load combine opportunities requires that it
recognizes patterns that could be combined later, but not do the optimization itself (
it's not a vector combine anyway, so it's probably out-of-scope for SLP).

Here, we add a scalar cost model adjustment with a conservative pattern match and cost
summation for a multi-instruction sequence that can probably be reduced later.
This should prevent SLP from creating a vector reduction unless that sequence is
extremely cheap.

In the x86 tests shown (and discussed in more detail in the bug reports), SDAG combining
will produce a single instruction on these tests like:

  movbe   rax, qword ptr [rdi]

or:

  mov     rax, qword ptr [rdi]

Not some (half) vector monstrosity as we currently do using SLP:

  vpmovzxbq       ymm0, dword ptr [rdi + 1] # ymm0 = mem[0],zero,zero,..
  vpsllvq ymm0, ymm0, ymmword ptr [rip + .LCPI0_0]
  movzx   eax, byte ptr [rdi]
  movzx   ecx, byte ptr [rdi + 5]
  shl     rcx, 40
  movzx   edx, byte ptr [rdi + 6]
  shl     rdx, 48
  or      rdx, rcx
  movzx   ecx, byte ptr [rdi + 7]
  shl     rcx, 56
  or      rcx, rdx
  or      rcx, rax
  vextracti128    xmm1, ymm0, 1
  vpor    xmm0, xmm0, xmm1
  vpshufd xmm1, xmm0, 78          # xmm1 = xmm0[2,3,0,1]
  vpor    xmm0, xmm0, xmm1
  vmovq   rax, xmm0
  or      rax, rcx
  vzeroupper
  ret

Differential Revision: https://reviews.llvm.org/D67841

llvm-svn: 373833

4 years ago[X86] lowerShuffleAsLanePermuteAndRepeatedMask - variable renames. NFCI.
Simon Pilgrim [Sat, 5 Oct 2019 16:08:30 +0000 (16:08 +0000)]
[X86] lowerShuffleAsLanePermuteAndRepeatedMask - variable renames. NFCI.

Rename some variables to match lowerShuffleAsRepeatedMaskAndLanePermute - prep work toward adding some equivalent sublane functionality.

llvm-svn: 373832

4 years agoTry to fix sphinx indentation error
Simon Pilgrim [Sat, 5 Oct 2019 16:08:17 +0000 (16:08 +0000)]
Try to fix sphinx indentation error

llvm-svn: 373831

4 years ago[SelectionDAG] Add tests for LKK algorithm
David Bolvansky [Sat, 5 Oct 2019 14:29:25 +0000 (14:29 +0000)]
[SelectionDAG] Add tests for LKK algorithm

Added some tests testing urem and srem operations with a constant divisor.

Patch by TG908 (Tim Gymnich)

Differential Revision: https://reviews.llvm.org/D68421

llvm-svn: 373830

4 years agoRewriteObjC - silence static analyzer getAs<> null dereference warnings. NFCI.
Simon Pilgrim [Sat, 5 Oct 2019 13:42:14 +0000 (13:42 +0000)]
RewriteObjC - silence static analyzer getAs<> null dereference warnings. NFCI.

The static analyzer is warning about potential null dereferences, but we should be able to use castAs<> directly and if not assert will fire for us.

llvm-svn: 373829

4 years ago[Diagnostics] Highlight expr's source range for -Wbool-operation
David Bolvansky [Sat, 5 Oct 2019 13:28:15 +0000 (13:28 +0000)]
[Diagnostics] Highlight expr's source range for -Wbool-operation

Warning message looks better; and GCC adds it too.

llvm-svn: 373828

4 years agoSemaTemplate - silence static analyzer getAs<> null dereference warnings. NFCI.
Simon Pilgrim [Sat, 5 Oct 2019 13:21:08 +0000 (13:21 +0000)]
SemaTemplate - silence static analyzer getAs<> null dereference warnings. NFCI.

The static analyzer is warning about potential null dereferences, but we should be able to use castAs<> directly and if not assert will fire for us.

llvm-svn: 373827

4 years agoTreeTransform - silence static analyzer getAs<> null dereference warnings. NFCI.
Simon Pilgrim [Sat, 5 Oct 2019 13:20:59 +0000 (13:20 +0000)]
TreeTransform - silence static analyzer getAs<> null dereference warnings. NFCI.

The static analyzer is warning about potential null dereferences, but we should be able to use castAs<> directly and if not assert will fire for us.

llvm-svn: 373826

4 years agoRemove redundant !HasDependentValue check. NFCI.
Simon Pilgrim [Sat, 5 Oct 2019 13:20:51 +0000 (13:20 +0000)]
Remove redundant !HasDependentValue check. NFCI.

Fixes cppcheck warning.

llvm-svn: 373825

4 years agoSemaStmt - silence static analyzer getAs<> null dereference warnings. NFCI.
Simon Pilgrim [Sat, 5 Oct 2019 13:20:42 +0000 (13:20 +0000)]
SemaStmt - silence static analyzer getAs<> null dereference warnings. NFCI.

The static analyzer is warning about potential null dereferences, but we should be able to use castAs<> directly and if not assert will fire for us.

llvm-svn: 373824

4 years agoBranchFolding - IsBetterFallthrough - assert non-null pointers. NFCI.
Simon Pilgrim [Sat, 5 Oct 2019 13:20:30 +0000 (13:20 +0000)]
BranchFolding - IsBetterFallthrough - assert non-null pointers. NFCI.

Silences static analyzer null dereference warnings.

llvm-svn: 373823

4 years ago[clang-format] SpacesInSquareBrackets should affect lambdas with parameters too
Paul Hoad [Sat, 5 Oct 2019 09:55:23 +0000 (09:55 +0000)]
[clang-format] SpacesInSquareBrackets should affect lambdas with parameters too

Summary:
This patch makes the `SpacesInSquareBrackets` setting also apply to C++ lambdas with parameters.

Looking through the revision history, it appears support for only array brackets was added, and lambda brackets were ignored. Therefore, I am inclined to think it was simply an omission, rather than a deliberate choice.

See https://bugs.llvm.org/show_bug.cgi?id=17887 and https://reviews.llvm.org/D4944.

Reviewers: MyDeveloperDay, reuk, owenpan

Reviewed By: MyDeveloperDay

Subscribers: cfe-commits

Patch by: mitchell-stellar

Tags: #clang-format, #clang

Differential Revision: https://reviews.llvm.org/D68473

llvm-svn: 373821

4 years ago[UnitTests] Try and pacify gcc-5
James Molloy [Sat, 5 Oct 2019 08:57:17 +0000 (08:57 +0000)]
[UnitTests] Try and pacify gcc-5

This looks like a defect in gcc-5 where it chooses a constexpr
constructor from the initializer-list that it considers to be explicit.

I've tried to reproduce but I can't install anything prior to gcc-6 easily
on my system, and that doesn't have the error. So this is speculative
pacification.

Reported by Steven Wan.

llvm-svn: 373820

4 years agoDo not install lit-cpuid
Sylvestre Ledru [Sat, 5 Oct 2019 08:22:40 +0000 (08:22 +0000)]
Do not install lit-cpuid

Summary:
AFAIK, lit-cpuid is used by the tests.
Installing it causes LLVMExports*.cmake files to depend
on this program.
It causes some serious packaging issues as it would means
that llvm-dev depends on lldb.

See:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=941082
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=941306

See also https://bugs.llvm.org/show_bug.cgi?id=43035
for a similar issue caused by
https://reviews.llvm.org/D56606

Reviewers: mgorny

Reviewed By: mgorny

Subscribers: delcypher, lldb-commits

Differential Revision: https://reviews.llvm.org/D68537

llvm-svn: 373819

4 years ago[NFCI] Slightly improve warning message
David Bolvansky [Sat, 5 Oct 2019 08:09:06 +0000 (08:09 +0000)]
[NFCI] Slightly improve warning message

llvm-svn: 373818

4 years ago[Diagnostics] Use Expr::isKnownToHaveBooleanValue() to check bitwise negation of...
David Bolvansky [Sat, 5 Oct 2019 08:02:11 +0000 (08:02 +0000)]
[Diagnostics] Use Expr::isKnownToHaveBooleanValue() to check bitwise negation of bool in languages without a bool type

Thanks for this advice, Richard Trieu!

llvm-svn: 373817

4 years agoExpose ProvidePositionalOption as a public API
Mehdi Amini [Sat, 5 Oct 2019 01:37:04 +0000 (01:37 +0000)]
Expose ProvidePositionalOption as a public API

The motivation is to reuse the key value parsing logic here to
parse instance specific pass options within the context of MLIR.
The primary functionality exposed is the "," splitting for
arrays and the logic for properly handling duplicate definitions
of a single flag.

Patch by: Parker Schuh <parkers@google.com>

Differential Revision: https://reviews.llvm.org/D68294

llvm-svn: 373815

4 years agoFix a *nasty* miscompile in experimental unordered atomic lowering
Philip Reames [Sat, 5 Oct 2019 00:32:10 +0000 (00:32 +0000)]
Fix a *nasty* miscompile in experimental unordered atomic lowering

This is an omission in rL371441.  Loads which happened to be unordered weren't being added to the PendingLoad set, and thus weren't be ordered w/respect to side effects which followed before the end of the block.

Included test case is how I spotted this.  We had an atomic load being folded into a using instruction after a fence that load was supposed to be ordered with.  I'm sure it showed up a bunch of other ways as well.

Spotted via manual inspecting of assembly differences in a corpus w/and w/o the new experimental mode.  Finding this with testing would have been "unpleasant".

llvm-svn: 373814

4 years ago[Test] Add a test case fo a missed oppurtunity in implicit null checking
Philip Reames [Fri, 4 Oct 2019 23:46:26 +0000 (23:46 +0000)]
[Test] Add a test case fo a missed oppurtunity in implicit null checking

llvm-svn: 373813

4 years ago[RISCV] Added missing ImmLeaf predicates
Ana Pazos [Fri, 4 Oct 2019 23:42:07 +0000 (23:42 +0000)]
[RISCV] Added missing ImmLeaf predicates

simm9_lsb0 and simm12_lsb0 operand types were missing predicates.

llvm-svn: 373812

4 years agoAdd a unittest to verify for assumption cache
Aditya Kumar [Fri, 4 Oct 2019 23:36:59 +0000 (23:36 +0000)]
Add a unittest to verify for assumption cache

Reviewers: vsk, tejohnson

Reviewed By: vsk

Differential Revision: https://reviews.llvm.org/D68095

llvm-svn: 373811

4 years ago[MachO] Reduce indentation further in ParseSymtab (NFC)
Jonas Devlieghere [Fri, 4 Oct 2019 23:09:55 +0000 (23:09 +0000)]
[MachO] Reduce indentation further in ParseSymtab (NFC)

llvm-svn: 373810

4 years ago[libc++] Guard cxx_experimental settings behind LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY
Alex Langford [Fri, 4 Oct 2019 23:08:20 +0000 (23:08 +0000)]
[libc++] Guard cxx_experimental settings behind LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY

If you explicitly set LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY to OFF, your
project will fail to configure because the cxx_experimental target
doesn't exist.

llvm-svn: 373809

4 years ago[libc++] Localize common build flags into a single CMake function
Louis Dionne [Fri, 4 Oct 2019 22:50:23 +0000 (22:50 +0000)]
[libc++] Localize common build flags into a single CMake function

Also, set those flags for the cxx_experimental target. Otherwise,
cxx_experimental doesn't build properly when neither the static nor
the shared library is compiled (yes, that is a weird setup).

llvm-svn: 373808

4 years agoInvalidate assumption cache before outlining.
Aditya Kumar [Fri, 4 Oct 2019 22:46:42 +0000 (22:46 +0000)]
Invalidate assumption cache before outlining.

Subscribers: llvm-commits

Tags: #llvm

Reviewers: compnerd, vsk, sebpop, fhahn, tejohnson

Reviewed by: vsk

Differential Revision: https://reviews.llvm.org/D68478

llvm-svn: 373807

4 years ago[libomptarget][nfc] Update remaining uint32 to use lanemask_t
Jon Chesterfield [Fri, 4 Oct 2019 22:30:28 +0000 (22:30 +0000)]
[libomptarget][nfc] Update remaining uint32 to use lanemask_t

Summary:
[libomptarget][nfc] Update remaining uint32 to use lanemask_t

Update a few functions in the API to use lanemask_t instead of i32. NFC for
nvptx. Also update the ActiveThreads type in DataSharingStateTy.
This removes a lot of #ifdef from the downsteam amdgcn implementation.

Reviewers: ABataev, jdoerfert, grokos, ronlieb, RaviNarayanaswamy

Subscribers: openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D68513

llvm-svn: 373806

4 years agoRevert [CodeGen] Do the Simple Early Return in block-placement pass to optimize the...
Reid Kleckner [Fri, 4 Oct 2019 22:24:21 +0000 (22:24 +0000)]
Revert [CodeGen] Do the Simple Early Return in block-placement pass to optimize the blocks

This reverts r371177 (git commit f879c6875563c0a8cd838f1e13b14dd33558f1f8)

It caused PR43566 by removing empty, address-taken MachineBasicBlocks.
Such blocks may have references from blockaddress or other operands, and
need more consideration to be removed.

See the PR for a test case to use when relanding.

llvm-svn: 373805

4 years ago[test] Run TestLaunchWithShellExpand with /bin/sh on POSIX.
Jonas Devlieghere [Fri, 4 Oct 2019 22:21:35 +0000 (22:21 +0000)]
[test] Run TestLaunchWithShellExpand with /bin/sh on POSIX.

Now that we do shell expansion on POSIX with the user's shel, this test
can potentially fail. This should ensure that we always use /bin/sh.

llvm-svn: 373804

4 years ago[MachO] Move nlist parsing into helper function (NFC)
Jonas Devlieghere [Fri, 4 Oct 2019 22:21:32 +0000 (22:21 +0000)]
[MachO] Move nlist parsing into helper function (NFC)

llvm-svn: 373803

4 years ago[InstCombine] Fold 'icmp eq/ne (?trunc (lshr/ashr %x, bitwidth(x)-1)), 0' -> 'icmp...
Roman Lebedev [Fri, 4 Oct 2019 22:16:22 +0000 (22:16 +0000)]
[InstCombine] Fold 'icmp eq/ne (?trunc (lshr/ashr %x, bitwidth(x)-1)), 0' -> 'icmp sge/slt %x, 0'

We do indeed already get it right in some cases, but only transitively,
with one-use restrictions. Since we only need to produce a single
comparison, it makes sense to match the pattern directly:
  https://rise4fun.com/Alive/kPg

llvm-svn: 373802

4 years ago[InstCombine] Right-shift shift amount reassociation with truncation (PR43564, PR42391)
Roman Lebedev [Fri, 4 Oct 2019 22:16:11 +0000 (22:16 +0000)]
[InstCombine] Right-shift shift amount reassociation with truncation (PR43564, PR42391)

Initially (D65380) i believed that if we have rightshift-trunc-rightshift,
we can't do any folding. But as it usually happens, i was wrong.

https://rise4fun.com/Alive/GEw
https://rise4fun.com/Alive/gN2O

In https://bugs.llvm.org/show_bug.cgi?id=43564 we happen to have
this very sequence, of two right shifts separated by trunc.
And "just" so that happens, we apparently can fold the pattern
if the total shift amount is either 0, or it's equal to the bitwidth
of the innermost widest shift - i.e. if we are left with only the
original sign bit. Which is exactly what is wanted there.

llvm-svn: 373801

4 years ago[NFC][InstCombine] Autogenerate shift.ll test
Roman Lebedev [Fri, 4 Oct 2019 22:15:57 +0000 (22:15 +0000)]
[NFC][InstCombine] Autogenerate shift.ll test

llvm-svn: 373800

4 years ago[NFC][InstCombine] Autogenerate icmp-shr-lt-gt.ll test
Roman Lebedev [Fri, 4 Oct 2019 22:15:49 +0000 (22:15 +0000)]
[NFC][InstCombine] Autogenerate icmp-shr-lt-gt.ll test

llvm-svn: 373799

4 years ago[NFC][InstCombine] Tests for bit test via highest sign-bit extract (w/ trunc) (PR43564)
Roman Lebedev [Fri, 4 Oct 2019 22:15:41 +0000 (22:15 +0000)]
[NFC][InstCombine] Tests for bit test via highest sign-bit extract (w/ trunc) (PR43564)

https://rise4fun.com/Alive/x5IS

llvm-svn: 373798

4 years ago[NFC][InstCombine] Tests for right-shift shift amount reassociation (w/ trunc) (PR435...
Roman Lebedev [Fri, 4 Oct 2019 22:15:32 +0000 (22:15 +0000)]
[NFC][InstCombine] Tests for right-shift shift amount reassociation (w/ trunc) (PR43564, PR42391)

https://rise4fun.com/Alive/GEw

llvm-svn: 373797

4 years agoAdd an off-by-default option to enable testing for gdb pretty printers.
Sterling Augustine [Fri, 4 Oct 2019 22:15:28 +0000 (22:15 +0000)]
Add an off-by-default option to enable testing for gdb pretty printers.

Summary:
The current version of the pretty printers are not python3 compatible,
so turn them off by default until sufficiently improved.

Reviewers: MaskRay, tamur

Subscribers: mgorny, christof, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68477

llvm-svn: 373796

4 years ago[debugserver] Don't link against Cocoa, it's not needed.
Davide Italiano [Fri, 4 Oct 2019 21:51:35 +0000 (21:51 +0000)]
[debugserver] Don't link against Cocoa, it's not needed.

<rdar://problem/55916729>

llvm-svn: 373795

4 years ago[lit] Use better name for "test in parallel" concept
Julian Lettner [Fri, 4 Oct 2019 21:40:20 +0000 (21:40 +0000)]
[lit] Use better name for "test in parallel" concept

In the past, lit used threads to run tests in parallel. Today we use
`multiprocessing.Pool`, which uses processes. Let's stay more abstract
and use "worker" everywhere.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D68475

llvm-svn: 373794

4 years agoUse named constant to indicate all lanes, to handle 32 and 64 wide architectures
Jon Chesterfield [Fri, 4 Oct 2019 21:39:22 +0000 (21:39 +0000)]
Use named constant to indicate all lanes, to handle 32 and 64 wide architectures

Summary: Use named constant to indicate all lanes, to handle 32 and 64 wide architectures

Reviewers: ABataev, jdoerfert, grokos, ronlieb

Reviewed By: grokos

Subscribers: ronlieb, openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D68369

llvm-svn: 373793

4 years ago[clang] fix a typo from r372531
Yuanfang Chen [Fri, 4 Oct 2019 21:37:20 +0000 (21:37 +0000)]
[clang] fix a typo from r372531

Reviewers: xbolva00

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D68482

llvm-svn: 373792

4 years ago[MachineOutliner] Disable outlining from noreturn functions
Jessica Paquette [Fri, 4 Oct 2019 21:24:12 +0000 (21:24 +0000)]
[MachineOutliner] Disable outlining from noreturn functions

Outlining from noreturn functions doesn't do the correct thing right now. The
outliner should respect that the caller is marked noreturn. In the event that
we have a noreturn function, and the outlined code is in tail position, the
outliner will not see that the outlined function should be tail called. As a
result, you end up with a regular call containing a return.

Fixing this requires that we check that all candidates live inside noreturn
functions. So, for the sake of correctness, don't outline from noreturn
functions right now.

Add machine-outliner-noreturn.mir to test this.

llvm-svn: 373791

4 years agoExpand on the qfProcessInfo documentation, add examples from
Jason Molenda [Fri, 4 Oct 2019 21:01:52 +0000 (21:01 +0000)]
Expand on the qfProcessInfo documentation, add examples from
lldb-gdb-remote.txt and text explaining the no-criteria mode.

llvm-svn: 373789

4 years ago[InstCombine] add tests for fneg disguised as fmul; NFC
Sanjay Patel [Fri, 4 Oct 2019 20:54:14 +0000 (20:54 +0000)]
[InstCombine] add tests for fneg disguised as fmul; NFC

llvm-svn: 373788

4 years ago[lldb] [testsuite] Mark TestSBCommandReturnObject as failing on Windows
Jan Kratochvil [Fri, 4 Oct 2019 20:49:44 +0000 (20:49 +0000)]
[lldb] [testsuite] Mark TestSBCommandReturnObject as failing on Windows

Filed:
testsuite: TestSBCommandReturnObject: object has no attribute 'dylibPath'
https://bugs.llvm.org/show_bug.cgi?id=43570

http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/9530/steps/test/logs/stdio

AttributeError: 'TestSBCommandReturnObject' object has no attribute 'dylibPath'

Fix crash on SBCommandReturnObject & assignment
https://reviews.llvm.org/D67589
  env = {self.dylibPath: self.getLLDBLibraryEnvVal()}

I do not know how to link with liblldb on Windows so marking it as failing on
Windows.

llvm-svn: 373787

4 years ago[clang-tools-extra] [cmake] Link against libclang-cpp whenever possible
Michal Gorny [Fri, 4 Oct 2019 20:30:02 +0000 (20:30 +0000)]
[clang-tools-extra] [cmake] Link against libclang-cpp whenever possible

Use clang_target_link_libraries() in order to support linking against
libclang-cpp instead of static libraries.

Differential Revision: https://reviews.llvm.org/D68448

llvm-svn: 373786

4 years ago[clang] [cmake] Use add_clang_tool() to install all tools
Michal Gorny [Fri, 4 Oct 2019 20:28:59 +0000 (20:28 +0000)]
[clang] [cmake] Use add_clang_tool() to install all tools

Switch clang-check, clang-extdef-mapping and clang-offload-bundler
to use add_clang_tool() rather than add_clang_executable() with a custom
install rule.  This makes them LLVM_DISTRIBUTION_COMPONENTS-friendly.

Differential Revision: https://reviews.llvm.org/D68429

llvm-svn: 373785

4 years ago[NFC] Add { } to silence compiler warning [-Wmissing-braces].
Huihui Zhang [Fri, 4 Oct 2019 20:04:34 +0000 (20:04 +0000)]
[NFC] Add { } to silence compiler warning [-Wmissing-braces].

../llvm-project/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp:355:48: warning: suggest braces around initialization of subobject [-Wmissing-braces]
      return addMappingFromTable<1>(MI, MRI, { 0 }, Table);
                                               ^
                                               {}

llvm-svn: 373784

4 years ago[Host] Return status directly from RunShellCommand
Jonas Devlieghere [Fri, 4 Oct 2019 19:54:45 +0000 (19:54 +0000)]
[Host] Return status directly from RunShellCommand

Thanks for catching this, Pavel!

llvm-svn: 373783

4 years ago[ScheduleDAG] When a node is cloned, add an edge between the nodes.
Eli Friedman [Fri, 4 Oct 2019 19:51:40 +0000 (19:51 +0000)]
[ScheduleDAG] When a node is cloned, add an edge between the nodes.

InstrEmitter's virtual register handling assumes that clones are emitted
after the cloned node.  Make sure this assumption actually holds.

Fixes a "Node emitted out of order - early" assertion on the testcase.

This is probably a very rare case to actually hit in practice; even
without the explicit edge, the scheduler will usually end up scheduling
the nodes in the expected order due to other constraints.

Differential Revision: https://reviews.llvm.org/D68068

llvm-svn: 373782

4 years ago[LLD] [COFF] Always demangle the __imp_ prefix to __declspec(dllimport)
Martin Storsjo [Fri, 4 Oct 2019 19:47:59 +0000 (19:47 +0000)]
[LLD] [COFF] Always demangle the __imp_ prefix to __declspec(dllimport)

Differential Revision: https://reviews.llvm.org/D68017

llvm-svn: 373781

4 years ago[test] Remove another two unnecessary uses of REQUIRES: target-windows. NFC.
Martin Storsjo [Fri, 4 Oct 2019 19:47:48 +0000 (19:47 +0000)]
[test] Remove another two unnecessary uses of REQUIRES: target-windows. NFC.

Differential Revision: https://reviews.llvm.org/D68449

llvm-svn: 373780

4 years ago[JITLink] Silence GCC warnings. NFC.
Martin Storsjo [Fri, 4 Oct 2019 19:47:42 +0000 (19:47 +0000)]
[JITLink] Silence GCC warnings. NFC.

Use parentheses in an expression with mixed && and ||.

Differential Revision: https://reviews.llvm.org/D68447

llvm-svn: 373779

4 years ago[MachO] Add early returns to save some indentation.
Jonas Devlieghere [Fri, 4 Oct 2019 19:37:59 +0000 (19:37 +0000)]
[MachO] Add early returns to save some indentation.

This file really suffered from the Great Reformat. I'm adding a few
early returns to give the deeply nested code some more breathing room.

llvm-svn: 373778

4 years ago[MachO] Reformat before making changes to this file (NFC)
Jonas Devlieghere [Fri, 4 Oct 2019 19:37:52 +0000 (19:37 +0000)]
[MachO] Reformat before making changes to this file (NFC)

llvm-svn: 373777

4 years ago[Host] Don't discard return value from RunShellCommand
Jonas Devlieghere [Fri, 4 Oct 2019 19:37:46 +0000 (19:37 +0000)]
[Host] Don't discard return value from RunShellCommand

The recent change to expand arguments with the user's shell sometimes
caused a timeout and the error was not propagated.

llvm-svn: 373776

4 years ago[lldb] Fix crash on SBCommandReturnObject & assignment
Jan Kratochvil [Fri, 4 Oct 2019 19:32:57 +0000 (19:32 +0000)]
[lldb] Fix crash on SBCommandReturnObject & assignment

I was writing an SB API client and it was crashing on:
bool DoExecute(SBDebugger dbg, char **command, SBCommandReturnObject &result) {
  result = subcommand(dbg, "help");

That is because SBCommandReturnObject &result gets initialized inside LLDB by:
bool DoExecute(Args &command, CommandReturnObject &result) override {
  // std::unique_ptr gets initialized here from `&result`!!!
  SBCommandReturnObject sb_return(&result);
  DoExecute(...);
  sb_return.Release();

Differential revision: https://reviews.llvm.org/D67589

llvm-svn: 373775

4 years ago[Sema] Split out -Wformat-type-confusion from -Wformat-pedantic
Erik Pilkington [Fri, 4 Oct 2019 19:20:27 +0000 (19:20 +0000)]
[Sema] Split out -Wformat-type-confusion from -Wformat-pedantic

The warnings now in -Wformat-type-confusion don't align with how we interpret
'pedantic' in clang, and don't belong in -pedantic.

Differential revision: https://reviews.llvm.org/D67775

llvm-svn: 373774

4 years ago[libc++] Make the modules-related flags PUBLIC instead of PRIVATE
Louis Dionne [Fri, 4 Oct 2019 19:10:56 +0000 (19:10 +0000)]
[libc++] Make the modules-related flags PUBLIC instead of PRIVATE

It appears that those need to be propagated to targets that use libc++
as well, otherwise they don't build properly.

llvm-svn: 373773

4 years agoAdd missing null pointer check in -ftime-trace code
Reid Kleckner [Fri, 4 Oct 2019 18:57:01 +0000 (18:57 +0000)]
Add missing null pointer check in -ftime-trace code

createOutputFile diagnoses the error for the caller already, so recover
by not writing the output.

Fixes PR43555

No test, since I couldn't think of a good, portable, simple way to make
the regular -o output file writable, but outputfile.json not writable.

llvm-svn: 373771

4 years ago[libc++abi] Link against libSystem on Apple platforms
Louis Dionne [Fri, 4 Oct 2019 18:32:46 +0000 (18:32 +0000)]
[libc++abi] Link against libSystem on Apple platforms

On Apple platforms, libSystem is an umbrella for all other system
libraries, and libpthread (and friends) are actually just symlinks
to libSystem.

llvm-svn: 373770

4 years ago[CMake] Clang: Don't use object libraries with Xcode
Jordan Rose [Fri, 4 Oct 2019 18:17:58 +0000 (18:17 +0000)]
[CMake] Clang: Don't use object libraries with Xcode

Undoes some of the effects of r360946 when using the Xcode CMake
generator---it doesn't handle object libraries correctly at all.
Attempts to still honor BUILD_SHARED_LIBS for Xcode, but I didn't
actually test it. Should have no effect on non-Xcode generators.

https://reviews.llvm.org/D68430

llvm-svn: 373769

4 years agoComponentize lldb/scripts to use with LLVM_DISTRIBUTION_COMPONENTS
Antonio Afonso [Fri, 4 Oct 2019 18:10:42 +0000 (18:10 +0000)]
Componentize lldb/scripts to use with LLVM_DISTRIBUTION_COMPONENTS

Summary:
I'd like to install lldb using the install-distribution target with LLVM_DISTRIBUTION_COMPONENTS but this is currently not possible as the lldb/scripts do not provide any component we can use and install the python scripts.
For this effect I created an lldb-python-scripts target and added the install-lldb-python-scripts llvm install target.

I tested with:
cmake ... -DLLVM_ENABLE_PROJECTS="clang;lldb" -DLLVM_DISTRIBUTION_COMPONENTS="lldb;liblldb;lldb-python-scripts" ...
DESTDIR=... ninja install-distribution

Then checked with bin/lldb -x -o 'script import lldb'

Reviewers: labath, xiaobai, clayborg, lanza

Subscribers: mgorny, lldb-commits, smeenai, wallace

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D68370

llvm-svn: 373768

4 years ago[libc++] Move more CMake flags to per-target definitions
Louis Dionne [Fri, 4 Oct 2019 18:03:17 +0000 (18:03 +0000)]
[libc++] Move more CMake flags to per-target definitions

This daily refactoring tackles flags related to modules,
exceptions and RTTI.

llvm-svn: 373767

4 years ago[X86] Remove isel patterns for mask vpcmpgt/vpcmpeq. Switch vpcmp to these based...
Craig Topper [Fri, 4 Oct 2019 18:02:46 +0000 (18:02 +0000)]
[X86] Remove isel patterns for mask vpcmpgt/vpcmpeq. Switch vpcmp to these based on the immediate in MCInstLower

The immediate form of VPCMP can represent these completely. The
vpcmpgt/eq are just shorter encodings.

This patch removes the isel patterns and just swaps the opcodes
and removes the immediate in MCInstLower. This matches where we do
some other encodings tricks.

Removes over 10K bytes from the isel table.

Differential Revision: https://reviews.llvm.org/D68446

llvm-svn: 373766

4 years ago[X86] Add DAG combine to form saturating VTRUNCUS/VTRUNCS from VTRUNC
Craig Topper [Fri, 4 Oct 2019 17:53:18 +0000 (17:53 +0000)]
[X86] Add DAG combine to form saturating VTRUNCUS/VTRUNCS from VTRUNC

We already do this for ISD::TRUNCATE, but we can do the same for X86ISD::VTRUNC

Differential Revision: https://reviews.llvm.org/D68432

llvm-svn: 373765

4 years agoAdd few docs and implementation of strcpy and strcat.
Siva Chandra [Fri, 4 Oct 2019 17:30:54 +0000 (17:30 +0000)]
Add few docs and implementation of strcpy and strcat.

Summary:
This patch illustrates some of the features like modularity we want
in the new libc. Few other ideas like different kinds of testing, redirectors
etc are not yet present.

Reviewers: dlj, hfinkel, theraven, jfb, alexshap, jdoerfert

Subscribers: mgorny, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67867

llvm-svn: 373764

4 years ago[Automaton] Fix invalid iterator reference
James Molloy [Fri, 4 Oct 2019 17:15:30 +0000 (17:15 +0000)]
[Automaton] Fix invalid iterator reference

Found by the expensive checks bot.

llvm-svn: 373763

4 years ago[ModuloSchedule] Do not remap terminators
James Molloy [Fri, 4 Oct 2019 17:15:25 +0000 (17:15 +0000)]
[ModuloSchedule] Do not remap terminators

This is a trivial point fix. Terminator instructions aren't scheduled, so
we shouldn't expect to be able to remap them.

This doesn't affect Hexagon and PPC because their terminators are always
hardware loop backbranches that have no register operands.

llvm-svn: 373762

4 years ago[FPEnv] Strict FP tests should use the requisite function attributes.
Kevin P. Neal [Fri, 4 Oct 2019 17:03:46 +0000 (17:03 +0000)]
[FPEnv] Strict FP tests should use the requisite function attributes.

A set of function attributes is required in any function that uses constrained
floating point intrinsics. None of our tests use these attributes.

This patch fixes this.

These tests have been tested against the IR verifier changes in D68233.

Reviewed by: andrew.w.kaylor, cameron.mcinally, uweigand
Approved by: andrew.w.kaylor
Differential Revision: https://reviews.llvm.org/D67925

llvm-svn: 373761

4 years ago[process info] Remove assert in DoGetGroupName
Walter Erquinigo [Fri, 4 Oct 2019 16:56:23 +0000 (16:56 +0000)]
[process info] Remove assert in DoGetGroupName

Summary:
Disabling this assert prevents lldb-server from crashing, which prevents it from finding the user and group names of a given process list.

Before this change, the process list didn't contain names:

```
PID    PARENT USER       GROUP      EFF USER   EFF GROUP  TRIPLE                               ARGUMENTS
====== ====== ========== ========== ========== ========== ============================== ============================
27585  982    10098      10098      10098      10098                                     com.LogiaGroup.LogiaDeck
27623  982    10098      10098      10098      10098                                     com.digitalturbine.ignite.suspend.DataUsageRecorderService
28024  982    10199      10199      10199      10199                                     com.google.vr.vrcore
28061  983    10353      10353      10353      10353                                     com.instagram.android:videoplayer
28121  982    10045      10045      10045      10045                                     com.sec.spp.push
28325  982    10247      10247      10247      10247                                     com.facebook.orca
28714  982    10367      10367      10367      10367                                     com.samsung.android.dialer
29867  3208   2000       2000       2000       2000       aarch64-unknown-linux-android  /system/bin/sh-c /data/local/tmp/lldb-server platform --listen *:5557 --server --log-file /data/local/tmp/logs --log-channels gdb-remote all --log-channels lldb all
```

After this change, the list looks much better

```
PID    PARENT USER       GROUP      EFF USER   EFF GROUP  TRIPLE                               ARGUMENTS
====== ====== ========== ========== ========== ========== ============================== ============================
24459  1      wifi       1010       wifi       1010       aarch64-unknown-linux-android  /vendor/bin/hw/wpa_supplicant-O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 -g@android:wpa_wlan0
25098  982    u0_a42     10042      u0_a42     10042                                     com.samsung.android.messaging
25442  982    u0_a65     10065      u0_a65     10065                                     com.samsung.android.mobileservice
25974  982    u0_a9      10009      u0_a9      10009                                     com.samsung.android.contacts
26377  982    radio      1001       radio      1001                                      com.samsung.android.incallui
26390  983    u0_a26     10026      u0_a26     10026                                     com.samsung.android.game.gametools
26876  983    u0_a306    10306      u0_a306    10306                                     com.tencent.mm:push
```

Reviewers: clayborg,aadsm,xiaobai,labath

Subscribers:

llvm-svn: 373760

4 years ago[utils] Fix incompatibility of bisect[-skip-count] with Python 3
Mikhail Maltsev [Fri, 4 Oct 2019 16:44:18 +0000 (16:44 +0000)]
[utils] Fix incompatibility of bisect[-skip-count] with Python 3

Summary:
This change replaces the print statements with print function calls
and also replaces the '/' operator (which is integer division in Py2,
but becomes floating point division in Py3) with the '//' operator
which has the same semantics in Py2 and Py3.

Reviewers: greened, michaelplatings, gottesmm

Reviewed By: greened

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68138

llvm-svn: 373759

4 years ago[lldb-server/android] Show more processes and package name when necessary
Walter Erquinigo [Fri, 4 Oct 2019 16:35:59 +0000 (16:35 +0000)]
[lldb-server/android] Show more processes and package name when necessary

Summary:
By default `platform process list` only shows the processes of the current user that lldb-server can parse.
There are several problems:
- apk programs don't have an executable file. They instead use a package name as identifier.
- each apk also runs under a different user. That's how android works
- because of the user permission, some files like /proc/<pid>/{environ,exe} can't be read.

This results in a very small process list.

This is a local run on my machine
```
(lldb) platform process list
2 matching processes were found on "remote-android"
PID    PARENT USER       TRIPLE                   NAME
====== ====== ========== ======================== ============================
23291  3177              aarch64-unknown-linux-android sh
23301  23291            aarch64-unknown-linux-android lldb-server
```
However, I have 700 processes running at this time.

By implementing a few fallbacks for android, I've expanded this list to 202, filtering out kernel processes, which would presumably appear in this list if the device was rooted.

```
(lldb) platform process list
202 matching processes were found on "remote-android"
PID    PARENT USER       TRIPLE                   NAME
====== ====== ========== ======================== ============================
...
12647  3208              aarch64-unknown-linux-android sh
12649  12647             aarch64-unknown-linux-android lldb-server
12653  982                                        com.samsung.faceservice
13185  982                                        com.samsung.vvm
15899  982                                        com.samsung.android.spay
16220  982                                        com.sec.spp.push
17126  982                                        com.sec.spp.push:RemoteDlcProcess
19772  983                                        com.android.chrome
20209  982                                        com.samsung.cmh:CMH
20380  982                                        com.google.android.inputmethod.latin
20879  982                                        com.samsung.android.oneconnect:Receiver
21212  983                                        com.tencent.mm
24459  1                 aarch64-unknown-linux-android wpa_supplicant
25974  982                                        com.samsung.android.contacts
26293  982                                        com.samsung.android.messaging
28714  982                                        com.samsung.android.dialer
31605  982                                        com.samsung.android.MtpApplication
32256  982                                        com.bezobidny
```

Something to notice is that the architecture is unkonwn for all apks. And that's fine, because run-as would be required to gather this information and that would make this entire functionality massively slow.

There are still several improvements to make here, like displaying actual user names, which I'll try to do in a following diff.

Note: Regarding overall apk debugging support from lldb. I'm planning on having lldb spawn lldb-server by itself with the correct user, so that everything works well. The initial lldb-server used for connecting to the remote platform can be reused for such purpose. Furthermore, eventually lldb could also launch that initial lldb-server on its own.

Reviewers: clayborg, aadsm, labath, xiaobai

Subscribers: srhines, krytarowski, kristof.beyls, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D68289

llvm-svn: 373758

4 years ago[OPENMP50]Suppport for multiple vendors in the same vendor context
Alexey Bataev [Fri, 4 Oct 2019 15:58:45 +0000 (15:58 +0000)]
[OPENMP50]Suppport for multiple vendors in the same vendor context
selector.

According to OpenMP 5.0, multiple vendors could be specified in the
vendor context selector via ',' as a separator.

llvm-svn: 373756

4 years ago[NFC] [FileCheck] Reapply fix init of objects in unit tests
Thomas Preud'homme [Fri, 4 Oct 2019 15:47:23 +0000 (15:47 +0000)]
[NFC] [FileCheck] Reapply fix init of objects in unit tests

Summary:
Fix initialization style of objects allocated on the stack and member
objects in unit test to use the "Type Var(init list)" and
"Type Member{init list}" convention. The latter fixes the buildbot
breakage.

Reviewers: jhenderson, probinson, arichardson, grimar, jdenny

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68425

llvm-svn: 373755

4 years ago[scudo][standalone] Make malloc_info return a minimal XML
Kostya Kortchinsky [Fri, 4 Oct 2019 15:46:34 +0000 (15:46 +0000)]
[scudo][standalone] Make malloc_info return a minimal XML

Summary:
Initially, our malloc_info was returning ENOTSUP, but Android would
rather have it return successfully and write a barebone XML to the
stream, so we will oblige.

Add an associated test.

Reviewers: cferris, morehouse, hctim, eugenis, vitalybuka

Reviewed By: morehouse

Subscribers: delcypher, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

Differential Revision: https://reviews.llvm.org/D68427

llvm-svn: 373754