Commit Graph

329252 Commits

Author SHA1 Message Date
Joel E. Denny 61d7ecbf84 [lit] Extend internal diff to support -U
When using lit's internal shell, RUN lines like the following
accidentally execute an external `diff` instead of lit's internal
`diff`:

```
 # RUN: program | diff -U1 file -
```

Such cases exist now, in `clang/test/Analysis` for example.  We are
preparing patches to ensure lit's internal `diff` is called in such
cases, which will then fail because lit's internal `diff` doesn't
recognize `-U` as a command-line option.  This patch adds `-U`
support.

Reviewed By: rnk

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

llvm-svn: 374392
2019-10-10 17:40:12 +00:00
Nico Weber a134d3cfc9 gn build: merge r374381 more (effectively a no-op)
llvm-svn: 374391
2019-10-10 17:40:00 +00:00
Joel E. Denny f4edce12ff [lit] Extend internal diff to support `-` argument
When using lit's internal shell, RUN lines like the following
accidentally execute an external `diff` instead of lit's internal
`diff`:

```
 # RUN: program | diff file -
```

Such cases exist now, in `clang/test/Analysis` for example.  We are
preparing patches to ensure lit's internal `diff` is called in such
cases, which will then fail because lit's internal `diff` doesn't
recognize `-` as a command-line option.  This patch adds support for
`-` to mean stdin.

Reviewed By: probinson, rnk

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

llvm-svn: 374390
2019-10-10 17:39:57 +00:00
Joel E. Denny 19e6bb25f0 [lit] Clean up internal diff's encoding handling
As suggested by rnk at D67643#1673043, instead of reading files
multiple times until an appropriate encoding is found, read them once
as binary, and then try to decode what was read.

For python >= 3.5, don't fail when attempting to decode the
`diff_bytes` output in order to print it.

Finally, add some tests for encoding handling.

Reviewed By: rnk

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

llvm-svn: 374389
2019-10-10 17:39:41 +00:00
Joel E. Denny df35ec8289 [lit] Make internal diff work in pipelines
When using lit's internal shell, RUN lines like the following
accidentally execute an external `diff` instead of lit's internal
`diff`:

```
 # RUN: program | diff file -
 # RUN: not diff file1 file2 | FileCheck %s
```

Such cases exist now, in `clang/test/Analysis` for example.  We are
preparing patches to ensure lit's internal `diff` is called in such
cases, which will then fail because lit's internal `diff` cannot
currently be used in pipelines and doesn't recognize `-` as a
command-line option.

To enable pipelines, this patch moves lit's `diff` implementation into
an out-of-process script, similar to lit's `cat` implementation.  A
follow-up patch will implement `-` to mean stdin.

Reviewed By: probinson, stella.stamenova

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

llvm-svn: 374388
2019-10-10 17:39:24 +00:00
Alexey Bataev c2cd2d40aa [OPENMP50]Support for declare variant directive for NVPTX target.
NVPTX does not support global aliases. Instead, we have to copy the full
body of the variant function for the original function.

llvm-svn: 374387
2019-10-10 17:28:10 +00:00
Jonas Devlieghere 27c23653ae [test] Use a different module cache for Shell and API tests.
Before the test reorganization, everything was part of a single test
suite with a single module cache. Now that things are properly separated
this is no longer the case. Only the shell tests inherited the logic to
properly configure and wipe the module caches. This patch adds that
logic back for the API tests. While doing so, I noticed that we were
configuring a Clang module cache in CMake, but weren't actually using it
from dotest.py. I included a fix for that in this patch as well.

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

llvm-svn: 374386
2019-10-10 17:27:09 +00:00
Jonas Devlieghere 2d2cf936ac [test] Pass DSYMUTIL and SDKROOT as part of the Make invocation.
Pass the DSYMUTIL and SDKROOT variables on the command line instead of
the environment. This makes it easier to reproduce the make invocation
during development.

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

llvm-svn: 374385
2019-10-10 17:27:06 +00:00
Julian Lettner 99c9d7bd63 Reland "[ASan] Do not misrepresent high value address dereferences as null dereferences"
Updated: Removed offending TODO comment.

Dereferences with addresses above the 48-bit hardware addressable range
produce "invalid instruction" (instead of "invalid access") hardware
exceptions (there is no hardware address decoding logic for those bits),
and the address provided by this exception is the address of the
instruction (not the faulting address).  The kernel maps the "invalid
instruction" to SEGV, but fails to provide the real fault address.

Because of this ASan lies and says that those cases are null
dereferences.  This downgrades the severity of a found bug in terms of
security.  In the ASan signal handler, we can not provide the real
faulting address, but at least we can try not to lie.

rdar://50366151

Reviewed By: vitalybuka

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

> llvm-svn: 374265

