platform/upstream/llvm.git
5 years ago[CodeGen] Add missing comment (NFC)
Evandro Menezes [Wed, 24 Jul 2019 21:45:14 +0000 (21:45 +0000)]
[CodeGen] Add missing comment (NFC)

Add similar comments on the load limits pertaining to `memcmp()` similar to
those for other string functions.

llvm-svn: 366947

5 years ago[Remarks] Add support for serializing metadata for every remark streamer
Francis Visoiu Mistrih [Wed, 24 Jul 2019 21:29:44 +0000 (21:29 +0000)]
[Remarks] Add support for serializing metadata for every remark streamer

This allows every serializer format to implement metaSerializer() and
return the corresponding meta serializer.

llvm-svn: 366946

5 years ago[InstCombine] Teach foldOrOfICmps to allow icmp eq MIN_INT/MAX to be part of a range...
Craig Topper [Wed, 24 Jul 2019 20:57:29 +0000 (20:57 +0000)]
[InstCombine] Teach foldOrOfICmps to allow icmp eq MIN_INT/MAX to be part of a range comparision. Similar for foldAndOfICmps

We can treat icmp eq X, MIN_UINT as icmp ule X, MIN_UINT and allow
it to merge with icmp ugt X, C. Similar for the other constants.

We can do simliar for icmp ne X, (U)INT_MIN/MAX in foldAndOfICmps. And we already handled UINT_MIN there.

Fixes PR42691.

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

llvm-svn: 366945

5 years ago[LLD] Do not print additional newlines after reaching error limit
Alexander Richardson [Wed, 24 Jul 2019 20:56:23 +0000 (20:56 +0000)]
[LLD] Do not print additional newlines after reaching error limit

Summary:
This could previously happen if errors that are emitted after reaching the
error limit. In that case, the flag inside the newline() function will be
set to true which causes the next call to print a newline even though the
actual message will be discarded.

Reviewers: ruiu, grimar, MaskRay, espindola

Reviewed By: ruiu

Subscribers: emaste, llvm-commits

Tags: #llvm

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

llvm-svn: 366944

5 years ago[AArch64][GlobalISel] Fix a crash during s128 G_ICMP legalization due to r366317.
Amara Emerson [Wed, 24 Jul 2019 20:46:42 +0000 (20:46 +0000)]
[AArch64][GlobalISel] Fix a crash during s128 G_ICMP legalization due to r366317.

r366317 added a legalization for s128 G_ICMP narrow scalar which tried to hard
code the result type of the new legalized G_SELECT. Change this to instead use
type of the original G_ICMP result and allow the target to legalize it if necessary
later.

llvm-svn: 366943

5 years agoLet CorrelatedValuePropagation preserve LazyValueInfo
David Bolvansky [Wed, 24 Jul 2019 20:27:32 +0000 (20:27 +0000)]
Let CorrelatedValuePropagation preserve LazyValueInfo

Summary:
This patch makes CorrelatedValuePropagation preserve LazyValueInfo by adding LazyValueInfo::eraseValue & calling it whenever an instruction is erased.

Passes `make check` , test-suite, and SPECrate 2017.

Patch by aqjune (Juneyoung Lee)

Reviewers: reames, mzolotukhin

Reviewed By: reames

Subscribers: xbolva00, llvm-commits

Tags: #llvm

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

llvm-svn: 366942

5 years agoFix exporting SARIF files from scan-build on Windows.
Aaron Ballman [Wed, 24 Jul 2019 20:03:27 +0000 (20:03 +0000)]
Fix exporting SARIF files from scan-build on Windows.

In Perl, -z is defined as checking if a "file has zero size" and makes no mention what it does when given a directory. It looks like the behavior differs across platforms, which is why on Windows the SARIF file was always being deleted.

Patch by Joe Ranieri.

llvm-svn: 366941

5 years ago[Remarks][NFC] Rename remarks::Serializer to remarks::RemarkSerializer
Francis Visoiu Mistrih [Wed, 24 Jul 2019 19:47:57 +0000 (19:47 +0000)]
[Remarks][NFC] Rename remarks::Serializer to remarks::RemarkSerializer

llvm-svn: 366939

5 years ago[AMDGPU] Increase kernel padding
Stanislav Mekhanoshin [Wed, 24 Jul 2019 19:40:13 +0000 (19:40 +0000)]
[AMDGPU] Increase kernel padding

To support prefetch mode 3 we need to pad current
cacheline and fill 3 cachelines after. Current padding
is only sufficient for mode 2.

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

llvm-svn: 366938

5 years agoRevert "[yaml2obj] - Allow custom fields for the SHT_UNDEF sections."
JF Bastien [Wed, 24 Jul 2019 18:29:33 +0000 (18:29 +0000)]
Revert "[yaml2obj] - Allow custom fields for the SHT_UNDEF sections."

It fails on macOS with the following error:
  https://reviews.llvm.org/D65140#1599522

llvm-svn: 366937

5 years ago[Logging] Replace Log::Printf with LLDB_LOG macro (NFC)
Jonas Devlieghere [Wed, 24 Jul 2019 17:56:10 +0000 (17:56 +0000)]
[Logging] Replace Log::Printf with LLDB_LOG macro (NFC)

This patch replaces explicit calls to log::Printf with the new LLDB_LOGF
macro. The macro is similar to LLDB_LOG but supports printf-style format
strings, instead of formatv-style format strings.

So instead of writing:

  if (log)
    log->Printf("%s\n", str);

You'd write:

  LLDB_LOG(log, "%s\n", str);

This change was done mechanically with the command below. I replaced the
spurious if-checks with vim, since I know how to do multi-line
replacements with it.

  find . -type f -name '*.cpp' -exec \
  sed -i '' -E 's/log->Printf\(/LLDB_LOGF\(log, /g' "{}" +

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

llvm-svn: 366936

5 years agoFix signed/unsigned comparison warning. NFCI.
Simon Pilgrim [Wed, 24 Jul 2019 17:44:22 +0000 (17:44 +0000)]
Fix signed/unsigned comparison warning. NFCI.

llvm-svn: 366935

