platform/upstream/llvm.git
5 years ago[llvm-objdump] Remove unnecessary indentation when dumping ELF data.
Yuanfang Chen [Wed, 19 Jun 2019 18:44:29 +0000 (18:44 +0000)]
[llvm-objdump] Remove unnecessary indentation when dumping ELF data.

Reviewers: MaskRay, jhenderson, rupprecht

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 363858

5 years ago[AST] Fixed extraneous warnings for binary conditional operator
Nathan Huckleberry [Wed, 19 Jun 2019 18:37:01 +0000 (18:37 +0000)]
[AST] Fixed extraneous warnings for binary conditional operator

Summary:
Binary conditional operator gave warnings where ternary operators
did not. They have been fixed to warn similarly to ternary operators.

Link: https://bugs.llvm.org/show_bug.cgi?id=42239
Reviewers: rsmith, aaron.ballman, nickdesaulniers

Reviewed By: rsmith, nickdesaulniers

Subscribers: srhines, cfe-commits

Tags: #clang

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

llvm-svn: 363857

5 years ago[TargetLowering] SimplifyDemandedBits - add ANY_EXTEND_VECTOR_INREG support
Simon Pilgrim [Wed, 19 Jun 2019 18:34:58 +0000 (18:34 +0000)]
[TargetLowering] SimplifyDemandedBits - add ANY_EXTEND_VECTOR_INREG support

Move 'lowest' demanded elt -> bitcast fold out of ZERO_EXTEND_VECTOR_INREG into ANY_EXTEND_VECTOR_INREG case.

llvm-svn: 363856

5 years ago[clang] Adapt ASTMatcher to explicit(bool) specifier
Gauthier Harnisch [Wed, 19 Jun 2019 18:27:56 +0000 (18:27 +0000)]
[clang] Adapt ASTMatcher to explicit(bool) specifier

Summary:
Changes:
 - add an ast matcher for deductiong guide.
 - allow isExplicit matcher for deductiong guide.
 - add hasExplicitSpecifier matcher which give access to the expression of the explicit specifier if present.

Reviewers: klimek, rsmith, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: aaron.ballman, cfe-commits

Tags: #clang

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

llvm-svn: 363855

5 years agoFix GlobalISel MachineVerifier tests. NFC.
Volkan Keles [Wed, 19 Jun 2019 18:15:45 +0000 (18:15 +0000)]
Fix GlobalISel MachineVerifier tests. NFC.

These test were failing when building llvm with
`-DLLVM_DEFAULT_TARGET_TRIPLE=''`. Add `-march` to the
run line to fix the issue.

llvm-svn: 363854

5 years ago[x86] avoid vector load narrowing with extracted store uses (PR42305)
Sanjay Patel [Wed, 19 Jun 2019 18:13:47 +0000 (18:13 +0000)]
[x86] avoid vector load narrowing with extracted store uses (PR42305)

This is an exception to the rule that we should prefer xmm ops to ymm ops.
As shown in PR42305:
https://bugs.llvm.org/show_bug.cgi?id=42305
...the store folding opportunity with vextractf128 may result in better
perf by reducing the instruction count.

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

llvm-svn: 363853

5 years ago[x86] add test for unaligned 32-byte load/store splitting; NFC
Sanjay Patel [Wed, 19 Jun 2019 18:06:59 +0000 (18:06 +0000)]
[x86] add test for unaligned 32-byte load/store splitting; NFC

llvm-svn: 363852

5 years ago[test] Fix TargetParserTest runtime.
Jordan Rupprecht [Wed, 19 Jun 2019 18:03:36 +0000 (18:03 +0000)]
[test] Fix TargetParserTest runtime.

r363780 fixes extreme memory growth by using a new std::vector every loop iteration, but causes runtime to go up (and occasionally timeout in certain situations) because of constructor cost every loop iteration. Fix this by moving the constructor back out, but clearing contents in the loop.

Also apply this to the AArch64 features test case, which seems to use the same pattern.

llvm-svn: 363851

5 years ago[TargetLowering] SimplifyDemandedBits ZERO_EXTEND_VECTOR_INREG -> ANY_EXTEND_VECTOR_INREG
Simon Pilgrim [Wed, 19 Jun 2019 18:00:24 +0000 (18:00 +0000)]
[TargetLowering] SimplifyDemandedBits ZERO_EXTEND_VECTOR_INREG -> ANY_EXTEND_VECTOR_INREG

Simplify ZERO_EXTEND_VECTOR_INREG if the extended bits are not required.

Matches what we already do for ZERO_EXTEND.

llvm-svn: 363850

5 years agoAdd test cases for dumping record definition data to JSON; NFC.
Aaron Ballman [Wed, 19 Jun 2019 17:49:25 +0000 (17:49 +0000)]
Add test cases for dumping record definition data to JSON; NFC.

llvm-svn: 363849

5 years ago[clang][test] Add missing LambdaTemplateParams test and migrate from getLocStart
Jordan Rupprecht [Wed, 19 Jun 2019 17:43:58 +0000 (17:43 +0000)]
[clang][test] Add missing LambdaTemplateParams test and migrate from getLocStart

These were removed a long time ago in r341573, but this test was missed because it was not in cmake

llvm-svn: 363848

5 years ago[X86][SSE] combineToExtendVectorInReg - add ANY_EXTEND support TODO. NFCI.
Simon Pilgrim [Wed, 19 Jun 2019 17:42:37 +0000 (17:42 +0000)]
[X86][SSE] combineToExtendVectorInReg - add ANY_EXTEND support TODO. NFCI.

So I don't forget - there's a load of yak shaving to do first.

llvm-svn: 363847

5 years ago[clang][NewPM] Fixing remaining -O0 tests that are broken under new PM
Leonard Chan [Wed, 19 Jun 2019 17:41:30 +0000 (17:41 +0000)]
[clang][NewPM] Fixing remaining -O0 tests that are broken under new PM

- CodeGen/flatten.c will fail under new PM becausec the new PM AlwaysInliner
  seems to intentionally inline functions but not call sites marked with
  alwaysinline (D23299)
- Tests that check remarks happen to check them for the inliner which is not
  turned on at O0. These tests just check that remarks work, but we can make
  separate tests for the new PM with -O1 so we can turn on the inliner and
  check the remarks with minimal changes.

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

llvm-svn: 363846