llvm-svn: 374384
2019-10-10 17:19:58 +00:00
GN Sync Bot dc895a325f gn build: Merge r374381
llvm-svn: 374383
2019-10-10 17:14:20 +00:00
Jonas Devlieghere 5c5184be74 [test] Trim the symbtab test case (NFC)
We don't actually need the section content for this tests.

llvm-svn: 374382
2019-10-10 17:12:57 +00:00
Greg Clayton 4b6c9de868 Add GsymCreator and GsymReader.
This patch adds the ability to create GSYM files with GsymCreator, and read them with GsymReader. Full testing has been added for both new classes.

This patch differs from the original patch https://reviews.llvm.org/D53379 in that is uses a StringTableBuilder class from llvm instead of a custom version. Support for big and little endian files has been added. If the endianness matches the current host, we use efficient extraction for the header, address table and address info offset tables.

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

llvm-svn: 374381
2019-10-10 17:10:11 +00:00
Jonas Devlieghere 644abcf09d [dsymutil] Move CommonSymbols.clear() in resetParserState.
This seems like a more natural place to clear the vector, especially
since this method is clearing other data structures as well.

llvm-svn: 374378
2019-10-10 16:37:38 +00:00
David Green 8628bb0491 [ARM] VQSUB instruction
Same as VQADD, VQSUB can be selected from llvm.ssub.sat intrinsics.

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

llvm-svn: 374377
2019-10-10 16:34:30 +00:00
Adrian Prantl a8419b1f27 Increase timeout in pexpect to lower chances of tests failing under ASAN.
If this doesn't actually work, I'll revert the change and just disable
the remaining thee pexpect tests under asan.

llvm-svn: 374375
2019-10-10 16:16:49 +00:00
Siva Chandra 7a6d98325c Use arrays on stack and avoid use of new and delete operators.
Summary: Also fix an error found with LLVM_USE_SANITIZER=Address.

Reviewers: nelhage

Subscribers: libc-commits

Tags: #libc-project

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

llvm-svn: 374374
2019-10-10 16:06:21 +00:00
David Green 94d379095a [Codegen] Alter the default promotion for saturating adds and subs
The default promotion for the add_sat/sub_sat nodes currently does:
   1. ANY_EXTEND iN to iM
   2. SHL by M-N
   3. [US][ADD|SUB]SAT
   4. L/ASHR by M-N
If the promoted add_sat or sub_sat node is not legal, this can produce code
that effectively does a lot of shifting (and requiring large constants to be
materialised) just to use the overflow flag. It is simpler to just do the
saturation manually, using the higher bitwidth addition and a min/max against
the saturating bounds. That is what this patch attempts to do.

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

llvm-svn: 374373
2019-10-10 16:04:49 +00:00
Kadir Cetinkaya dd37a26f6d Fix assertions disabled builds after rL374367
llvm-svn: 374372
2019-10-10 16:04:45 +00:00
Adrian Prantl cba575e8ff Increase timeout in gdbclientutils.py to decrease chance of test failing under ASAN.
llvm-svn: 374371
2019-10-10 15:59:17 +00:00
Sanjay Patel 7f0e7c0b1c [DAGCombiner] reduce code duplication; NFC
llvm-svn: 374370
2019-10-10 15:38:29 +00:00
Guillaume Chatelet ff054b9e32 [Alignment][NFC] Use llv::Align in GISelKnownBits
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 374369
2019-10-10 15:38:22 +00:00
Yonghong Song d46a6a9e68 [BPF] Remove relocation for patchable externs
Previously, patchable extern relocations are introduced to patch
external variables used for multi versioning in
compile once, run everywhere use case. The load instruction
will be converted into a move with an patchable immediate
which can be changed by bpf loader on the host.

The kernel verifier has evolved and is able to load
and propagate constant values, so compiler relocation
becomes unnecessary. This patch removed codes related to this.

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

llvm-svn: 374367
2019-10-10 15:33:09 +00:00
Kousik Kumar 4abac53302 In openFileForRead don't cache erroneous entries if the error relates to them being directories. Add tests.
Summary:
It seems that when the CachingFileSystem is first given a file to open that is actually a directory, it incorrectly
caches that path to be errenous and throws an error when subsequently a directory open call is made for the same
path.
This change makes it so that we do NOT cache a path if it turns out we asked for a file when its a directory.

Reviewers: arphaman

Subscribers: dexonsmith, cfe-commits

Tags: #clang

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

llvm-svn: 374366
2019-10-10 15:29:01 +00:00
Stanislav Mekhanoshin cbe55c7caf [AMDGPU] Fixed dpp_combine.mir with expensive checks. NFC.
llvm-svn: 374365
2019-10-10 15:28:52 +00:00
Simon Pilgrim f7aee61be2 Fix Wdocumentation warnings. NFCI.
llvm-svn: 374364
2019-10-10 15:25:16 +00:00
Alexey Bataev 4513e93f9a [OPENMP50]Register vendor name only once in vendor context selector.
No need to store multiple copies of the same vendor names in the context
selector, keep only single copy.