5 years ago[ARM] Rewrite how VCMP are lowered, using a single node
David Green [Wed, 24 Jul 2019 17:36:47 +0000 (17:36 +0000)]
[ARM] Rewrite how VCMP are lowered, using a single node

This removes the VCEQ/VCNE/VCGE/VCEQZ/etc nodes, just using two called VCMP and
VCMPZ with an extra operand as the condition code. I believe this will make
some combines simpler, allowing us to just look at these codes and not the
operands. It also helps fill in a missing VCGTUZ MVE selection without adding
extra nodes for it.

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

llvm-svn: 366934

5 years ago[DAGCombine] matchBinOpReduction - add partial reduction matching
Simon Pilgrim [Wed, 24 Jul 2019 17:29:56 +0000 (17:29 +0000)]
[DAGCombine] matchBinOpReduction - add partial reduction matching

This patch adds support for recognizing cases where a larger vector type is being used to reduce just the elements in the lower subvector:

e.g. <8 x i32> reduction pattern in a <16 x i32> vector:

<4,5,6,7,u,u,u,u,u,u,u,u,u,u,u,u>
<2,3,u,u,u,u,u,u,u,u,u,u,u,u,u,u>
<1,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u>

matchBinOpReduction returns the lower extracted subvector in such cases, assuming isExtractSubvectorCheap accepts the extraction.

I've only enabled it for X86 reduction sums so far. I intend to enable it for the bitop/minmax cases in future patches, and eventually I think its worth turning it on all the time. This is mainly just a case of ensuring calls to matchBinOpReduction don't make assumptions on the vector width based on the original vector extraction.

Fixes the x86 partial reduction sum cases in PR33758 and PR42023.

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

llvm-svn: 366933

5 years ago[lldb] Configure debugserver_vers.c from CMake
Stefan Granitz [Wed, 24 Jul 2019 17:28:24 +0000 (17:28 +0000)]
[lldb] Configure debugserver_vers.c from CMake

llvm-svn: 366932

5 years ago[ARM] Disable MVE fptosi and friends
David Green [Wed, 24 Jul 2019 17:26:26 +0000 (17:26 +0000)]
[ARM] Disable MVE fptosi and friends

The prevents us from trying to convert an i1 predicate vector to a float, or
vice-versa. Better patterns are possible, which will follow in a subsequent
commit. For now we just expand them.

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

llvm-svn: 366931

5 years ago[AArch64][GlobalISel] Make vector dup optimization look at last elt of ZeroVec
Jessica Paquette [Wed, 24 Jul 2019 17:18:51 +0000 (17:18 +0000)]
[AArch64][GlobalISel] Make vector dup optimization look at last elt of ZeroVec

Fix an off-by-one error which made us not look at the last element of the
zero vector. This caused a miscompile in 188.ammp.

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

llvm-svn: 366930

5 years agoclang-format: Add another test like r366926
Nico Weber [Wed, 24 Jul 2019 17:15:47 +0000 (17:15 +0000)]
clang-format: Add another test like r366926

llvm-svn: 366929

5 years ago[ARM] More MVE compare vector splat combines for ANDs
David Green [Wed, 24 Jul 2019 17:08:09 +0000 (17:08 +0000)]
[ARM] More MVE compare vector splat combines for ANDs

Adds some extra r register compare combines, this time for ANDs.

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

llvm-svn: 366928

5 years agogn build: Merge r366919
Nico Weber [Wed, 24 Jul 2019 17:04:44 +0000 (17:04 +0000)]
gn build: Merge r366919

llvm-svn: 366927

5 years agoclang-format: Add a test that shows that some code I thought was dead is not dead.
Nico Weber [Wed, 24 Jul 2019 17:01:57 +0000 (17:01 +0000)]
clang-format: Add a test that shows that  some code I thought was dead is not dead.

llvm-svn: 366926

5 years ago[InstCombine] Adjusted pow-exp tests for Windows [NFC]
David Bolvansky [Wed, 24 Jul 2019 17:01:20 +0000 (17:01 +0000)]
[InstCombine] Adjusted pow-exp tests for Windows [NFC]

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

Reviewers: efriedma, hans

Reviewed By: hans

Subscribers: spatel, llvm-commits

Tags: #llvm

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

llvm-svn: 366925

5 years ago[ARM] MVE compare vector splat combine
David Green [Wed, 24 Jul 2019 16:58:41 +0000 (16:58 +0000)]
[ARM] MVE compare vector splat combine

MVE VCMP instructions can use a general purpose register as the second operand.
This adds the combines for it, selecting from a compare of a vdup.

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

llvm-svn: 366924

5 years ago[llvm-objdump] Emit warning if --start-address/--stop-address specify range outside...
Yuanfang Chen [Wed, 24 Jul 2019 16:55:30 +0000 (16:55 +0000)]
[llvm-objdump] Emit warning if --start-address/--stop-address specify range outside file's address range.

NB: the warning is about the input file itself regardless of the options used
such as `-r`, `-s` etc..

https://bugs.llvm.org/show_bug.cgi?id=41911

Reviewers: jhenderson, grimar, MaskRay, rupprecht

Reviewed by: MaskRay, jhenderson

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

llvm-svn: 366923

5 years ago[SelectionDAG] makeEquivalentMemoryOrdering - early out for equal chains (PR42727)
Simon Pilgrim [Wed, 24 Jul 2019 16:53:14 +0000 (16:53 +0000)]
[SelectionDAG] makeEquivalentMemoryOrdering - early out for equal chains (PR42727)

If we are already using the same chain for the old/new memory ops then just return.

Fixes PR42727 which had getLoad() reusing an existing node.

llvm-svn: 366922

5 years ago[AMDGPU][MC][GFX10] Enabled GFX10 assembly with arbitrary wavesize assumed by the...
Dmitry Preobrazhensky [Wed, 24 Jul 2019 16:50:17 +0000 (16:50 +0000)]
[AMDGPU][MC][GFX10] Enabled GFX10 assembly with arbitrary wavesize assumed by the code

Reviewers: rampitec, arsenm

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

llvm-svn: 366921

5 years ago[ARM] Better OR's for MVE compares
David Green [Wed, 24 Jul 2019 16:42:09 +0000 (16:42 +0000)]
[ARM] Better OR's for MVE compares