5 years ago[InstCombine] Fold icmp eq/ne (and %x, signbit), 0 -> %x s>=/s< 0 earlier
Huihui Zhang [Wed, 19 Jun 2019 17:31:39 +0000 (17:31 +0000)]
[InstCombine] Fold  icmp eq/ne (and %x, signbit), 0 -> %x s>=/s< 0  earlier

Summary:
To generate simplified IR, make sure fold
```
  (X & signbit) ==/!= 0) -> X s>=/s< 0;
```
is scheduled before fold
```
  ((X << Y) & C) == 0 -> (X & (C >> Y)) == 0.
```

https://rise4fun.com/Alive/fbdh

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

Reviewed By: lebedev.ri

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 363845

5 years ago[clangd] Consume error returned by cleanupAndFormat
Ilya Biryukov [Wed, 19 Jun 2019 17:30:02 +0000 (17:30 +0000)]
[clangd] Consume error returned by cleanupAndFormat

When called by ClangdServer::applyTweak.
No idea how to actually trigger this in practice, so no tests.

llvm-svn: 363844

5 years ago[clangd] Format changes produced by rename
Ilya Biryukov [Wed, 19 Jun 2019 17:25:24 +0000 (17:25 +0000)]
[clangd] Format changes produced by rename

Reviewers: hokein, kadircet, sammccall

Reviewed By: kadircet

Subscribers: MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 363843

5 years ago[InstSimplify] add a phi test with 1 incoming value; NFC
Sanjay Patel [Wed, 19 Jun 2019 17:23:29 +0000 (17:23 +0000)]
[InstSimplify] add a phi test with 1 incoming value; NFC

D63489 proposes to change this behavior, but there's no
direct -instsimplify test to verify that the transform exists.

llvm-svn: 363842

5 years ago[X86][SSE] Combine shuffles to ANY_EXTEND/ANY_EXTEND_VECTOR_INREG.
Simon Pilgrim [Wed, 19 Jun 2019 17:21:15 +0000 (17:21 +0000)]
[X86][SSE] Combine shuffles to ANY_EXTEND/ANY_EXTEND_VECTOR_INREG.

We already do this for ZERO_EXTEND/ZERO_EXTEND_VECTOR_INREG - this just extends the pattern matcher to recognize cases where we don't need the zeros in the extension.

llvm-svn: 363841

5 years agoUnify DependencyFileGenerator class and DependencyCollector interface (NFCI)
Alex Lorenz [Wed, 19 Jun 2019 17:07:36 +0000 (17:07 +0000)]
Unify DependencyFileGenerator class and DependencyCollector interface (NFCI)

Make DependencyFileGenerator a DependencyCollector as it was intended when
DependencyCollector was introduced. The missing PPCallbacks overrides are added to
the DependencyCollector as well.

This change will allow clang-scan-deps to access the produced dependencies without
writing them out to .d files to disk, so that it will be able collate them and
report them to the user.

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

llvm-svn: 363840

5 years ago[AArch64] Improve jump tables testing (NFC)
Evandro Menezes [Wed, 19 Jun 2019 16:59:34 +0000 (16:59 +0000)]
[AArch64] Improve jump tables testing (NFC)

Improve testing of the minimum and maximum sizes of jump tables.

llvm-svn: 363839

5 years ago[ARM] Add MVE vector bit-operations (register inputs).
Simon Tatham [Wed, 19 Jun 2019 16:43:53 +0000 (16:43 +0000)]
[ARM] Add MVE vector bit-operations (register inputs).

This includes all the obvious bitwise operations (AND, OR, BIC, ORN,
MVN) in register-to-register forms, and the immediate forms of
AND/OR/BIC/ORN; byte-order reverse instructions; and the VMOVs that
access a single lane of a vector.

Some of those VMOVs (specifically, the ones that access a 32-bit lane)
share an encoding with existing instructions that were disassembled as
accessing half of a d-register (e.g. `vmov.32 r0, d1[0]`), but in
8.1-M they're now written as accessing a quarter of a q-register (e.g.
`vmov.32 r0, q0[2]`). The older syntax is still accepted by the
assembler.

Reviewers: dmgreen, samparker, SjoerdMeijer, t.p.northover

Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 363838

5 years ago[AArch64] Improve jump tables testing (NFC)
Evandro Menezes [Wed, 19 Jun 2019 16:35:30 +0000 (16:35 +0000)]
[AArch64] Improve jump tables testing (NFC)

Improve testing of the minimum and maximum sizes of jump tables.

llvm-svn: 363837

5 years ago[NFC][IR] Move CreateFNegFMF(...) next to CreateFNeg(...).
Cameron McInally [Wed, 19 Jun 2019 16:35:15 +0000 (16:35 +0000)]
[NFC][IR] Move CreateFNegFMF(...) next to CreateFNeg(...).

This is now in line with the other Create*FMF(...) functions.

llvm-svn: 363836

5 years ago[NFC][libc++] Remove stray semi-colon after function definition
Louis Dionne [Wed, 19 Jun 2019 16:33:28 +0000 (16:33 +0000)]
[NFC][libc++] Remove stray semi-colon after function definition

llvm-svn: 363835

5 years agoMark papers P1458, P1459, P1462 and P1464 as complete. No changed needed to either...
Marshall Clow [Wed, 19 Jun 2019 16:32:07 +0000 (16:32 +0000)]
Mark papers P1458, P1459, P1462 and P1464 as complete. No changed needed to either the library or the tests.

llvm-svn: 363834

5 years ago[test][llvm-dwarfdump] Remove pointless CHECK-NOT lines
James Henderson [Wed, 19 Jun 2019 16:31:59 +0000 (16:31 +0000)]
[test][llvm-dwarfdump] Remove pointless CHECK-NOT lines

The original line was there from when this test was added, but it is
checking for a switch that doesn't exist, so really has no purpose, at
least any more.

llvm-svn: 363833

5 years ago[AVR] Change limit type to match the argument type (NFC)
Evandro Menezes [Wed, 19 Jun 2019 16:12:12 +0000 (16:12 +0000)]
[AVR] Change limit type to match the argument type (NFC)

llvm-svn: 363832

5 years ago[Hexagon] Change limit type to match the argument type (NFC)
Evandro Menezes [Wed, 19 Jun 2019 16:12:01 +0000 (16:12 +0000)]
[Hexagon] Change limit type to match the argument type (NFC)

llvm-svn: 363831