llvm-svn: 374363
2019-10-10 15:15:26 +00:00
Russell Gallop 6d6ec1b869 [LLD][ELF] Fix stale comments about doing ICF
Differential Revision: https://reviews.llvm.org/D68396

llvm-svn: 374362
2019-10-10 14:50:02 +00:00
Roman Lebedev a5e65c1cf7 [MCA] Show aggregate over Average Wait times for the whole snippet (PR43219)
Summary:
As disscused in https://bugs.llvm.org/show_bug.cgi?id=43219,
i believe it may be somewhat useful to show //some// aggregates
over all the sea of statistics provided.

Example:
```
Average Wait times (based on the timeline view):
[0]: Executions
[1]: Average time spent waiting in a scheduler's queue
[2]: Average time spent waiting in a scheduler's queue while ready
[3]: Average time elapsed from WB until retire stage

      [0]    [1]    [2]    [3]
0.     3     1.0    1.0    4.7       vmulps     %xmm0, %xmm1, %xmm2
1.     3     2.7    0.0    2.3       vhaddps    %xmm2, %xmm2, %xmm3
2.     3     6.0    0.0    0.0       vhaddps    %xmm3, %xmm3, %xmm4
       3     3.2    0.3    2.3       <total>
```
I.e. we average the averages.

Reviewers: andreadb, mattd, RKSimon

Reviewed By: andreadb

Subscribers: gbedwell, arphaman, llvm-commits

Tags: #llvm

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

llvm-svn: 374361
2019-10-10 14:46:21 +00:00
Dmitri Gribenko d3aed7fc79 Revert "[FileCheck] Implement --ignore-case option."
This reverts commit r374339. It broke tests:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/19066

llvm-svn: 374359
2019-10-10 14:27:14 +00:00
Dmitri Gribenko a89e5a41ec Revert "[Tests] Output of od can be lower or upper case (llvm-objcopy/yaml2obj)."
This reverts commit r374343. It broke tests:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/19066

llvm-svn: 374358
2019-10-10 14:26:54 +00:00
Dmitri Gribenko 43fcbcb4e8 Revert "Fix OCaml/core.ml fneg check"
This reverts commit r374346. It attempted to fix OCaml tests, but is
does not actually fix them.

llvm-svn: 374357
2019-10-10 14:16:58 +00:00
Simon Pilgrim 6a38474f77 [X86] combineFMA - Convert to use isNegatibleForFree/GetNegatedExpression.
Split off from D67557.

llvm-svn: 374356
2019-10-10 14:14:12 +00:00
Simon Pilgrim fdc0917b46 Fix OCaml/core.ml fneg check (try 2)
llvm-svn: 374355
2019-10-10 14:13:55 +00:00
Dmitri Gribenko eaf6dd482b Revert "[IRBuilder] Update IRBuilder::CreateFNeg(...) to return a UnaryOperator"
This reverts commit r374240. It broke OCaml tests:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/19014

llvm-svn: 374354
2019-10-10 14:13:54 +00:00
Pavel Labath 390accea83 unwind-via-stack-win.yaml: update for changes in yaml format
llvm-svn: 374353
2019-10-10 14:01:59 +00:00
Raphael Isemann ffe170c6e2 [lldb] Fix minidebuginfo-set-and-hit-breakpoint.test
This was failing for me because of this error:
llvm-objcopy: error: 'build/tools/lldb/test/ObjectFile/ELF/Output/minidebuginfo-set-and-hit-breakpoint.test.tmp.mini_debuginfo': section '.dynsym' cannot be removed because it is referenced by the section '.hash'

Patch by Konrad Kleine!

llvm-svn: 374352
2019-10-10 14:00:32 +00:00
Simon Pilgrim f096443a98 [X86] combineFMADDSUB - Convert to use isNegatibleForFree/GetNegatedExpression.
Split off from D67557, fixes the compile time regression mentioned in rL372756

llvm-svn: 374351
2019-10-10 13:46:44 +00:00
Raphael Isemann ccd54a1349 [lldb] Add log output for the support files we pass to the CppModuleConfiguration
CppModuleConfiguration is the most likely point of failure when we have weird
setups where we fail to load a C++ module. With this logging it should be easier
to figure out why we can't find a valid configuration as the configuration only
depends on the list of file paths.

llvm-svn: 374350
2019-10-10 13:43:37 +00:00
Thomas Preud'homme 48edae336b Revert "[test] Use system locale for mri-utf8.test"
This reverts commit r374318 / b6f1d1fa0e.