This adds a DeMorgan combine for OR's of compares to turn them into AND's,
helping prevent them from going into and out of gpr registers. It also fills in
the VCLE and VCLT nodes that MVE can select, allowing it to invert more
compares.

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

llvm-svn: 366920

5 years ago[Remarks] Simplify the creation of remark serializers
Francis Visoiu Mistrih [Wed, 24 Jul 2019 16:36:35 +0000 (16:36 +0000)]
[Remarks] Simplify the creation of remark serializers

Introduce two new functions to create a serializer, and add support for
more combinations to the YAMLStrTabSerializer.

llvm-svn: 366919

5 years ago[scudo][standalone] Optimization pass
Kostya Kortchinsky [Wed, 24 Jul 2019 16:36:01 +0000 (16:36 +0000)]
[scudo][standalone] Optimization pass

Summary:
This introduces a bunch of small optimizations with the purpose of
making the fastpath tighter:
- tag more conditions as `LIKELY`/`UNLIKELY`: as a rule of thumb we
  consider that every operation related to the secondary is unlikely
- attempt to reduce the number of potentially extraneous instructions
- reorganize the `Chunk` header to not straddle a word boundary and
  use more appropriate types

Note that some `LIKELY`/`UNLIKELY` impact might be less obvious as
they are in slow paths (for example in `secondary.cc`), but at this
point I am throwing a pretty wide net, and it's consistant and doesn't
hurt.

This was mosly done for the benfit of Android, but other platforms
benefit from it too. An aarch64 Android benchmark gives:
- before:
```
  BM_youtube/min_time:15.000/repeats:4/manual_time_mean              445244 us       659385 us            4
  BM_youtube/min_time:15.000/repeats:4/manual_time_median            445007 us       658970 us            4
  BM_youtube/min_time:15.000/repeats:4/manual_time_stddev               885 us         1332 us            4
```
- after:
```
  BM_youtube/min_time:15.000/repeats:4/manual_time_mean       415697 us       621925 us            4
  BM_youtube/min_time:15.000/repeats:4/manual_time_median     415913 us       622061 us            4
  BM_youtube/min_time:15.000/repeats:4/manual_time_stddev        990 us         1163 us            4
```

Additional since `-Werror=conversion` is enabled on some platforms we
are built on, enable it upstream to catch things early: a few sign
conversions had slept through and needed additional casting.

Reviewers: hctim, morehouse, eugenis, vitalybuka

Reviewed By: vitalybuka

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

Tags: #llvm, #sanitizers

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

llvm-svn: 366918

5 years ago[AMDGPU] Add all vgpr classes to asm parser
Stanislav Mekhanoshin [Wed, 24 Jul 2019 16:21:18 +0000 (16:21 +0000)]
[AMDGPU] Add all vgpr classes to asm parser

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

llvm-svn: 366917

5 years agoAMDGPU: Fix test after r366913
Matt Arsenault [Wed, 24 Jul 2019 16:05:55 +0000 (16:05 +0000)]
AMDGPU: Fix test after r366913

llvm-svn: 366916

5 years agoAMDGPU/GlobalISel: Don't assume instruction can be erased when selecting exts
Matt Arsenault [Wed, 24 Jul 2019 16:05:53 +0000 (16:05 +0000)]
AMDGPU/GlobalISel: Don't assume instruction can be erased when selecting exts

The G_ANYEXT handling can end up reaching selectCOPY, which mutates
the instruction in place.

llvm-svn: 366915

5 years ago[SDAG] convert (sub x, 1) to (add x, -1) in ctpop expansion; NFC
Sanjay Patel [Wed, 24 Jul 2019 15:43:50 +0000 (15:43 +0000)]
[SDAG] convert (sub x, 1) to (add x, -1) in ctpop expansion; NFC

We canonicalize to the add form, so create that directly for efficiency.

llvm-svn: 366914

5 years agoAMDGPU: Only allow FP types for format buffer intrinics
Matt Arsenault [Wed, 24 Jul 2019 15:37:51 +0000 (15:37 +0000)]
AMDGPU: Only allow FP types for format buffer intrinics

The code already somewhat assumes this is the case anyway.

llvm-svn: 366913

5 years ago[AIX][lit] Don't depend on psutil on AIX
David Tenty [Wed, 24 Jul 2019 15:04:27 +0000 (15:04 +0000)]
[AIX][lit] Don't depend on psutil on AIX

Summary:
On AIX psutil can run into problems with permissions to read the process
tree, which causes problems for python timeout tests which need to kill off
a test and it's children.

This patch adds a workaround by invoking shell via subprocess and using a
platform specific option to ps to list all the descendant processes so we can
kill them. We add some checks so lit can tell whether timeout tests are
supported with out exposing whether we are utilizing the psutil
implementation or the alternative.

Reviewers: hubert.reinterpretcast, andusy, davide, delcypher

Reviewed By: delcypher

Subscribers: davide, delcypher, christof, lldb-commits, libcxx-commits, llvm-commits

Tags: #lldb, #libc, #llvm

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

llvm-svn: 366912

5 years ago[Support] Fix `-ftime-trace-granularity` option
Anton Afanasyev [Wed, 24 Jul 2019 14:55:40 +0000 (14:55 +0000)]
[Support] Fix `-ftime-trace-granularity` option

Summary:
Move `-ftime-trace-granularity` option to frontend options. Without patch
this option is showed up in the help for any tool that links libSupport.

Reviewers: sammccall

Subscribers: hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

llvm-svn: 366911

5 years ago[ARM] Better AND's for MVE compares
David Green [Wed, 24 Jul 2019 14:42:05 +0000 (14:42 +0000)]
[ARM] Better AND's for MVE compares

Add a number of folds to convert and(vcmp, vcmp) into a single VPT block, where
the second vcmp becomes predicated on the first.

The VCMP; VPST; VCMP will eventually be converted to VPT; VCMP in the
VPTBlockPass.

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

llvm-svn: 366910

5 years ago[ARM] MVE floating point compares and selects
David Green [Wed, 24 Jul 2019 14:28:22 +0000 (14:28 +0000)]
[ARM] MVE floating point compares and selects