5 years ago[llvm-mca][docs] clarify how the quality of the perf report is affected by the qualit...
Andrea Di Biagio [Wed, 19 Jun 2019 16:10:58 +0000 (16:10 +0000)]
[llvm-mca][docs] clarify how the quality of the perf report is affected by the quality of the scheduling models.

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

llvm-svn: 363830

5 years ago[NFC][llvm-objcopy] Fix overly restrictive od output check
Hubert Tong [Wed, 19 Jun 2019 16:04:24 +0000 (16:04 +0000)]
[NFC][llvm-objcopy] Fix overly restrictive od output check

The check against the output of `od` in the affected tests expect a
specific input offset format. They also expect a specific offset value,
not consistent with the EXAMPLE section for `od` in POSIX.1-2017
Chapter 4, while using the `-j` option. In particular, the example shows
that the input offset begins at 0 following the bytes skipped.

This patch adjusts the matching of the input offset to be more generic.
In order to avoid false matches, it restricts the number of bytes to be
formatted.

llvm-svn: 363829

5 years ago[NFC][LSR] Avoid undefined grep in pr2570.ll
Hubert Tong [Wed, 19 Jun 2019 16:02:54 +0000 (16:02 +0000)]
[NFC][LSR] Avoid undefined grep in pr2570.ll

greater-than-sign is not a BRE special character.

POSIX.1-2017 XBD Section 9.3.2 indicates that the interpretation of `\>`
is undefined. This patch replaces the pattern.

llvm-svn: 363828

5 years ago[lldb] [Process/NetBSD] Fix constructor after r363707
Michal Gorny [Wed, 19 Jun 2019 15:49:47 +0000 (15:49 +0000)]
[lldb] [Process/NetBSD] Fix constructor after r363707

llvm-svn: 363827

5 years ago[NFC][codeview] Avoid undefined grep in debug-info-codeview-display-name.cpp
Hubert Tong [Wed, 19 Jun 2019 15:48:12 +0000 (15:48 +0000)]
[NFC][codeview] Avoid undefined grep in debug-info-codeview-display-name.cpp

vertical-line is not a BRE special character.

POSIX.1-2017 XBD Section 9.3.2 indicates that the interpretation of `\|`
is undefined. This patch uses an ERE instead.

llvm-svn: 363826

5 years ago[OpenMP][libomptarget] Add support for declare target to clause under unified memory
Gheorghe-Teodor Bercea [Wed, 19 Jun 2019 15:48:10 +0000 (15:48 +0000)]
[OpenMP][libomptarget] Add support for declare target to clause under unified memory

Summary:
This patch adds support for handling variables under the:

```
#pragma omp declare target to()
```

clause when the

```
#pragma omp requires unified_shared_memory
```

is used.

The address of the host variable is copied into the device pointer just like for the declare target link case.

Reviewers: ABataev, caomhin, grokos, AlexEichenberger

Reviewed By: grokos

Subscribers: jcownie, guansong, jdoerfert, openmp-commits

Tags: #openmp

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

llvm-svn: 363825

5 years agoRevert rL363684 : AMDGPU: Add GWS instruction builtins
Simon Pilgrim [Wed, 19 Jun 2019 15:35:45 +0000 (15:35 +0000)]
Revert rL363684 : AMDGPU: Add GWS instruction builtins
........
Depends on rL363678 which was reverted at rL363797

llvm-svn: 363824

5 years ago[lldb] [Process/NetBSD] Remove unnecessary FPU presence checks for x86_64
Michal Gorny [Wed, 19 Jun 2019 15:35:01 +0000 (15:35 +0000)]
[lldb] [Process/NetBSD] Remove unnecessary FPU presence checks for x86_64

Remove the checks for FPU presence, FXSAVE support and usage from
the code for x86_64.  Those are always true for this architecture,
and in fact are hardcoded to true inside NetBSD kernel.

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

llvm-svn: 363823

5 years ago[analyzer] SARIF: Add EOF newline; replace diff_sarif
Hubert Tong [Wed, 19 Jun 2019 15:27:35 +0000 (15:27 +0000)]
[analyzer] SARIF: Add EOF newline; replace diff_sarif

Summary:
This patch applies a change similar to rC363069, but for SARIF files.

The `%diff_sarif` lit substitution invokes `diff` with a non-portable
`-I` option. The intended effect can be achieved by normalizing the
inputs to `diff` beforehand. Such normalization can be done with
`grep -Ev`, which is also used by other tests.

Additionally, this patch updates the SARIF output to have a newline at
the end of the file. This makes it so that the SARIF file qualifies as a
POSIX text file, which increases the consumability of the generated file
in relation to various tools.

Reviewers: NoQ, sfertile, xingxue, jasonliu, daltenty, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, jsji, cfe-commits

Tags: #clang

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

llvm-svn: 363822

5 years agoSpecify log level for CMake messages (less stderr)
Stefan Granitz [Wed, 19 Jun 2019 15:25:32 +0000 (15:25 +0000)]
Specify log level for CMake messages (less stderr)

Summary:
Specify message levels in CMake. Prefer STATUS (stdout).

As the default message mode (i.e. level) is NOTICE in CMake, more then necessary messages get printed to stderr. Some tools,  noticably ccmake treat this as an error and require additional confirmation and re-running CMake's configuration step.

This commit specifies a mode (either STATUS or WARNING or FATAL_ERROR)  instead of the default.

* I used `csearch -f 'llvm-project/.+(CMakeLists\.txt|cmake)' -l 'message\("'` to find all locations.
* Reviewers were chosen by the most common authors of specific files. If there are more suitable reviewers for these CMake changes, please let me know.

Patch by: Christoph Siedentop

Reviewers: zturner, beanz, xiaobai, kbobyrev, lebedev.ri, sgraenitz

Reviewed By: sgraenitz

Subscribers: mgorny, lebedev.ri, #sanitizers, lldb-commits, llvm-commits

Tags: #sanitizers, #lldb, #llvm

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

llvm-svn: 363821

5 years agoAdd a script to help generate expected test output for dumping the AST to JSON.
Aaron Ballman [Wed, 19 Jun 2019 15:25:24 +0000 (15:25 +0000)]
Add a script to help generate expected test output for dumping the AST to JSON.

Patch by Abhishek Bhaskar.

llvm-svn: 363820

5 years agoChange the way we output templates for JSON AST dumping and dump information about...
Aaron Ballman [Wed, 19 Jun 2019 15:24:06 +0000 (15:24 +0000)]
Change the way we output templates for JSON AST dumping and dump information about template arguments.