llvm-svn: 374349
2019-10-10 13:39:12 +00:00
Jay Foad 765055658c Revert "[AMDGPU] Run `unreachable-mbb-elimination` after isel to clean up PHIs."
Summary:
This has been superseded by "[AMDGPU]: PHI Elimination hooks added for custom COPY insertion."

This reverts the code changes from commit 53f967f2bd
but keeps the test case.

Reviewers: hliao, arsenm, tpr, dstuttard

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, t-tye, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 374347
2019-10-10 13:34:31 +00:00
Simon Pilgrim fbf8b0bc0d Fix OCaml/core.ml fneg check
llvm-svn: 374346
2019-10-10 13:29:47 +00:00
Simon Pilgrim 08c2f530ec [DAG][X86] Add isNegatibleForFree/GetNegatedExpression override placeholders. NFCI.
Continuing to undo the rL372756 reversion.

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

llvm-svn: 374345
2019-10-10 13:29:35 +00:00
George Rimar 55f1be0996 [llvm-readelf] - Do not enter an infinite loop when printing histogram.
This is similar to D68086.
We are entering an infinite loop when dumping a histogram for a specially crafted
.hash section with a loop in a chain.

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

llvm-svn: 374344
2019-10-10 13:26:26 +00:00
Kai Nacke 819f01d917 [Tests] Output of od can be lower or upper case (llvm-objcopy/yaml2obj).
The command `od -t x` is used to dump data in hex format.
The LIT tests assumes that the hex characters are in lowercase.
However, there are also platforms which use uppercase letter.

To solve this issue the tests are updated to use the new
`--ignore-case` option of FileCheck.

Reviewers: Bigcheese, jakehehrlich, rupprecht, espindola, alexshap, jhenderson

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

llvm-svn: 374343
2019-10-10 13:24:00 +00:00
Pavel Labath 5070322332 Fix the unwinding plan augmentation from x86 assembly
Unwind plan augmentation should compute the plan row at offset x from
the instruction before offset x, but currently we compute it from the
instruction at offset x. Note that this behavior is a regression
introduced when moving the x86 assembly inspection engine to its own
file
(1c9858b298 (diff-375a2be066db6f34bb9a71442c9b71fcL913));
the original version handled this properly by copying the previous
instruction out before advancing the instruction pointer.

The relevant bug with more info is here: https://bugs.llvm.org/show_bug.cgi?id=43561

Differential Revision: https://reviews.llvm.org/D68454
Patch by Jaroslav Sevcik <jarin@google.com>.

llvm-svn: 374342
2019-10-10 13:23:09 +00:00
Pavel Labath c8c71e6f76 Fix some dangling else warnings
EXPECT_EQ contains an if-else statement. It also contains some magic to
suppress the dangling else warnings, but it seems that some new
compilers can see through that...

llvm-svn: 374341
2019-10-10 13:23:02 +00:00
Amaury Sechet aaf0507896 [DAGCombine] Match more patterns for half word bswap
Summary: It ensures that the bswap is generated even when a part of the subtree already matches a bswap transform.

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

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 374340
2019-10-10 13:20:10 +00:00
Kai Nacke dfd2b6f07f [FileCheck] Implement --ignore-case option.
The FileCheck utility is enhanced to support a `--ignore-case`
option. This is useful in cases where the output of Unix tools
differs in case (e.g. case not specified by Posix).

Reviewers: Bigcheese, jakehehrlich, rupprecht, espindola, alexshap, jhenderson, MaskRay

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

llvm-svn: 374339
2019-10-10 13:15:41 +00:00
Florian Hahn a3ca7acb4f [LV][NFC] Factor out calculation of "best" estimated trip count.
This is just small refactoring to minimize changes in upcoming patch.
In the next path I'm going to introduce changes into heuristic for vectorization of "tiny trip count" loops.

Patch by Evgeniy Brevnov <evgueni.brevnov@gmail.com>

Reviewers: hsaito, Ayal, fhahn, reames

Reviewed By: hsaito

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

llvm-svn: 374338
2019-10-10 13:07:01 +00:00
Pavel Labath 3aa7e76677 MinidumpYAML: Add support for the memory info list stream
Summary:
The implementation is fairly straight-forward and uses the same patterns
as the existing streams. The yaml form does not attempt to preserve the
data in the "gaps" that can be created by setting a larger-than-required
header or entry size in the stream header, because the existing consumer
(lldb) does not make use of the information in the gap in any way, and
attempting to preserve that would make the implementation more
complicated.

Reviewers: amccarth, jhenderson, clayborg

Subscribers: llvm-commits, lldb-commits, markmentovai, zturner, JosephTremoulet

Tags: #llvm

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

llvm-svn: 374337
2019-10-10 13:05:46 +00:00