Much like integers, this adds MVE floating point compares and select. It
requires a lot more buildvector/shuffle code because we may need to expand the
compares without mve.fp, and requires support for and/or because of the way we
lower llvm condition codes.

Some original code by David Sherwood

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

llvm-svn: 366909

5 years ago[llvm-ar][test] Fix move operation tests
Owen Reynolds [Wed, 24 Jul 2019 14:26:18 +0000 (14:26 +0000)]
[llvm-ar][test] Fix move operation tests

This fixes two tests that did not remove existing archives
before testing due to mistyped archive names.

llvm-svn: 366908

5 years ago[ARM] Basic And/Or/Xor handling for MVE predicates
David Green [Wed, 24 Jul 2019 14:17:54 +0000 (14:17 +0000)]
[ARM] Basic And/Or/Xor handling for MVE predicates

This adds some basic, "worst case" handling for MVE predicate Or/And/Xor. It
does this by going into and out of GPRs, doing the operation on scalars.

Code by David Sherwood.

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

llvm-svn: 366907

5 years agoSilence a conversion warning after r366887. NFC
Paul Robinson [Wed, 24 Jul 2019 14:15:02 +0000 (14:15 +0000)]
Silence a conversion warning after r366887. NFC

llvm-svn: 366906

5 years ago[ARM] Make sure that the constant pool does not keep in the middle of an IT block.
Simi Pallipurath [Wed, 24 Jul 2019 13:54:14 +0000 (13:54 +0000)]
[ARM] Make sure that the constant pool does not keep in the middle of an IT block.

This change make sure that llvm does not emit an invalid IT block
by putting the constant pool in the middle of an IT block.

We have code to try to avoid putting a constant island in the middle of an
IT block, but it only works if we see an IT between the one currently
referencing CPE and possible insertion point. If the first instruction
we look at is the VLDRD after the IT , we never see the IT and does not
realize that the instruction doing the load could be in an IT block itself.

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

Change-Id: I24cecb37cded75e8992870bd997f6226853bd920
llvm-svn: 366905

5 years agoTest commit. NFC.
Sjoerd Meijer [Wed, 24 Jul 2019 13:30:36 +0000 (13:30 +0000)]
Test commit. NFC.

Removed 2 trailing whitespaces in 2 files that used to be in different
repos to test my new github monorepo workflow.

llvm-svn: 366904

5 years agoFix @skipIfSanitized decorator
Pavel Labath [Wed, 24 Jul 2019 13:05:56 +0000 (13:05 +0000)]
Fix @skipIfSanitized decorator

To run the test the decorator function should return None, not False.
Returning anything other than None skips the test.

llvm-svn: 366903

5 years ago[InstSimplify] Rename SimplifyFPUnOp and SimplifyFPBinOp
Jay Foad [Wed, 24 Jul 2019 12:50:10 +0000 (12:50 +0000)]
[InstSimplify] Rename SimplifyFPUnOp and SimplifyFPBinOp

Summary:
SimplifyFPBinOp is a variant of SimplifyBinOp that lets you specify
fast math flags, but the name is misleading because both functions
can simplify both FP and non-FP ops. Instead, overload SimplifyBinOp
so that you can optionally specify fast math flags.

Likewise for SimplifyFPUnOp.

Reviewers: spatel

Reviewed By: spatel

Subscribers: xbolva00, cameron.mcinally, eraman, hiraditya, haicheng, zzheng, llvm-commits

Tags: #llvm

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

llvm-svn: 366902

5 years ago[InstCombine] add tests for load narrowing; NFC
Sanjay Patel [Wed, 24 Jul 2019 12:44:21 +0000 (12:44 +0000)]
[InstCombine] add tests for load narrowing; NFC

Baseline results for D64432.

llvm-svn: 366901

5 years ago[clangd] Add categories to help options, and only show clangd options.
Sam McCall [Wed, 24 Jul 2019 12:41:52 +0000 (12:41 +0000)]
[clangd] Add categories to help options, and only show clangd options.

Summary:
Restricting the categories prevents extra unwanted options from creeping into
help (D60663), and removes a bunch of noise from --help-hidden.

While here, remove `static` from the opts in favor of an anon namespace, to
reduce the noise level.

Reviewers: hokein

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 366900

5 years ago[FileCheck] Use ASSERT for fatal unit tests
Thomas Preud'homme [Wed, 24 Jul 2019 12:38:34 +0000 (12:38 +0000)]
[FileCheck] Use ASSERT for fatal unit tests

Summary:
A number of EXPECT statements in FileCheck's unit tests are dependent
from results of other values being tested. This commit changes those
earlier test to use ASSERT instead of EXPECT to avoid cascade errors
when they are all related to the same issue.

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya

Tags: #llvm

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

> llvm-svn: 366862

llvm-svn: 366899

5 years ago[FileCheck]] Canonicalize caret location testing
Thomas Preud'homme [Wed, 24 Jul 2019 12:38:29 +0000 (12:38 +0000)]
[FileCheck]] Canonicalize caret location testing

Summary:
Testing of caret location in diagnostic message is currently made with
CHECK directive with the following general format:
CHECK: {{^         \^$}}

James Henderson suggested the following would be more readable:
CHECK: {{^}}         ^{{$}}

and when whole lines can be matched (as is the case for command-line
testing where error messages do not include path):
CHECK:         ^
using the option --match-full-lines.

This commit implements these 2 changes on all existing caret position
tests. It also aligns the caret to the character it is trying to match
in the above line.

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya

Tags: #llvm

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

> llvm-svn: 366861

llvm-svn: 366898

5 years agoFileCheck [8/12]: Define numeric var from expr
Thomas Preud'homme [Wed, 24 Jul 2019 12:38:22 +0000 (12:38 +0000)]
FileCheck [8/12]: Define numeric var from expr

Summary:
This patch is part of a patch series to add support for FileCheck
numeric expressions. This specific patch lift the restriction for a
numeric expression to either be a variable definition or a numeric
expression to try to match.

This commit allows a numeric variable to be set to the result of the
evaluation of a numeric expression after it has been matched
successfully. When it happens, the variable is allowed to be used on
the same line since its value is known at match time.