Previously, we attempted to write out template parameters and specializations to their own array, but due to the architecture of the ASTNodeTraverser, this meant that other nodes were not being written out. This now follows the same behavior as the regular AST dumper and puts all the (correct) information into the "inner" array. When we correct the AST node traverser itself, we can revisit splitting this information into separate arrays again.

llvm-svn: 363819

5 years ago[X86] getExtendInVec - take a ISD::*_EXTEND opcode instead of a IsSigned bool flag...
Simon Pilgrim [Wed, 19 Jun 2019 15:18:24 +0000 (15:18 +0000)]
[X86] getExtendInVec - take a ISD::*_EXTEND opcode instead of a IsSigned bool flag. NFCI.

Prep work to support ANY_EXTEND/ANY_EXTEND_VECTOR_INREG without needing another flag.

llvm-svn: 363818

5 years ago[DFSan] Add UnaryOperator visitor to DataFlowSanitizer
Cameron McInally [Wed, 19 Jun 2019 15:11:41 +0000 (15:11 +0000)]
[DFSan] Add UnaryOperator visitor to DataFlowSanitizer

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

llvm-svn: 363814

5 years ago[Reassociate] Handle unary FNeg in the Reassociate pass
Cameron McInally [Wed, 19 Jun 2019 14:59:14 +0000 (14:59 +0000)]
[Reassociate] Handle unary FNeg in the Reassociate pass

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

llvm-svn: 363813

5 years ago[X86] Add *_EXTEND -> *_EXTEND_VECTOR_INREG opcode conversion helper. NFCI.
Simon Pilgrim [Wed, 19 Jun 2019 14:54:02 +0000 (14:54 +0000)]
[X86] Add *_EXTEND -> *_EXTEND_VECTOR_INREG opcode conversion helper. NFCI.

Given a *_EXTEND or *_EXTEND_VECTOR_INREG opcode, convert it to *_EXTEND_VECTOR_INREG.

llvm-svn: 363812

5 years ago[ConstantFolding] Add constant folding for smul.fix and smul.fix.sat
Bjorn Pettersson [Wed, 19 Jun 2019 14:28:03 +0000 (14:28 +0000)]
[ConstantFolding] Add constant folding for smul.fix and smul.fix.sat

Summary:
This patch teaches ConstantFolding to constant fold
both scalar and vector variants of llvm.smul.fix and
llvm.smul.fix.sat.

As described in the LangRef rounding is unspecified for
these instrinsics. If the result cannot be represented
exactly the default behavior in ConstantFolding is to
round down towards negative infinity. If a target has a
preferred rounding that is different some kind of target
hook would be needed (same strategy as used by the
SelectionDAG legalizer).

Reviewers: nikic, leonardchan, RKSimon

Reviewed By: leonardchan

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 363811

5 years ago[ConstantFolding] Refactor ConstantFoldScalarCall. NFC
Bjorn Pettersson [Wed, 19 Jun 2019 14:27:51 +0000 (14:27 +0000)]
[ConstantFolding] Refactor ConstantFoldScalarCall. NFC

This patch splits ConstantFoldScalarCall into several
functions.

Benefits:
- Reduces indentation levels and avoids long if-statements.
- Makes it easier to add support for > 3 operands.

llvm-svn: 363810

5 years ago[OpenMP] Strengthen regression tests for task allocation under nowait depend clauses NFC
Gheorghe-Teodor Bercea [Wed, 19 Jun 2019 14:26:43 +0000 (14:26 +0000)]
[OpenMP] Strengthen regression tests for task allocation under nowait depend clauses NFC

Summary:
This patch strengthens the tests introduced in D63009 by:
- adding new test for default device ID.
- modifying existing tests to pass device ID local variable to the task allocation function.

Reviewers: ABataev, Hahnfeld, caomhin, jdoerfert

Reviewed By: ABataev

Subscribers: guansong, jdoerfert, cfe-commits

Tags: #clang

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

llvm-svn: 363809