It also makes use of this possibility to reuse the parsing code to
parse a command-line definition by crafting a mirror string of the
-D option with the equal sign replaced by a colon sign, e.g. for option
'-D#NUMVAL=10' it creates the string
'-D#NUMVAL=10 (parsed as [[#NUMVAL:10]])' where the numeric expression
is parsed to define NUMVAL. This result in a few tests needing updating
for the location diagnostics on top of the tests for the new feature.

It also enables empty numeric expression which match any number without
defining a variable. This is done here rather than in commit #5 of the
patch series because it requires to dissociate automatic regex insertion
in RegExStr from variable definition which would make commit #5 even
bigger than it already is.

Copyright:
    - Linaro (changes up to diff 183612 of revision D55940)
    - GraphCore (changes in later versions of revision D55940 and
                 in new revision created off D55940)

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield

Tags: #llvm

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

> llvm-svn: 366860

llvm-svn: 366897

5 years ago[llvm-objdump] - Import the test/Object/X86/no-start-symbol.test test case and rewrit...
George Rimar [Wed, 24 Jul 2019 12:24:43 +0000 (12:24 +0000)]
[llvm-objdump] - Import the test/Object/X86/no-start-symbol.test test case and rewrite it to use YAML.

This patch removes test/Object/X86/no-start-symbol.test (rewrites
it to use YAML and moves it to llvm-objdump tests folder).

(This test was initially introduced in rL239039, but now there
is no reason to keep the precompiled binary it seems).

DIfferential revision: https://reviews.llvm.org/D65136

llvm-svn: 366896

5 years ago[Object/llvm-readobj] - Cleanup testing of the dynamic objects.
George Rimar [Wed, 24 Jul 2019 12:20:42 +0000 (12:20 +0000)]
[Object/llvm-readobj] - Cleanup testing of the dynamic objects.

This patch touches a few test cases:

It removes dtflags.elf-x86-64 binary and elf-dtflags.test.
elf-dtflags.test is excessive because we have the
elf-dynamic-tags.test which test all non-machine specific tags.

It removes testing of --dynamic-table from test\Object\readobj-shared-object.test
(we have the elf-dynamic-tags.test for that), and simplifies this test case.

It moves testing of the headers from readobj-shared-object.test
to elf-file-headers.test.

Adds test/tools/llvm-readobj/elf-file-types.test and test/tools/llvm-readobj/elf-loadname.test.

It opens road for removing the readobj-shared-object.test completely soon.

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

llvm-svn: 366895

5 years ago[yaml2obj] - Allow custom fields for the SHT_UNDEF sections.
George Rimar [Wed, 24 Jul 2019 12:16:22 +0000 (12:16 +0000)]
[yaml2obj] - Allow custom fields for the SHT_UNDEF sections.

This is a follow-up refactoring patch for recently
introduced functionality which which reduces the code duplication
and also makes possible to redefine all possible fields of
the first SHT_NULL section (previously it was only possible to set
sh_link and sh_size).

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

llvm-svn: 366894

5 years ago[clangd] SelectionTree treats TranslationUnitDecl (mostly) consistently with other...
Sam McCall [Wed, 24 Jul 2019 12:14:56 +0000 (12:14 +0000)]
[clangd] SelectionTree treats TranslationUnitDecl (mostly) consistently with other containers.

Summary:
Previously TranslationUnitDecl would never be selected.
This means root() is never null, and returns a reference.

commonAncestor() is in principle never null also, but returning TUDecl
here requires tweaks to be careful not to traverse it (this was already
possible when selecting multiple top-level decls, and there are associated bugs!)
Instead, never allow commonAncestor() to return TUDecl, return null instead.

Reviewers: hokein

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 366893

5 years ago[lldb] Fix build errors from tablegenify platform commit
Raphael Isemann [Wed, 24 Jul 2019 12:08:08 +0000 (12:08 +0000)]
[lldb] Fix build errors from tablegenify platform commit

Forgot to stage some changes...

llvm-svn: 366892

5 years ago[lldb][NFC] Tablegenify platform
Raphael Isemann [Wed, 24 Jul 2019 12:05:42 +0000 (12:05 +0000)]
[lldb][NFC] Tablegenify platform

llvm-svn: 366891

5 years ago[ARM] MVE predicate register support
David Green [Wed, 24 Jul 2019 11:51:36 +0000 (11:51 +0000)]
[ARM] MVE predicate register support

This adds support code for building and shuffling i1 predicate registers. It
generally uses two basic principles, either converting the predicate into an
scalar (through a PREDICATE_CAST) and doing scalar operations on it there, or
by converting the register to an full vector register and back.

Some of the code here is a not super efficient but will hopefully cover most
cases of moving i1 vectors around and can be improved in subsequent patches.

Some code by David Sherwood.

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

llvm-svn: 366890

5 years agoRevert "Revert "[lldb] [Process/NetBSD] Fix constructor after r363707""
Michal Gorny [Wed, 24 Jul 2019 11:44:43 +0000 (11:44 +0000)]
Revert "Revert "[lldb] [Process/NetBSD] Fix constructor after r363707""

The relevant changes have been reapplied, and broke build again.

llvm-svn: 366889

5 years ago[mips] Assign R_TLS type to the R_MIPS_TLS_TPREL_XXX relocations. NFC
Simon Atanasyan [Wed, 24 Jul 2019 11:37:13 +0000 (11:37 +0000)]
[mips] Assign R_TLS type to the R_MIPS_TLS_TPREL_XXX relocations. NFC

That allows to remove duplicated code which subtracts 0x7000 from the
R_MIPS_TLS_TPREL_XXX relocations values in the `MIPS::relocateOne`
function.

llvm-svn: 366888

5 years ago[DWARF][NFC] Add constants for reserved values of an initial length field.
Igor Kudrin [Wed, 24 Jul 2019 11:34:29 +0000 (11:34 +0000)]
[DWARF][NFC] Add constants for reserved values of an initial length field.

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

llvm-svn: 366887

5 years agoRecommit rr366796 "[Object/ELF.h] - Improve testing of the fields in ELFFile<ELFT...
George Rimar [Wed, 24 Jul 2019 11:24:37 +0000 (11:24 +0000)]
Recommit rr366796 "[Object/ELF.h] - Improve testing of the fields in ELFFile<ELFT>::sections()."

With a fix of the issue found by UBSan.

Original commit message:

This eliminates a one error untested and
also introduces a error for one more possible case
which lead to crash previously.

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

llvm-svn: 366886

5 years ago[ARM] MVE integer compares and selects
David Green [Wed, 24 Jul 2019 11:08:14 +0000 (11:08 +0000)]
[ARM] MVE integer compares and selects

This adds the very basics for MVE vector predication, adding integer VCMP and
VSEL instruction support. This is done through predicate registers (MVT::v16i1,
MVT::v8i1, MVT::v4i1), but otherwise using same mechanics as NEON to custom
lower setcc's through ARMISD::VCXX nodes (VCEQ, VCGT, VCEQZ, etc).

An extra VCNE was added, as this can be handled sensibly by MVE's expanded
number of VCMP condition codes. (There are also VCLE and VCLT which are added
later).

VPSEL is also added here, simply selecting on the vselect.

Original code by David Sherwood.

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

llvm-svn: 366885

5 years ago[CrossTU] Add a function to retrieve original source location.
Balazs Keri [Wed, 24 Jul 2019 10:16:37 +0000 (10:16 +0000)]
[CrossTU] Add a function to retrieve original source location.

Summary:
A new function will be added to get the original SourceLocation
for a SourceLocation that was imported as result of getCrossTUDefinition.
The returned SourceLocation is in the context of the (original)
SourceManager for the original source file. Additionally the
ASTUnit object for that source file is returned. This is needed
to get a SourceManager to operate on with the returned source location.

The new function works if multiple different source files are loaded
with the same CrossTU context.

Reviewers: martong, shafik

Reviewed By: martong

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

Tags: #clang

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

llvm-svn: 366884

5 years ago[Format] getFormattingLangOpts: make LS_Auto uses LS_Cpp11 lexing rule
Fangrui Song [Wed, 24 Jul 2019 09:50:56 +0000 (09:50 +0000)]
[Format] getFormattingLangOpts: make LS_Auto uses LS_Cpp11 lexing rule

Suggested by sammccall in post-commit review of D65183

Reviewed By: sammccall

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

llvm-svn: 366883

5 years ago[clangd] Fix SelectionTree traversal of qualified types
Sam McCall [Wed, 24 Jul 2019 09:39:11 +0000 (09:39 +0000)]
[clangd] Fix SelectionTree traversal of qualified types

Summary:
QualifiedTypeLoc isn't treated like a regular citizen by RecursiveASTVisitor.
This meant we weren't intercepting the traversal of its inner TypeLoc.

Most of the changes here are about exposing kind() so we can improve the
precision of our tests.

This should fix the issue raised in D65067.

Reviewers: hokein

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 366882

5 years ago[ARM][ParallelDSP] Fix pointer operand reordering
Sam Parker [Wed, 24 Jul 2019 09:38:39 +0000 (09:38 +0000)]
[ARM][ParallelDSP] Fix pointer operand reordering

While combining two loads into a single load, we often need to
reorder the pointer operands for the new load. This reordering was
broken in the cases where there was a chain of values that built up
the pointer.

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

llvm-svn: 366881

5 years ago[clangd] Reformat use of cl::opt: use unqualified name and don't bin-pack attributes...
Sam McCall [Wed, 24 Jul 2019 09:33:27 +0000 (09:33 +0000)]
[clangd] Reformat use of cl::opt: use unqualified name and don't bin-pack attributes. NFC

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 366880

5 years ago[lldb] Remove Xcode project legacy
Stefan Granitz [Wed, 24 Jul 2019 09:20:14 +0000 (09:20 +0000)]
[lldb] Remove Xcode project legacy

Summary: Since D65109 removed the manually maintained Xcode project, there's a few things we don't need anymore. Anything here we should keep or anything more to remove?

Reviewers: JDevlieghere, jasonmolenda, clayborg, jingham, lanza, teemperor

Subscribers: mgorny, lldb-commits, #lldb

Tags: #lldb

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

llvm-svn: 366879

5 years ago[SVE][Inline-Asm] Add support to specify SVE registers in the clobber list
Sander de Smalen [Wed, 24 Jul 2019 08:42:34 +0000 (08:42 +0000)]
[SVE][Inline-Asm] Add support to specify SVE registers in the clobber list

Adds the SVE vector and predicate registers to the list of known registers.

Patch by Kerry McLaughlin.

Reviewers: erichkeane, sdesmalen, rengolin

Reviewed By: sdesmalen

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

llvm-svn: 366878

5 years ago[clangd] Bump vscode-clangd v0.0.16
Haojian Wu [Wed, 24 Jul 2019 08:14:29 +0000 (08:14 +0000)]
[clangd] Bump vscode-clangd v0.0.16

CHANGELOG:
- detect C++ language based on some well-known file paths
- upgrade the lsp-client and lsp-server dependencies

llvm-svn: 366877

5 years ago[Format] Make it easy to add new format::FormatStyle::LanguageStandard. NFCI
Fangrui Song [Wed, 24 Jul 2019 08:04:29 +0000 (08:04 +0000)]
[Format] Make it easy to add new format::FormatStyle::LanguageStandard. NFCI

Preparatory change for D65043.

We current use `!=LS_Cpp03` to enable language standards 11,14,17, and
2a. `>=LS_Cpp11` is better if we decide to add new LanguageStandard in
the future.

Reviewed By: sammccall

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

llvm-svn: 366876

5 years ago[clangd] Update a stale comment, NFC.
Haojian Wu [Wed, 24 Jul 2019 07:57:25 +0000 (07:57 +0000)]
[clangd] Update a stale comment, NFC.

llvm-svn: 366875

5 years ago[Remark] Suppress the "-Wreturn-type" compiler warning, NFC
Haojian Wu [Wed, 24 Jul 2019 07:55:01 +0000 (07:55 +0000)]
[Remark] Suppress the "-Wreturn-type" compiler warning, NFC

llvm-svn: 366874