5 years ago[X86] Merge extract_subvector(*_EXTEND) and extract_subvector(*_EXTEND_VECTOR_INREG...
Simon Pilgrim [Wed, 19 Jun 2019 14:25:27 +0000 (14:25 +0000)]
[X86] Merge extract_subvector(*_EXTEND) and extract_subvector(*_EXTEND_VECTOR_INREG) handling. NFCI.

llvm-svn: 363808

5 years ago[OPENMP][CUDA]Use __syncthreads when compiled by nvcc and clang >= 9.0.
Alexey Bataev [Wed, 19 Jun 2019 14:20:34 +0000 (14:20 +0000)]
[OPENMP][CUDA]Use __syncthreads when compiled by nvcc and clang >= 9.0.

Summary:
The problems with __syncthreads() were fixed in clang >= 9.0 and the
original __syncthreads() can be used instead of the ptx instruction.

Reviewers: grokos

Subscribers: guansong, jdoerfert, openmp-commits, kkwli0, caomhin

Tags: #openmp

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

llvm-svn: 363807

5 years ago[SystemZ] Support vector load/store alignment hints
Ulrich Weigand [Wed, 19 Jun 2019 14:20:00 +0000 (14:20 +0000)]
[SystemZ] Support vector load/store alignment hints

Vector load/store instructions support an optional alignment field
that the compiler can use to provide known alignment info to the
hardware.  If the field is used (and the information is correct),
the hardware may be able (on some models) to perform faster memory
accesses than otherwise.

This patch adds support for alignment hints in the assembler and
disassembler, and fills in known alignment during codegen.

llvm-svn: 363806

5 years ago[libFuzzer] Remove too aggressive static_assert in FuzzedDataProvider.
Max Moroz [Wed, 19 Jun 2019 14:14:27 +0000 (14:14 +0000)]
[libFuzzer] Remove too aggressive static_assert in FuzzedDataProvider.

Summary:
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-full/builds/31

error: static_assert failed due to requirement
'std::numeric_limits<char>::is_signed' "Destination type must be
signed."
    static_assert(std::numeric_limits<TS>::is_signed,
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/buildslave/buildslave/clang-cmake-aarch64-full/llvm/projects/compiler-rt/lib/fuzzer/utils/FuzzedDataProvider.h:126:19:
note: in instantiation of function template specialization
'FuzzedDataProvider::ConvertUnsignedToSigned<char, unsigned char>'
requested here
      char next = ConvertUnsignedToSigned<char>(data_ptr_[0]);
                  ^
1 error generated.

Reviewers: Dor1s

Reviewed By: Dor1s

Subscribers: javed.absar, kristof.beyls, delcypher, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

llvm-svn: 363805

5 years agoAllow copy/move assignment operator to be coroutine as per N4775
Vivek Pandya [Wed, 19 Jun 2019 14:12:19 +0000 (14:12 +0000)]
Allow copy/move assignment operator to be coroutine as per N4775

This change fixes https://bugs.llvm.org/show_bug.cgi?id=40997.

Reviewers: GorNishanov, rsmith
Reviewed by: GorNishanov
Subscribers: cfe-commits, lewissbaker, modocache, llvm-commits

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

llvm-svn: 363804

5 years ago[clangd] Collect tokens of main files when building the AST
Ilya Biryukov [Wed, 19 Jun 2019 14:03:19 +0000 (14:03 +0000)]
[clangd] Collect tokens of main files when building the AST

Summary:
The first use of this is a code tweak to expand macro calls.
Will later be used to build syntax trees.

The memory overhead is small as we only store tokens of the main file.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: mgorny, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 363803

5 years ago[TargetLowering] SimplifyDemandedBits SIGN_EXTEND_VECTOR_INREG -> ANY/ZERO_EXTEND_VEC...
Simon Pilgrim [Wed, 19 Jun 2019 13:58:02 +0000 (13:58 +0000)]
[TargetLowering] SimplifyDemandedBits SIGN_EXTEND_VECTOR_INREG -> ANY/ZERO_EXTEND_VECTOR_INREG

Simplify SIGN_EXTEND_VECTOR_INREG if the extended bits are not required/known zero.

Matches what we already do for SIGN_EXTEND.

llvm-svn: 363802

5 years ago[Syntax] Fix a crash when dumping empty token buffer
Ilya Biryukov [Wed, 19 Jun 2019 13:56:36 +0000 (13:56 +0000)]
[Syntax] Fix a crash when dumping empty token buffer

llvm-svn: 363801

5 years ago[llvm-dwarfdump] --gdb-index: fix uninitialized TuListOffset
Fangrui Song [Wed, 19 Jun 2019 13:51:29 +0000 (13:51 +0000)]
[llvm-dwarfdump] --gdb-index: fix uninitialized TuListOffset

The test only checks the existence of the `Types CU list` line.
Unfortunately I can't make a better test because
{gcc,clang} -fuse-ld={lld,gold} --gdb-index do not give me a non-empty types CU list.

Reviewed By: ikudrin

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

llvm-svn: 363800

5 years agoNew implementation of OpenMP 5.0 detached tasks.
Andrey Churbanov [Wed, 19 Jun 2019 13:23:28 +0000 (13:23 +0000)]
New implementation of OpenMP 5.0 detached tasks.

Patch by Alex Duran

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

llvm-svn: 363799

5 years ago[clangd] Correct the MessageType enum values.
Haojian Wu [Wed, 19 Jun 2019 13:14:59 +0000 (13:14 +0000)]
[clangd] Correct the MessageType enum values.

llvm-svn: 363798

5 years agoRevert rL363678 : AMDGPU: Add ds_gws_init / ds_gws_barrier intrinsics
Simon Pilgrim [Wed, 19 Jun 2019 13:00:54 +0000 (13:00 +0000)]
Revert rL363678 : AMDGPU: Add ds_gws_init / ds_gws_barrier intrinsics

There may or may not be additional work to handle this correctly on
SI/CI.
........
Breaks EXPENSIVE_CHECKS buildbots - http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/78/

llvm-svn: 363797

5 years ago[NFC] Added tests for D63534
David Bolvansky [Wed, 19 Jun 2019 12:59:37 +0000 (12:59 +0000)]
[NFC] Added tests for D63534

llvm-svn: 363796

5 years ago[NFC] Added tests for cttz(abs(x)) -> cttz(x) fold
David Bolvansky [Wed, 19 Jun 2019 12:55:39 +0000 (12:55 +0000)]
[NFC] Added tests for cttz(abs(x)) -> cttz(x) fold

llvm-svn: 363795

5 years ago[OpenCL] Split type and macro definitions into opencl-c-base.h
Sven van Haastregt [Wed, 19 Jun 2019 12:48:22 +0000 (12:48 +0000)]
[OpenCL] Split type and macro definitions into opencl-c-base.h

Using the -fdeclare-opencl-builtins option will require a way to
predefine types and macros such as `int4`, `CLK_GLOBAL_MEM_FENCE`,
etc.  Move these out of opencl-c.h into opencl-c-base.h such that the
latter can be shared by -fdeclare-opencl-builtins and
-finclude-default-header.

This changes the behaviour of -finclude-default-header when
-fdeclare-opencl-builtins is specified: instead of including the full
header, it will include the header with only the base definitions.

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

llvm-svn: 363794

5 years ago[DAGCombiner] Support (shl (ext (shl x, c1)), c2) -> (shl (ext x), (add c1, c2))...
Simon Pilgrim [Wed, 19 Jun 2019 12:41:37 +0000 (12:41 +0000)]
[DAGCombiner] Support (shl (ext (shl x, c1)), c2) -> (shl (ext x), (add c1, c2)) non-uniform folds.

Use matchBinaryPredicate instead of isConstOrConstSplat to let us handle non-uniform shift cases.

llvm-svn: 363793

5 years ago[DAGCombiner] Support (shl (ext (shl x, c1)), c2) -> 0 non-uniform folds.
Simon Pilgrim [Wed, 19 Jun 2019 12:25:29 +0000 (12:25 +0000)]
[DAGCombiner] Support (shl (ext (shl x, c1)), c2) -> 0 non-uniform folds.

Use matchBinaryPredicate instead of isConstOrConstSplat to let us handle non-uniform shift cases.

This requires us to tweak matchBinaryPredicate to allow it to (optionally) handle constants with different type widths.

llvm-svn: 363792

5 years ago[X86] Add non-uniform (shl (ext (shl x, c1)), c2) -> (shl (ext x), (add c1, c2))...
Simon Pilgrim [Wed, 19 Jun 2019 11:36:01 +0000 (11:36 +0000)]
[X86] Add non-uniform (shl (ext (shl x, c1)), c2) -> (shl (ext x), (add c1, c2)) test

llvm-svn: 363791

5 years agoRevert r363116 "[X86] [ABI] Fix i386 ABI "__m64" type bug"
Hans Wennborg [Wed, 19 Jun 2019 11:34:08 +0000 (11:34 +0000)]
Revert r363116 "[X86] [ABI] Fix i386 ABI "__m64" type bug"

This introduced MMX instructions in code that wasn't previously using
them, breaking programs using 64-bit vectors and x87 floating-point in
the same application. See discussion on the code review for more
details.

> According to System V i386 ABI: the  __m64 type paramater and return
> value are passed by MMX registers. But current implementation treats
> __m64 as i64 which results in parameter passing by stack and returning
> by EDX and EAX.
>
> This patch fixes the bug (https://bugs.llvm.org/show_bug.cgi?id=41029)
> for Linux and NetBSD.
>
> Patch by Wei Xiao (wxiao3)
>
> Differential Revision: https://reviews.llvm.org/D59744

llvm-svn: 363790

5 years ago[DAGCombiner] visitSHL - pull out repeated shift amount VT. NFCI.
Simon Pilgrim [Wed, 19 Jun 2019 11:31:26 +0000 (11:31 +0000)]
[DAGCombiner] visitSHL - pull out repeated shift amount VT. NFCI.

llvm-svn: 363789

5 years ago[analyzer][NFC][tests] Pre-normalize expected-sarif files
Hubert Tong [Wed, 19 Jun 2019 11:19:51 +0000 (11:19 +0000)]
[analyzer][NFC][tests] Pre-normalize expected-sarif files

As discussed in the review for D62952, this patch pre-normalizes the
reference expected output sarif files by removing lines containing
fields for which we expect differences that should be ignored.

llvm-svn: 363788

5 years ago[DAGCombine] Fix (shl (ext (shl x, c1)), c2) -> (shl (ext x), (add c1, c2)) comment...
Simon Pilgrim [Wed, 19 Jun 2019 11:17:48 +0000 (11:17 +0000)]
[DAGCombine] Fix (shl (ext (shl x, c1)), c2) -> (shl (ext x), (add c1, c2)) comment. NFCI.

We pre-extend, not post.

llvm-svn: 363787

5 years ago[DebugInfo@O2][LoopVectorize] pr39024: Vectorized code linenos step through loop...
Orlando Cazalet-Hyams [Wed, 19 Jun 2019 10:50:47 +0000 (10:50 +0000)]
[DebugInfo@O2][LoopVectorize] pr39024: Vectorized code linenos step through loop even after completion

Summary:
Bug: https://bugs.llvm.org/show_bug.cgi?id=39024

The bug reports that a vectorized loop is stepped through 4 times and each step through the loop seemed to show a different path. I found two problems here:

A) An incorrect line number on a preheader block (for.body.preheader) instruction causes a step into the loop before it begins.
B) Instructions in the middle block have different line numbers which give the impression of another iteration.

In this patch I give all of the middle block instructions the line number of the scalar loop latch terminator branch. This seems to provide the smoothest debugging experience because the vectorized loops will always end on this line before dropping into the scalar loop. To solve problem A I have altered llvm::SplitBlockPredecessors to accommodate loop header blocks.

I have set up a separate review D61933 for a fix which is required for this patch.

Reviewers: samsonov, vsk, aprantl, probinson, anemet, hfinkel, jmorse

Reviewed By: hfinkel, jmorse

Subscribers: jmorse, javed.absar, eraman, kcc, bjope, jmellorcrummey, hfinkel, gbedwell, hiraditya, zzheng, llvm-commits

Tags: #llvm, #debug-info

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

> llvm-svn: 363046

llvm-svn: 363786

5 years ago[ConstantFolding] Fix assertion failure on non-power-of-two vector load.
Jay Foad [Wed, 19 Jun 2019 10:28:48 +0000 (10:28 +0000)]
[ConstantFolding] Fix assertion failure on non-power-of-two vector load.

Summary:
The test case does an (out of bounds) load from a global constant with
type <3 x float>. InstSimplify tried to turn this into an integer load
of the whole alloc size of the vector, which is 128 bits due to
alignment padding, and then bitcast this to <3 x vector> which failed
an assertion due to the type size mismatch.

The fix is to do an integer load of the normal size of the vector, with
no alignment padding.

Reviewers: tpr, arsenm, majnemer, dstuttard

Reviewed By: arsenm

Subscribers: hfinkel, wdng, llvm-commits

Tags: #llvm

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

llvm-svn: 363784

5 years ago[RISCV] Allow parsing immediates that use tilde & exclaim
Lewis Revill [Wed, 19 Jun 2019 10:27:24 +0000 (10:27 +0000)]
[RISCV] Allow parsing immediates that use tilde & exclaim

This patch allows immediates (and CSR alias immediates) which start with
a tilde token or an exclaim (!) token to be parsed as intended.

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

llvm-svn: 363783

5 years ago[RISCV] Fix failure to parse parenthesized immediates
Lewis Revill [Wed, 19 Jun 2019 10:11:13 +0000 (10:11 +0000)]
[RISCV] Fix failure to parse parenthesized immediates

Since the parser attempts to parse an operand as a register with
parentheses before parsing it as an immediate, immediates in
parentheses should not be parsed by parseRegister. However in the case
where the immediate does not start with an identifier, the LParen is not
unlexed and so the RParen causes an unexpected token error.

This patch adds the missing UnLex, and modifies the existing UnLex to
not use a buffered token, as it should always be unlexing an LParen.

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

llvm-svn: 363782

5 years agoFix r363773: Update Barcelona MCA tests.
Clement Courbet [Wed, 19 Jun 2019 10:00:36 +0000 (10:00 +0000)]
Fix r363773: Update Barcelona MCA tests.

llvm-svn: 363781

5 years agoMake TargetParserTest.ARMExtensionFeatures not run out of memory on 32-bit (PR42316)
Hans Wennborg [Wed, 19 Jun 2019 09:46:37 +0000 (09:46 +0000)]
Make TargetParserTest.ARMExtensionFeatures not run out of memory on 32-bit (PR42316)

The test still probably shouldn't run this loop 17 million times, but at
least now it won't run out of memory.

llvm-svn: 363780

5 years agoRevert r363633 "[CMake] Fix the value of `config.target_cflags` for non-macOS Apple...
Hans Wennborg [Wed, 19 Jun 2019 09:09:39 +0000 (09:09 +0000)]
Revert r363633 "[CMake] Fix the value of `config.target_cflags` for non-macOS Apple platforms. Attempt #2."

This caused Chromium's clang package to stop building, see comment on
https://reviews.llvm.org/D61242 for details.

> Summary:
> The main problem here is that `-*-version_min=` was not being passed to
> the compiler when building test cases. This can cause problems when
> testing on devices running older OSs because Clang would previously
> assume the minimum deployment target is the the latest OS in the SDK
> which could be much newer than what the device is running.
>
> Previously the generated value looked like this:
>
> `-arch arm64 -isysroot
> <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk`
>
> With this change it now looks like:
>
> `-arch arm64 -stdlib=libc++ -miphoneos-version-min=8.0 -isysroot
> <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk`
>
> This mirrors the setting of `config.target_cflags` on macOS.
>
> This change is made for ASan, LibFuzzer, TSan, and UBSan.
>
> To implement this a new `get_test_cflags_for_apple_platform()` function
> has been added that when given an Apple platform name and architecture
> returns a string containing the C compiler flags to use when building
> tests. This also calls a new helper function `is_valid_apple_platform()`
> that validates Apple platform names.
>
> This is the second attempt at landing the patch. The first attempt (r359305)
> had to be reverted (r359327) due to a buildbot failure. The problem was
> that calling `get_test_cflags_for_apple_platform()` can trigger a CMake
> error if the provided architecture is not supported by the current
> CMake configuration. Previously, this could be triggered by passing
> `-DCOMPILER_RT_ENABLE_IOS=OFF` to CMake. The root cause is that we were
> generating test configurations for a list of architectures without
> checking if the relevant Sanitizer actually supported that architecture.
> We now intersect the list of architectures for an Apple platform
> with `<SANITIZER>_SUPPORTED_ARCH` (where `<SANITIZER>` is a Sanitizer
> name) to iterate through the correct list of architectures.
>
> rdar://problem/50124489
>
> Reviewers: kubamracek, yln, vsk, juliehockett, phosek
>
> Subscribers: mgorny, javed.absar, kristof.beyls, #sanitizers, llvm-commits
>
> Tags: #llvm, #sanitizers
>
> Differential Revision: https://reviews.llvm.org/D61242

llvm-svn: 363779

5 years ago[Sanitizers] Fix sanitizer_posix_libcdep.cc compilation on Solaris 11.5
Rainer Orth [Wed, 19 Jun 2019 08:59:05 +0000 (08:59 +0000)]
[Sanitizers] Fix sanitizer_posix_libcdep.cc compilation on Solaris 11.5

A recent build of Solaris 11.5 Beta (st_047) gained madvise(MADV_DONTDUMP)
support for Linux compatibility.  This broke the compiler-rt build:

  /vol/llvm/src/llvm/dist/projects/compiler-rt/lib/sanitizer_comm/sanitizer_posix_libcdep.cc: In function ‘bool __sanitizer::DontDumpShadowMemory(__sanitizer::uptr, __sanitizer::uptr)’:
  /vol/llvm/src/llvm/dist/projects/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc:81:18: error: invalid conversion from ‘void*’ to ‘caddr_t’ {aka ‘char*’} [-fpermissive]
     81 |   return madvise((void *)addr, length, MADV_DONTDUMP) == 0;
        |                  ^~~~~~~~~~~~
        |                  |
        |                  void*
  In file included from
/vol/llvm/src/llvm/dist/projects/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc:32:
  /usr/include/sys/mman.h:231:20: note: initializing argument 1 of ‘int
madvise(caddr_t, std::size_t, int)’
    231 | extern int madvise(caddr_t, size_t, int);
        |                    ^~~~~~~

The obvious fix is to use the same solution that has already been used a
couple of lines earlier:

  // In the default Solaris compilation environment, madvise() is declared
  // to take a caddr_t arg; casting it to void * results in an invalid
  // conversion error, so use char * instead.

This allowed the compiler-rt build to finish and was tested successfully on
i386-pc-solaris2.11 and x86_64-pc-linux-gnu.

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

llvm-svn: 363778

5 years ago[yaml2obj/obj2yaml] - Make RawContentSection::Info Optional<>
George Rimar [Wed, 19 Jun 2019 08:57:38 +0000 (08:57 +0000)]
[yaml2obj/obj2yaml] - Make RawContentSection::Info Optional<>

This allows to customize this field for "implicit" sections properly.

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

llvm-svn: 363777

5 years ago[RISCV] Mark TLS as supported
Lewis Revill [Wed, 19 Jun 2019 08:53:46 +0000 (08:53 +0000)]
[RISCV] Mark TLS as supported

Inform Clang that TLS is implemented by LLVM for RISC-V

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

llvm-svn: 363776

5 years ago[NFC][X86][MCA] Barcelona: add load/store/load-store-throughput tests
Roman Lebedev [Wed, 19 Jun 2019 08:53:34 +0000 (08:53 +0000)]
[NFC][X86][MCA] Barcelona: add load/store/load-store-throughput tests

llvm-svn: 363775

5 years ago[NFC][X86][MCA] BdVer2: add load-store-throughput test
Roman Lebedev [Wed, 19 Jun 2019 08:53:28 +0000 (08:53 +0000)]
[NFC][X86][MCA] BdVer2: add load-store-throughput test

llvm-svn: 363774

5 years ago[X86] Add missing properties on llvm.x86.sse.{st,ld}mxcsr
Clement Courbet [Wed, 19 Jun 2019 08:44:31 +0000 (08:44 +0000)]
[X86] Add missing properties on llvm.x86.sse.{st,ld}mxcsr

Summary:
llvm.x86.sse.stmxcsr only writes to memory.
llvm.x86.sse.ldmxcsr only reads from memory, and might generate an FPE.

Reviewers: craig.topper, RKSimon

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 363773

5 years agoStabilize TestGdbRemoteLibrariesSvr4Support
Pavel Labath [Wed, 19 Jun 2019 08:41:13 +0000 (08:41 +0000)]
Stabilize TestGdbRemoteLibrariesSvr4Support

on some systems this test fails because the two methods it uses to
cross-reference the data don't match in the case of the vdso module. The
"read from /proc/%pid/maps" method returns "[vdso]", while the method
which reads it from the linker rendezvous structures returns
"linux-vdso.so.1". Neither of the two names match any actual file.

This restricts the test to only consider the libraries that we ourselves
have added to the test, minimizing the impact of system dependencies
that we cannot control.

llvm-svn: 363772

5 years ago[RISCV] Add lowering of global TLS addresses
Lewis Revill [Wed, 19 Jun 2019 08:40:59 +0000 (08:40 +0000)]
[RISCV] Add lowering of global TLS addresses

This patch adds lowering for global TLS addresses for the TLS models of
InitialExec, GlobalDynamic, LocalExec and LocalDynamic.

LocalExec support required using a 4-operand add instruction, which uses
the fourth operand to express a relocation on the symbol. The necessary
fixup is emitted when the instruction is emitted.

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

llvm-svn: 363771

5 years agoFix a dangling StringRef in FileCollector
Pavel Labath [Wed, 19 Jun 2019 08:09:56 +0000 (08:09 +0000)]
Fix a dangling StringRef in FileCollector

FileSpec::GetPath returns a temporary std::string.

llvm-svn: 363770

5 years agovs integration: bump version nbr
Hans Wennborg [Wed, 19 Jun 2019 07:39:53 +0000 (07:39 +0000)]
vs integration: bump version nbr

llvm-svn: 363769

5 years agoRevert r359557 "vs integration: vs2019 support"
Hans Wennborg [Wed, 19 Jun 2019 07:37:53 +0000 (07:37 +0000)]
Revert r359557 "vs integration: vs2019 support"

Turns out this worked on my machine because I still had VS2017 installed, but
it didn't actually work in general.

Since the extension is unmaintained and MS is doing their own LLVM toolset
integration for VS2019, let's just revert.

llvm-svn: 363768

5 years agoDWARF: Make DIERefs always valid
Pavel Labath [Wed, 19 Jun 2019 07:32:39 +0000 (07:32 +0000)]
DWARF: Make DIERefs always valid

Summary:
This patch makes the DIERef class always valid by default constructor
and operator bool. This allows one to express the validity of a DIERef
in the type system. Places which are working with potentially-invalid
DIERefs have been updated to use Optional<DIERef> instead.

The constructor taking a DWARFFormValue was not needed, as all places
which were constructing a DIERef this way were immediately converting it
into a DWARFDIE or a user_id. This can be done without constructing an
intermediate DIERef.

Reviewers: JDevlieghere, clayborg, aprantl

Subscribers: arphaman, lldb-commits

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

llvm-svn: 363767

5 years agoRevert "[clangd] Return vector<TextEdit> from applyTweak. NFC"
Sam McCall [Wed, 19 Jun 2019 07:29:10 +0000 (07:29 +0000)]
Revert "[clangd] Return vector<TextEdit> from applyTweak. NFC"

This reverts commit r363691.

llvm-svn: 363766

5 years ago[clangd] Add ClangdServer accessor for buffer contents
Sam McCall [Wed, 19 Jun 2019 07:29:05 +0000 (07:29 +0000)]
[clangd] Add ClangdServer accessor for buffer contents

llvm-svn: 363765

5 years ago[libc++] Revert r363692 which implements P0608R3
Zhihao Yuan [Wed, 19 Jun 2019 07:11:08 +0000 (07:11 +0000)]
[libc++] Revert r363692 which implements P0608R3

The change caused a large number of compiler failures in
Google's codebase.  People need time to evaluate the impact.

llvm-svn: 363764

5 years agoTest commit access
Yuanfang Chen [Wed, 19 Jun 2019 05:40:24 +0000 (05:40 +0000)]
Test commit access

llvm-svn: 363763

5 years ago[RISCV] Fix test after r363757
Alex Bradbury [Wed, 19 Jun 2019 03:18:48 +0000 (03:18 +0000)]
[RISCV] Fix test after r363757

r363757 renamed ExpandISelPseudo to FinalizeISel, so the RUN line in
select-optimize-multiple.mir needed updating to refer to finalize-isel.

llvm-svn: 363762

5 years ago[TEST] Fix test on Windows by looking for substrings rather than a regex
Douglas Yung [Wed, 19 Jun 2019 03:02:33 +0000 (03:02 +0000)]
[TEST] Fix test on Windows by looking for substrings rather than a regex
since the escaping of special characters appears to break on Windows.

llvm-svn: 363761

5 years agoFix more tests after r363749
Aaron Puchert [Wed, 19 Jun 2019 01:54:05 +0000 (01:54 +0000)]
Fix more tests after r363749

Apparently -Wmissing-prototypes is used for quite a few integration
tests.

llvm-svn: 363760

5 years agogit-clang-format: Remove trailing whitespace in docstring. NFC.
Sam Clegg [Wed, 19 Jun 2019 01:52:41 +0000 (01:52 +0000)]
git-clang-format: Remove trailing whitespace in docstring. NFC.

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

llvm-svn: 363759

5 years ago[NFC] move some hardware loop checking code to a common place for other using.
Chen Zheng [Wed, 19 Jun 2019 01:26:31 +0000 (01:26 +0000)]
[NFC] move some hardware loop checking code to a common place for other using.
Differential Revision: https://reviews.llvm.org/D63478

llvm-svn: 363758

5 years agoRename ExpandISelPseudo->FinalizeISel, delay register reservation
Matt Arsenault [Wed, 19 Jun 2019 00:25:39 +0000 (00:25 +0000)]
Rename ExpandISelPseudo->FinalizeISel, delay register reservation

This allows targets to make more decisions about reserved registers
after isel. For example, now it should be certain there are calls or
stack objects in the frame or not, which could have been introduced by
legalization.

Patch by Matthias Braun

llvm-svn: 363757

5 years ago[WebAssembly] Optimize ISel for SIMD Boolean reductions
Thomas Lively [Wed, 19 Jun 2019 00:02:13 +0000 (00:02 +0000)]
[WebAssembly] Optimize ISel for SIMD Boolean reductions

Summary:
Converting the result *.{all,any}_true to a bool at the source level
generates LLVM IR that compares the result to 0. This check is
redundant since these instructions already return either 0 or 1 and
therefore conform to the BooleanContents setting for WebAssembly. This
CL adds patterns to detect and remove such redundant operations on the
result of Boolean reductions.

Reviewers: dschuff, aheejin

Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

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

llvm-svn: 363756

5 years agoDon't crash if PR_SET_VMA_ANON_NAME fails.
Evgeniy Stepanov [Tue, 18 Jun 2019 23:50:43 +0000 (23:50 +0000)]
Don't crash if PR_SET_VMA_ANON_NAME fails.

This prctl is not implemented on very old devices.
It is not necessary for the core functionality of the tool. Simply
ignore the failure.

llvm-svn: 363755