5 years ago[clangd] Implement "prepareRename"
Haojian Wu [Wed, 24 Jul 2019 07:49:23 +0000 (07:49 +0000)]
[clangd] Implement "prepareRename"

Summary:
- "prepareRename" request is added in LSP v3.12.0
- also update the vscode-client dependency to pick-up the rename bug fix[1]

[1]: https://github.com/microsoft/vscode-languageserver-node/issues/447

Reviewers: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 366873

5 years agoRevert "FileCheck [8/12]: Define numeric var from expr"
Thomas Preud'homme [Wed, 24 Jul 2019 07:32:34 +0000 (07:32 +0000)]
Revert "FileCheck [8/12]: Define numeric var from expr"

This reverts commit 1b05977538d9487aa845ee2f3bec8b89c63c4f29.

llvm-svn: 366872

5 years agoRevert "[FileCheck]] Canonicalize caret location testing"
Thomas Preud'homme [Wed, 24 Jul 2019 07:32:18 +0000 (07:32 +0000)]
Revert "[FileCheck]] Canonicalize caret location testing"

This reverts commit ba4e8d791342219c072a5c8de8a3f41fbb53c6be.

llvm-svn: 366871

5 years agoRevert "[FileCheck] Use ASSERT for fatal unit tests"
Thomas Preud'homme [Wed, 24 Jul 2019 07:32:11 +0000 (07:32 +0000)]
Revert "[FileCheck] Use ASSERT for fatal unit tests"

This reverts commit fb596735fe9c1ea22afb1727cbbba449bd6334c2.

llvm-svn: 366870

5 years ago[Clangd] Fixed ExtractVariable for certain types of Exprs
Shaurya Gupta [Wed, 24 Jul 2019 05:42:55 +0000 (05:42 +0000)]
[Clangd] Fixed ExtractVariable for certain types of Exprs

Summary:

- Modified ExtractVariable for extraction of MemberExpr, DeclRefExpr and Assignment Expr
- Removed extraction from label statements.
- Fixed unittests

Reviewers: sammccall, kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 366869

5 years ago[RISCV] Implement benchmark::cycleclock::Now
Roger Ferrer Ibanez [Wed, 24 Jul 2019 05:33:46 +0000 (05:33 +0000)]
[RISCV] Implement benchmark::cycleclock::Now

This is a cherrypick of D64237 onto llvm/utils/benchmark and
libcxx/utils/google-benchmark.

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

llvm-svn: 366868

5 years ago[PowerPC][NFC] use opcode instead of MachineInstr for instrHasImmForm().
Chen Zheng [Wed, 24 Jul 2019 04:50:23 +0000 (04:50 +0000)]
[PowerPC][NFC] use opcode instead of MachineInstr for instrHasImmForm().

llvm-svn: 366867

5 years ago[AArch64] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after r366857
Fangrui Song [Wed, 24 Jul 2019 01:59:44 +0000 (01:59 +0000)]
[AArch64] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after r366857

llvm-svn: 366866

5 years ago[SafeStack] Insert the deref before remaining elements
Petr Hosek [Wed, 24 Jul 2019 00:16:23 +0000 (00:16 +0000)]
[SafeStack] Insert the deref before remaining elements

This is a follow up to D64971. While we need to insert the deref after
the offset, it needs to come before the remaining elements in the
original expression since the deref needs to happen before the LLVM
fragment if present.

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

llvm-svn: 366865

5 years ago[Remarks] String tables should be move-only
Francis Visoiu Mistrih [Tue, 23 Jul 2019 22:50:08 +0000 (22:50 +0000)]
[Remarks] String tables should be move-only

Copying them is expensive. This allows the tables to be moved around at
lower cost, and allows a remarks::StringTable to be constructed from
a remarks::ParsedStringTable.

llvm-svn: 366864

5 years ago[lldb] Fix enum value description
Jonas Devlieghere [Tue, 23 Jul 2019 22:46:16 +0000 (22:46 +0000)]
[lldb] Fix enum value description

llvm-svn: 366863

5 years ago[FileCheck] Use ASSERT for fatal unit tests
Thomas Preud'homme [Tue, 23 Jul 2019 22:41:51 +0000 (22:41 +0000)]
[FileCheck] Use ASSERT for fatal unit tests

Summary:
A number of EXPECT statements in FileCheck's unit tests are dependent
from results of other values being tested. This commit changes those
earlier test to use ASSERT instead of EXPECT to avoid cascade errors
when they are all related to the same issue.

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya

Tags: #llvm

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

llvm-svn: 366862

5 years ago[FileCheck]] Canonicalize caret location testing
Thomas Preud'homme [Tue, 23 Jul 2019 22:41:46 +0000 (22:41 +0000)]
[FileCheck]] Canonicalize caret location testing

Summary:
Testing of caret location in diagnostic message is currently made with
CHECK directive with the following general format:
CHECK: {{^         \^$}}

James Henderson suggested the following would be more readable:
CHECK: {{^}}         ^{{$}}

and when whole lines can be matched (as is the case for command-line
testing where error messages do not include path):
CHECK:         ^
using the option --match-full-lines.

This commit implements these 2 changes on all existing caret position
tests. It also aligns the caret to the character it is trying to match
in the above line.

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya

Tags: #llvm

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

llvm-svn: 366861

5 years agoFileCheck [8/12]: Define numeric var from expr
Thomas Preud'homme [Tue, 23 Jul 2019 22:41:38 +0000 (22:41 +0000)]
FileCheck [8/12]: Define numeric var from expr

Summary:
This patch is part of a patch series to add support for FileCheck
numeric expressions. This specific patch lift the restriction for a
numeric expression to either be a variable definition or a numeric
expression to try to match.

This commit allows a numeric variable to be set to the result of the
evaluation of a numeric expression after it has been matched
successfully. When it happens, the variable is allowed to be used on
the same line since its value is known at match time.

It also makes use of this possibility to reuse the parsing code to
parse a command-line definition by crafting a mirror string of the
-D option with the equal sign replaced by a colon sign, e.g. for option
'-D#NUMVAL=10' it creates the string
'-D#NUMVAL=10 (parsed as [[#NUMVAL:10]])' where the numeric expression
is parsed to define NUMVAL. This result in a few tests needing updating
for the location diagnostics on top of the tests for the new feature.

It also enables empty numeric expression which match any number without
defining a variable. This is done here rather than in commit #5 of the
patch series because it requires to dissociate automatic regex insertion
in RegExStr from variable definition which would make commit #5 even
bigger than it already is.

Copyright:
    - Linaro (changes up to diff 183612 of revision D55940)
    - GraphCore (changes in later versions of revision D55940 and
                 in new revision created off D55940)

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield

Tags: #llvm

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

llvm-svn: 366860

5 years ago[DWARF] Use 32-bit format specifier for offset
Jonas Devlieghere [Tue, 23 Jul 2019 22:34:21 +0000 (22:34 +0000)]
[DWARF] Use 32-bit format specifier for offset

This should fix PR42730.

llvm-svn: 366859

5 years ago[lldb][test_suite] Update tests with unexpected pass on Android aarch64
Alex Langford [Tue, 23 Jul 2019 22:12:16 +0000 (22:12 +0000)]
[lldb][test_suite] Update tests with unexpected pass on Android aarch64

Summary: update some test decorates that can actually pass on andriod aarch64

Patch by Wanyi Ye <kusmour@gmail.com>

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

llvm-svn: 366858

5 years ago[AArch64][GlobalISel] Add support for s128 loads, stores, extracts, truncs.
Amara Emerson [Tue, 23 Jul 2019 22:05:13 +0000 (22:05 +0000)]
[AArch64][GlobalISel] Add support for s128 loads, stores, extracts, truncs.

We need to be able to load and store s128 for memcpy inlining, where we want to
generate Q register mem ops. Making these legal also requires that we add some
support in other instructions. Regbankselect should also know about these since
they have no GPR register class that can hold them, so need special handling to
live on the FPR bank.

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

llvm-svn: 366857

5 years agoFix "control reaches end of non-void function" warning. NFCI.
Simon Pilgrim [Tue, 23 Jul 2019 21:59:48 +0000 (21:59 +0000)]
Fix "control reaches end of non-void function" warning. NFCI.

llvm-svn: 366856

5 years ago[docs] Clarify where the indirect UB due to write-write races comes from
Eli Friedman [Tue, 23 Jul 2019 21:51:26 +0000 (21:51 +0000)]
[docs] Clarify where the indirect UB due to write-write races comes from

This is based on https://bugs.llvm.org/show_bug.cgi?id=42435#c3.

Patch by Ralf Jung.

llvm-svn: 366855

5 years ago[GlobalISel][AArch64] Save a copy on G_SELECT by fixing condition to GPR
Jessica Paquette [Tue, 23 Jul 2019 21:39:50 +0000 (21:39 +0000)]
[GlobalISel][AArch64] Save a copy on G_SELECT by fixing condition to GPR

The condition can never be fed by FPRs, so it should always be on a GPR.

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

llvm-svn: 366854

5 years ago[ExpressionParser] Handle llvm::Expected result
Jonas Devlieghere [Tue, 23 Jul 2019 21:14:41 +0000 (21:14 +0000)]
[ExpressionParser] Handle llvm::Expected result

This fixes the unchecked-error assertion at runtime.

  Expected<T> must be checked before access or destruction. Expected<T>
  value was in success state. (Note: Expected<T> values in success mode
  must still be checked prior to being destroyed).

llvm-svn: 366853

5 years ago[ExpressionParser] Fix formatting and whitespace (NFC)
Jonas Devlieghere [Tue, 23 Jul 2019 21:14:23 +0000 (21:14 +0000)]
[ExpressionParser] Fix formatting and whitespace (NFC)

Fix formatting and whitespace before making changes to this file.

llvm-svn: 366852

5 years ago[ARM] Add opt-bisect support to ARMParallelDSP.
Eli Friedman [Tue, 23 Jul 2019 20:48:46 +0000 (20:48 +0000)]
[ARM] Add opt-bisect support to ARMParallelDSP.

llvm-svn: 366851

5 years ago[lldb] Fix occasional hangs of VSCode testcases
Jan Kratochvil [Tue, 23 Jul 2019 20:45:03 +0000 (20:45 +0000)]
[lldb] Fix occasional hangs of VSCode testcases

On slower machines the vscode testcases were sometimes hanging:

  1910 ? Sl 0:00 |   \_ /usr/bin/python .../llvm/tools/lldb/test/dotest.py ... -p TestVSCode_setBreakpoints.py
  2649 ? Sl 0:00 |       \_ .../build/bin/lldb-vscode
  2690 ? S  0:00 |           \_ .../build/bin/lldb-server gdbserver --fd=9 --native-regs --setsid
  2708 ? t  0:00 |               \_ .../build/lldb-test-build.noindex/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.test_functionality/a.out

A reproducer of the racy bug for send_recv():
#         self.send_packet(command)
#+        import time
#+        time.sleep(1)
#         done = False

I guess `request_continue` was probably originally intended to be synchronous
but then it isn't and this code has been leftover there.

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

llvm-svn: 366850

5 years ago[Remarks] Introduce a new format: yaml-strtab
Francis Visoiu Mistrih [Tue, 23 Jul 2019 20:42:46 +0000 (20:42 +0000)]
[Remarks] Introduce a new format: yaml-strtab

This exposes better support to use a string table with a format through
an actual new remark::Format, called yaml-strtab.

This can now be used with -fsave-optimization-record=yaml-strtab.

llvm-svn: 366849

5 years agoRevert "Revert "Add ReadCStringFromMemory for faster string reads""
Antonio Afonso [Tue, 23 Jul 2019 20:40:37 +0000 (20:40 +0000)]
Revert "Revert "Add ReadCStringFromMemory for faster string reads""

This reverts commit 9c10b620c0619611dfe062216459431955ac4801.

llvm-svn: 366848

5 years agoRevert "Revert "Implement xfer:libraries-svr4:read packet""
Antonio Afonso [Tue, 23 Jul 2019 20:40:30 +0000 (20:40 +0000)]
Revert "Revert "Implement xfer:libraries-svr4:read packet""

This reverts commit 08c38f77c5fb4d3735ec215032fed8ee6730b3db.

llvm-svn: 366847