Weverything [Fri, 8 May 2020 01:47:19 +0000 (18:47 -0700)]
Fix false positive with -Wnon-c-typedef-for-linkage
Implicit methods for structs can confuse the warning, so exclude checking
the Decl's that are implicit. Implicit Decl's for lambdas still need to
be checked, so skipping all implicit Decl's won't work.
Differential Revision: https://reviews.llvm.org/D79548
aartbik [Fri, 8 May 2020 01:39:10 +0000 (18:39 -0700)]
[llvm] [CodeGen] Fixed vector halving bug for masked store
Summary:
Note that this fix is very similar to what has already been
done for the masked load in https://reviews.llvm.org/D78608
Bugs:
https://bugs.llvm.org/show_bug.cgi?id=45563
https://bugs.llvm.org/show_bug.cgi?id=45833
Reviewers: craig.topper, nicolasvasilache, mehdi_amini
Reviewed By: craig.topper
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D79611
Jason Molenda [Fri, 8 May 2020 01:52:10 +0000 (18:52 -0700)]
Add a new lockdownd plist for launching posix processes
Similar to
com.apple.debugserver.plist & com.apple.debugserver.internal.plist
com.apple.debugserver.applist.plist & com.apple.debugserver.applist.internal.plist
add a variant of the posix plist.
<rdar://problem/
62995567>
Xing GUO [Fri, 8 May 2020 01:54:08 +0000 (09:54 +0800)]
[Object] Remove unneeded check in ELFFile<ELFT>::dynamicEntries().
Check for `DynSecSize % sizeof(Elf_Dyn) != 0` is unneeded in this context.
1. If the .dynamic section is acquired from program headers, the .dynamic
section is "cut off" by
```
makeArrayRef(..., Phdr.p_filesz / sizeof(Elf_Dyn));
DynSeSize = Phdr.p_filesz;
```
2. If the .dynamic section is acquired from section headers, the .dynamic
section is checked in `getSectionContentsAsArray<Elf_Dyn>(&Sec)`.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D79560
Sriraman Tallam [Fri, 8 May 2020 01:18:37 +0000 (18:18 -0700)]
Uniuqe Names for Internal Linkage Symbols.
This is a standalone patch and this would help Propeller do a better job of code
layout as it can accurately attribute the profiles to the right internal linkage
function.
This also helps SampledFDO/AutoFDO correctly associate sampled profiles to the
right internal function. Currently, if there is more than one internal symbol
foo, their profiles are aggregated by SampledFDO.
This patch adds a new clang option, -funique-internal-funcnames, to generate
unique names for functions with internal linkage. This patch appends the md5
hash of the module name to the function symbol as a best effort to generate a
unique name for symbols with internal linkage.
Differential Revision: https://reviews.llvm.org/D73307
Diego Caballero [Tue, 21 Apr 2020 19:10:55 +0000 (22:10 +0300)]
[LoopFusion] Remove unreachable blocks from DT and LI after fusion
This patch removes FC0.ExitBlock and FC1GuardBlock from DT and LI
after fusion of guarded loops. They become unreachable and LI
verification failed when they happened to be inside another loop.
Reviewed By: kbarton
Differential Revision: https://reviews.llvm.org/D78679
Nico Weber [Thu, 7 May 2020 23:07:08 +0000 (19:07 -0400)]
Revert "[YAMLVFSWriter][Test][NFC] Add couple tests"
This reverts commit
7143d7925490e9123b1c93305700221584ba10c6.
Breaks check-llvm on Windows, see e.g.
http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/15919/steps/stage%201%20check/logs/stdio
James Y Knight [Thu, 20 Feb 2020 06:16:13 +0000 (01:16 -0500)]
Correctly modify the CFG in IfConverter, and then remove the
CorrectExtraCFGEdges function.
The latter was a workaround for "Various pieces of code" leaving bogus
extra CFG edges in place. Where by "various" it meant only
IfConverter::MergeBlocks, which failed to clear all of the successors
of dead blocks it emptied out. This wouldn't matter a whole lot,
except that the dead blocks remained listed as predecessors of
still-useful blocks, inhibiting optimizations.
This fix slightly changed two thumb tests, because the correct CFG
successors allowed for the "diamond" if-conversion pattern to be
detected, when it could only use "simple" before.
Additionally, the removal of a now-redundant call to analyzeBranch
(with AllowModify=true) in BranchFolder::OptimizeFunction caused a
later check for an empty block in BranchFolder::OptimizeBlock to
fail. Correct this by moving the call to analyzeBranch in
OptimizeBlock higher.
Differential Revision: https://reviews.llvm.org/D79527
Jonas Devlieghere [Thu, 7 May 2020 22:13:18 +0000 (15:13 -0700)]
[lldb/Test] Skip more tests that are not expected to work with passive replay
This skips some tests that pass with active replay (which doesn't check
the output) but fail with passive replay. Valid reasons for this
include:
- Checking the output of the process (which doesn't run during replay),
- Checking files that cannot be captured in the VFS (non-existing or
unreadable files or files that are removed during test),
Unfortunately there's no good way to mark a test as supported for active
replay but unsupported for passive replay because the number and order
of API calls needs to be identical during capture and replay. I don't
think this is a huge loss however.
Johannes Doerfert [Thu, 7 May 2020 21:50:50 +0000 (16:50 -0500)]
[Attributor][FIX] Record dependences for assumed dead abstract attributes
In a recent patch we introduced a problem with abstract attributes that
were assumed dead at some point. Since `Attributor::updateAA` was
introduced in
95e0d28b71e42c9b7cd77c96f728311981a021f6, we did not
remember the dependence on the liveness AA when an abstract attribute
was assumed dead and therefore not updated.
Explicit reproducer added in liveness.ll.
---
Single run of the Attributor module and then CGSCC pass (oldPM)
for SPASS/clause.c (~10k LLVM-IR loc):
Before:
```
calls to allocation functions: 509242 (345483/s)
temporary memory allocations: 98666 (66937/s)
peak heap memory consumption: 18.60MB
peak RSS (including heaptrack overhead): 103.29MB
total memory leaked: 269.10KB
```
After:
```
calls to allocation functions: 529332 (355494/s)
temporary memory allocations: 102107 (68574/s)
peak heap memory consumption: 19.40MB
peak RSS (including heaptrack overhead): 102.79MB
total memory leaked: 269.10KB
```
Difference:
```
calls to allocation functions: 20090 (1339333/s)
temporary memory allocations: 3441 (229400/s)
peak heap memory consumption: 801.45KB
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B
```
Johannes Doerfert [Thu, 7 May 2020 21:47:57 +0000 (16:47 -0500)]
[Attributor] Mark dependence as optional
zoecarver [Thu, 7 May 2020 21:26:25 +0000 (14:26 -0700)]
[libc++] ECMAScript IdentityEscape is ambiguous (2584)
This patch fixes [[ https://cplusplus.github.io/LWG/issue2584 | 2584 ]]. Now the following works:
const std::regex r1("\\z");
assert(std::regex_match("z", r1));
Differential Revision: https://reviews.llvm.org/D66610
Ed Maste [Thu, 7 May 2020 18:57:11 +0000 (14:57 -0400)]
getMainExecutable: Fix hand-rolled AT_EXECPATH for older FreeBSD
Once we hit AT_NULL, we need to bail out of the loop; not just the
enclosing switch. This fixes basic usage (e.g. `cc --version`) when
AT_EXECPATH isn't present on older branches (e.g. under
emu-user-static, at the moment), where we would previously run off
the end of ::environ.
Patch By: kevans
Reviewed By: arichardson
Differential Revision: https://reviews.llvm.org/D79239
zoecarver [Thu, 7 May 2020 21:01:58 +0000 (14:01 -0700)]
[libcxx] [NFC] fpos Requirements (p0759r1).
Implements p0759r1. Test-only change. Adds explicit test for table 106 and type checking.
Differential Review: https://reviews.llvm.org/D60491
mydeveloperday [Thu, 7 May 2020 20:57:14 +0000 (21:57 +0100)]
[clang-format] [PR45639] clang-format splits up the brackets of C++17 attribute [[ ]] when used with the first parameter
Summary:
https://bugs.llvm.org/show_bug.cgi?id=45639
clang-format incorrectly splits the `[[` in a long argument list
```
void SomeLongClassName::ALongMethodNameInThatClass([[maybe_unused]] const shared_ptr<ALongTypeName>& argumentNameForThat
LongType) {
}
```
becomes
```
void SomeLongClassName::ALongMethodNameInThatClass([
[maybe_unused]] const shared_ptr<ALongTypeName> &argumentNameForThatLongType) {
}
```
leaving one `[` on the previous line
For a function with just 1 very long argument, clang-format chooses to split between the `[[`,
This revision prevents the slip between the two `[` and the second `[`
Reviewed By: krasimir
Subscribers: cfe-commits
Tags: #clang, #clang-format
Differential Revision: https://reviews.llvm.org/D79401
Alina Sbirlea [Thu, 16 Apr 2020 04:49:00 +0000 (21:49 -0700)]
[SimpleLoopUnswitch] Update DefaultExit condition to check unreachable is not empty.
Summary:
Update the check for the default exit block to not only check that the
terminator is not unreachable, but also check that unreachable block has
*only* the unreachable instruction.
Reviewers: chandlerc
Subscribers: hiraditya, uabelho, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78277
Marcel Hlopko [Thu, 7 May 2020 20:14:26 +0000 (22:14 +0200)]
Remove unused _LIBCPP_RAW_ITERATORS
Summary: This change removes seemingly unused _LIBCPP_RAW_ITERATORS.
Reviewers: #libc, EricWF, ldionne
Reviewed By: #libc, EricWF, ldionne
Subscribers: dexonsmith, ldionne, gribozavr2, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D79323
Erich Keane [Thu, 7 May 2020 16:28:10 +0000 (09:28 -0700)]
Ensure aux-target specific builtins get validated.
I discovered that when using an aux-target builtin, it was recognized as
a builtin but never checked. This patch checks for an aux-target builtin
and instead validates it against the correct target.
It does this by extracting the checking code for Target-specific
builtins into its own function, then calls with either targetInfo or
AuxTargetInfo.
Sanjay Patel [Thu, 7 May 2020 20:08:43 +0000 (16:08 -0400)]
[VectorCombine] adjust test to make intent clearer; NFC
Create a non-zero result to show that the other lane is computed correctly.
Huihui Zhang [Thu, 7 May 2020 20:18:09 +0000 (13:18 -0700)]
[NFC] Adjust test check lines for D78267.
This wasn't identified through buildbot before.
Evgenii Stepanov [Tue, 14 Apr 2020 21:38:10 +0000 (14:38 -0700)]
Allow -fsanitize-minimal-runtime with memtag sanitizer.
Summary:
MemTag does not have any runtime at the moment, it's strictly code
instrumentation.
Reviewers: pcc
Subscribers: cryptoad, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D79522
Huihui Zhang [Thu, 7 May 2020 20:03:26 +0000 (13:03 -0700)]
[InstCombine][SVE] Fix visitExtractElementInst for scalable type.
Summary:
This patch fix the following issues with visitExtractElementInst:
1. Restrict VectorUtils::findScalarElement to fixed-length vector.
For scalable type, the number of elements in shuffle mask is
unknown at compile-time.
2. Fix out-of-range calculation for fixed-length vector.
3. Skip scalable type when analysis rely on fixed number of elements.
4. Add unit tests to check functionality of extractelement for scalable type.
Reviewers: sdesmalen, efriedma, spatel, nikic
Reviewed By: efriedma
Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78267
Nico Weber [Thu, 7 May 2020 00:19:14 +0000 (20:19 -0400)]
Make -Wnonportable-include-path ignore drive case on Windows.
See PR45812 for motivation.
No explicit test since I couldn't figure out how to get the
current disk drive in lower case into a form in lit where I could
mkdir it and cd to it. But the change does have test coverage in
that I can remove the case normalization in lit, and tests failed
on several bots (and for me locally if in a pwd with a lower-case
drive) without that normalization prior to this change.
Differential Revision: https://reviews.llvm.org/D79531
Erich Keane [Thu, 7 May 2020 19:11:03 +0000 (12:11 -0700)]
Add static assert to ID Table to make sure aux targets work right.
I discovered that the limit on possible builtins managed by this
ObjCOrBuiltin variable is too low when combining large targets, since
aux-targets are appended to the targets list. A runtime assert exists
for this, however this patch creates a static-assert as well.
The logic for said static-assert is to make sure we have the room for
the aux-target and target to both be the largest list, which makes sure
we have room for all possible combinations.
I also incremented the number of bits by 1, since I discovered this
currently broken. The current bit-count was 36, so this doesn't
increase any size.
Huihui Zhang [Thu, 7 May 2020 19:43:14 +0000 (12:43 -0700)]
[InstCombine][SVE] Fix visitInsertElementInst for scalable type.
Summary:
This patch fixes the following issues in visitInsertElementInst:
1. Bail out for scalable type when analysis requires fixed size number of vector elements.
2. Use cast<FixedVectorType> to get vector number of elements. This ensure assertion
on scalable vector type.
3. For scalable type, avoid folding a chain of insertelement into splat:
insertelt(insertelt(insertelt(insertelt X, %k, 0), %k, 1), %k, 2) ...
->
shufflevector(insertelt(X, %k, 0), undef, zero)
The length of scalable vector is unknown at compile-time, therefore we don't know if
given insertelement sequence is valid for splat.
Reviewers: sdesmalen, efriedma, spatel, nikic
Reviewed By: sdesmalen, efriedma
Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78895
Jacques Pienaar [Wed, 6 May 2020 20:48:36 +0000 (13:48 -0700)]
[mlir] Add NamedAttrList
This is a wrapper around vector of NamedAttributes that keeps track of whether sorted and does some minimal effort to remain sorted (doing more, e.g., appending attributes in sorted order, could be done in follow up). It contains whether sorted and if a DictionaryAttr is queried, it caches the returned DictionaryAttr along with whether sorted.
Change MutableDictionaryAttr to always return a non-null Attribute even when empty (reserve null cases for errors). To this end change the getter to take a context as input so that the empty DictionaryAttr could be queried. Also create one instance of the empty dictionary attribute that could be reused without needing to lock context etc.
Update infer type op interface to use DictionaryAttr and use NamedAttrList to avoid incurring multiple conversion costs.
Fix bug in sorting helper function.
Differential Revision: https://reviews.llvm.org/D79463
Sanjay Patel [Thu, 7 May 2020 19:23:37 +0000 (15:23 -0400)]
[VectorCombine] add tests with undefs; NFC
Goes with D79452.
Matt Arsenault [Thu, 7 May 2020 18:26:14 +0000 (14:26 -0400)]
AMDGPU: Fix broken tests for HSA metadata
These were testing byval private kernel arguments, which doesn't make
any sense and has never been used. There didn't seem to be any tests
for real value struct arguments, which are.
Sanjay Patel [Thu, 7 May 2020 19:00:23 +0000 (15:00 -0400)]
[SLP] add another bailout for load-combine patterns (2nd try)
The original patch (rG86dfbc676ebe) exposed an existing bug:
we could wrongly cast a constant expression to BinaryOperator
because the pattern matching allows that. This adds a check
for that case, and there's a reduced test case to verify no
crashing.
Original commit message:
This builds on the or-reduction bailout that was added with D67841.
We still do not have IR-level load combining, although that could
be a target-specific enhancement for -vector-combiner.
The heuristic is narrowly defined to catch the motivating case from
PR39538:
https://bugs.llvm.org/show_bug.cgi?id=39538
...while preserving existing functionality.
That is, there's an unmodified test of pure load/zext/store that is
not seen in this patch at llvm/test/Transforms/SLPVectorizer/X86/cast.ll.
That's the reason for the logic difference to require the 'or'
instructions. The chances that vectorization would actually help a
memory-bound sequence like that seem small, but it looks nicer with:
vpmovzxwd (%rsi), %xmm0
vmovdqu %xmm0, (%rdi)
rather than:
movzwl (%rsi), %eax
movl %eax, (%rdi)
...
In the motivating test, we avoid creating a vector mess that is
unrecoverable in the backend, and SDAG forms the expected bswap
instructions after load combining:
movzbl (%rdi), %eax
vmovd %eax, %xmm0
movzbl 1(%rdi), %eax
vmovd %eax, %xmm1
movzbl 2(%rdi), %eax
vpinsrb $4, 4(%rdi), %xmm0, %xmm0
vpinsrb $8, 8(%rdi), %xmm0, %xmm0
vpinsrb $12, 12(%rdi), %xmm0, %xmm0
vmovd %eax, %xmm2
movzbl 3(%rdi), %eax
vpinsrb $1, 5(%rdi), %xmm1, %xmm1
vpinsrb $2, 9(%rdi), %xmm1, %xmm1
vpinsrb $3, 13(%rdi), %xmm1, %xmm1
vpslld $24, %xmm0, %xmm0
vpmovzxbd %xmm1, %xmm1 # xmm1 = xmm1[0],zero,zero,zero,xmm1[1],zero,zero,zero,xmm1[2],zero,zero,zero,xmm1[3],zero,zero,zero
vpslld $16, %xmm1, %xmm1
vpor %xmm0, %xmm1, %xmm0
vpinsrb $1, 6(%rdi), %xmm2, %xmm1
vmovd %eax, %xmm2
vpinsrb $2, 10(%rdi), %xmm1, %xmm1
vpinsrb $3, 14(%rdi), %xmm1, %xmm1
vpinsrb $1, 7(%rdi), %xmm2, %xmm2
vpinsrb $2, 11(%rdi), %xmm2, %xmm2
vpmovzxbd %xmm1, %xmm1 # xmm1 = xmm1[0],zero,zero,zero,xmm1[1],zero,zero,zero,xmm1[2],zero,zero,zero,xmm1[3],zero,zero,zero
vpinsrb $3, 15(%rdi), %xmm2, %xmm2
vpslld $8, %xmm1, %xmm1
vpmovzxbd %xmm2, %xmm2 # xmm2 = xmm2[0],zero,zero,zero,xmm2[1],zero,zero,zero,xmm2[2],zero,zero,zero,xmm2[3],zero,zero,zero
vpor %xmm2, %xmm1, %xmm1
vpor %xmm1, %xmm0, %xmm0
vmovdqu %xmm0, (%rsi)
movl (%rdi), %eax
movl 4(%rdi), %ecx
movl 8(%rdi), %edx
movbel %eax, (%rsi)
movbel %ecx, 4(%rsi)
movl 12(%rdi), %ecx
movbel %edx, 8(%rsi)
movbel %ecx, 12(%rsi)
Differential Revision: https://reviews.llvm.org/D78997
Sanjay Patel [Thu, 7 May 2020 18:53:57 +0000 (14:53 -0400)]
[SLP] add test for constant expression fake of load-combine pattern; NFC
This is a reduction of the test that caused D78997 to be reverted.
Hiroshi Yamauchi [Fri, 3 Apr 2020 17:40:26 +0000 (10:40 -0700)]
[BFI][CGP] Add limited support for detecting missed BFI updates and fix one in CodeGenPrepare.
Summary:
This helps detect some missed BFI updates during CodeGenPrepare.
This is debug build only and disabled behind a flag.
Fix a missed update in CodeGenPrepare::dupRetToEnableTailCallOpts().
Reviewers: davidxl
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77417
Paula Toth [Thu, 7 May 2020 18:55:29 +0000 (11:55 -0700)]
[libc] Fix warnings on release build.
Summary:
These warnings were present when building llvm-libc in release mode.
```
workspace/llvm-project/libc/utils/benchmarks/LibcMemoryBenchmarkTest.cpp:50:34: warning: 'None' is deprecated: Use Align() or Align(1) instead [-Wdeprecated-declarations]
Conf.AddressAlignment = Align::None();
workspace/llvm-project/libc/utils/testutils/FDReaderUnix.cpp:19:7: warning: unused variable 'err' [-Wunused-variable]
int err = ::pipe(pipefd);
```
For test-utils it seems in general we should use `report_fatal_error` instead of asserts as these are turned off when building in release mode.
https://llvm.org/docs/CodingStandards.html#assert-liberally
Reviewers: abrachet, sivachandra
Reviewed By: abrachet, sivachandra
Subscribers: tschuett, libc-commits
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D79469
Jonas Devlieghere [Thu, 7 May 2020 18:53:57 +0000 (11:53 -0700)]
[lldb/Test] Fix typo in find-and-replace.
mydeveloperday [Thu, 7 May 2020 18:53:56 +0000 (19:53 +0100)]
[clang-format] [PR45791] BeforeLambdaBody is confused by comment inside lambda
Summary:
https://bugs.llvm.org/show_bug.cgi?id=45791
Lambda with line comment is incorrectly formatted
```
auto k = []() // comment
{ return; };
````
```
auto k = []() // comment { return; };
```
Reviewed By: Wawha
Subscribers: cfe-commits
Tags: #clang, #clang-format
Differential Revision: https://reviews.llvm.org/D79320
mydeveloperday [Thu, 7 May 2020 18:52:12 +0000 (19:52 +0100)]
[clang-format] ensure dump_format_style.py works with Python3 correctly
Summary:
Python2 has been removed from cygwin, this means anyone running the dump_format_style.py in a cygwin shell could pick up python3 instead
In Python3 all strings are unicode as the file is opened in binary mode we need to encode the contents string or we'll face the following error
```
Traceback (most recent call last):
File "./dump_format_style.py", line 228, in <module>
output.write(contents)
TypeError: a bytes-like object is required, not 'str'
```
Reviewed By: krasimir
Subscribers: cfe-commits
Tags: #clang, #clang-format
Differential Revision: https://reviews.llvm.org/D79326
mydeveloperday [Thu, 7 May 2020 18:50:21 +0000 (19:50 +0100)]
[clang-format] [PR45126] Help text is missing all available formats
Summary:
https://bugs.llvm.org/show_bug.cgi?id=45126
GNU and Microsoft styles are built in supported styles but are not displayed in the help text
Reviewed By: sammccall
Subscribers: cfe-commits
Tags: #clang, #clang-format
Differential Revision: https://reviews.llvm.org/D79372
sameeran joshi [Tue, 5 May 2020 20:11:58 +0000 (01:41 +0530)]
[flang]Add examples in documentation/BijectiveInternalNameUniquing.md
Summary:
I thought it would be simpler to understand on how the unique names would
look like when an example is present. So I added some examples.
I found 2 such places to add examples
-Common blocks
-Module scope global data
Reviewers: schweitz, kiranchandramohan, sscalpone, jeanPerier, jdoerfert, DavidTruby
Reviewed By: schweitz, jeanPerier
Subscribers: llvm-commits, flang-commits
Tags: #flang, #llvm
Differential Revision: https://reviews.llvm.org/D79442
Adrian Prantl [Thu, 7 May 2020 01:02:44 +0000 (18:02 -0700)]
Add a function to detect whether an Xcode SDK supports Swift
Differential Revision: https://reviews.llvm.org/D79535
Jonas Devlieghere [Thu, 7 May 2020 18:15:58 +0000 (11:15 -0700)]
[lldb/Test] Add @skipIfReproducer to tests using lldb::FileSP.
lldb::FileSP is a typedef for std::shared_ptr<lldb_private::File> and
the reproducers cannot instrument a lldb_private constructor.
Adrian Prantl [Thu, 7 May 2020 17:53:50 +0000 (10:53 -0700)]
Add an XcodeSDK::GetSDKTypeForTriple function
This is something used in swift-lldb, but of general usefulness.
Differential Revision: https://reviews.llvm.org/D79538
<rdar://problem/
62684906>
Jan Korous [Wed, 6 May 2020 19:15:49 +0000 (12:15 -0700)]
[YAMLVFSWriter][Test][NFC] Add couple tests
Differential Revision: https://reviews.llvm.org/D79552
Lei Zhang [Thu, 7 May 2020 13:47:27 +0000 (09:47 -0400)]
[mlir] Remove unnecessary DEPENDS for MLIRMlirOptMain
https://github.com/llvm/llvm-project/commit/
c296d2dc53d5c11c
fixes the dependency issue by turning LINK_LIBS to PUBLIC.
These explicit DEPENDS are not needed anymore.
Differential Revision: https://reviews.llvm.org/D79574
Jan Korous [Wed, 6 May 2020 06:45:49 +0000 (23:45 -0700)]
[YAMLVFSWriter] Fix directory handling
For empty directories (except the first one) we've been adding a file
with the same name as the directory to the result VFS mapping.
Differential Revision: https://reviews.llvm.org/D79551
Lei Zhang [Thu, 7 May 2020 14:31:19 +0000 (10:31 -0400)]
[mlir][vulkan-runner] Remove duplicated/uncessary link libraries
vulkan-runtime-wrappers does not need MLIRSPIRVSerialization,
which is used by the ConvertGpuLaunchFuncToVulkanLaunchFunc pass
under the hood.
Differential Revision: https://reviews.llvm.org/D79577
Antonio Sanchez [Thu, 7 May 2020 17:49:12 +0000 (13:49 -0400)]
[libc++] Fix ostream for complex numbers with fixed field width
The ostream operator<< is currently broken for std::complex with
specified field widths.
This patch a partial revert of
c3478eff7a65 (reviewed as D71214),
restoring the correct behavior.
Differential Revision: https://reviews.llvm.org/D78816
Adrian Prantl [Thu, 7 May 2020 00:20:15 +0000 (17:20 -0700)]
Reuse existing functionality in XcodeSDK::SDKSupportsModules (NFC)
Differential Revision: https://reviews.llvm.org/D79533
Jan Korous [Wed, 6 May 2020 05:03:37 +0000 (22:03 -0700)]
[YAMLVFSWriter][Tests] Fix YAMLVFSWriterTest
Differential Revision: https://reviews.llvm.org/D79550
Louis Dionne [Thu, 7 May 2020 17:41:45 +0000 (13:41 -0400)]
[libc++] NFC: Port type_info tests to C++03
Vedant Kumar [Thu, 7 May 2020 01:06:40 +0000 (18:06 -0700)]
[dsymutil] Avoid relocating DW_AT_call_pc twice
Summary:
Avoid relocating DW_AT_call_pc, e.g. when a call PC is equal to the
function's low_pc as is the case in the test:
```
__Z5func1v:
0000000100007f94 b __Z5func2v
```
rdar://
62952440
Reviewers: friss, JDevlieghere
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D79536
Mara Sophie Grosch [Thu, 7 May 2020 16:10:33 +0000 (12:10 -0400)]
[libc++] chrono: check _POSIX_TIMERS before using clock_gettime
clock_gettime is documented to be available when _POSIX_TIMERS is
defined. Add a check for this.
Differential Revision: https://reviews.llvm.org/D79305
Jonas Devlieghere [Thu, 7 May 2020 17:02:08 +0000 (10:02 -0700)]
[lldb/Reproducers] Make DoConnectRemote connect to the replay server.
All entry points into ProcessGDBRemote that connect to the debug server
should connect to the replay server instead during reproducer replay.
This patch adds the necessary logic for ConnectRemote, which is
accessible from the SB API. This fixes active replay for
TestRecognizeBreakpoint.py as described in D78588.
Thomas Raoux [Thu, 7 May 2020 15:30:00 +0000 (08:30 -0700)]
[ModuloSchedule] Fix epilogue peeling with illegal phi.
When peeling out the epilogue we need to ignore illegal phis coming from stages
greater than the producer stage. Otherwise we end up with circular phi
dependencies.
Differential Revision: https://reviews.llvm.org/D79581
Casey Carter [Thu, 7 May 2020 16:58:13 +0000 (09:58 -0700)]
[libc++][test] Adjust move_iterator tests to allow C++20
These tests fail due to a couple of changes to `move_iterator` for C++20:
* `move_iterator<I>::operator++(int)` returns `void` in C++20 if `I` doesn't model `forward_iterator`.
* `move_iterator<I>::reference` is calculated in C++20, so `I` must actually have an `operator*() const`.
Differential Revision: https://reviews.llvm.org/D79343
Louis Dionne [Mon, 27 Apr 2020 18:46:52 +0000 (14:46 -0400)]
[libc++] Add tests for _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT
The issue on Apple platforms was fixed in
2464d8135e2a, but this commit
adds some tests to make sure we don't regress.
See https://llvm.org/PR45549.
Differential Revision: https://reviews.llvm.org/D78963
Alex Zinenko [Thu, 7 May 2020 16:27:40 +0000 (18:27 +0200)]
[mlir] Drop forward-declaration of loop::TerminatorOp.
This Op has been deleted in favor of loop::YieldOp, but the forward
declaration remain in the header.
Nico Weber [Thu, 7 May 2020 16:14:51 +0000 (12:14 -0400)]
Add a test for "clang --version".
Gongyu Deng [Thu, 7 May 2020 16:12:39 +0000 (18:12 +0200)]
tab completion for register read/write
Summary:
1. Created a new common completion for the registers of the current context;
2. Apply this new common completion to the commands register read/write;
3. Unit test.
Reviewers: teemperor, JDevlieghere
Reviewed By: teemperor
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D79490
Logan Smith [Thu, 7 May 2020 16:07:01 +0000 (12:07 -0400)]
[libcxx] Add deduction guides for shared_ptr and weak_ptr
This patch adds deduction guides to <memory> to allow deducing
construction of shared_ptrs from unique_ptrs, and from weak_ptrs
and vice versa, as specified by C++17.
Differential Revision: https://reviews.llvm.org/D69603
Logan Smith [Thu, 7 May 2020 15:54:25 +0000 (11:54 -0400)]
[libcxx] Qualify make_pair in searcher implementations to prevent ADL
This patch adds `_VSTD::` to some calls to `make_pair` inside the
implementations of searchers, to prevent things exploding if there is
a make_pair in an associated namespace of a user-defined type.
https://godbolt.org/z/xAFG98
Differential Revision: https://reviews.llvm.org/D72640
Raphael Isemann [Thu, 7 May 2020 15:33:45 +0000 (17:33 +0200)]
[lldb][NFC] Also initialize language_flags in ValueObject::Dereference
We currently rely on the TypeSystem implementation to initialize this value
with 0 in the GetChildCompilerTypeAtIndex call below. Let's just initialize
this variable like the rest.
Christopher Tetreault [Thu, 7 May 2020 15:34:55 +0000 (08:34 -0700)]
[SVE] Fix incorrect usage of getNumElements() in InstCombineCalls
Summary:
Remove incorrect usage of getNumElements() from visitCallInst(). The
number of elements was being used to construct a DemandedElts bitfield.
This operation does not make sense for scalable vectors. Cast to
FixedVectorType
Identified by test case Clang :: CodeGen/aarch64-sve-intrinsics/acle_sve_mla.c
Reviewers: rengolin, efriedma, sdesmalen, c-rhodes, david-arm
Reviewed By: david-arm
Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D79524
Simon Pilgrim [Thu, 7 May 2020 15:43:11 +0000 (16:43 +0100)]
[cmake] Add headers in include/llvm/Remarks subdirectory
Appeases visual studio
Arthur Eubanks [Tue, 5 May 2020 20:33:13 +0000 (13:33 -0700)]
[MSan] Pass MSan command line options under new pass manager
Summary:
Properly forward TrackOrigins and Recover user options to the MSan pass under the new pass manager.
This makes the number of check-msan failures when ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER is TRUE go from 52 to 2.
Based on https://reviews.llvm.org/D77249.
Reviewers: nemanjai, vitalybuka, leonardchan
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D79445
Sander de Smalen [Tue, 5 May 2020 15:31:56 +0000 (16:31 +0100)]
[SveEmitter] Add builtins for SVE2 svtbx (extended table lookup)
This patch adds builtins for:
- svtbx
Sander de Smalen [Tue, 5 May 2020 15:26:30 +0000 (16:26 +0100)]
[SveEmitter] Add builtins for SVE2 Optional extensions (AES, SHA3, SM4, BITPERM)
This patch adds various builtins under their corresponding feature macros:
Defined under __ARM_FEATURE_SVE2_AES:
- svaesd
- svaese
- svaesimc
- svaesmc
- svpmullb_pair
- svpmullt_pair
Defined under __ARM_FEATURE_SVE2_SHA3:
- svrax1
Defined under __ARM_FEATURE_SVE2_SM4:
- svsm4e
- svsm4ekey
Defined under __ARM_FEATURE_SVE2_BITPERM:
- svbdep
- svbext
- svbgrp
Sander de Smalen [Tue, 5 May 2020 15:22:22 +0000 (16:22 +0100)]
[SveEmitter] Add builtins for SVE2 Character match instructions
This patch adds builtins for:
- svmatch
- svnmatch
Sander de Smalen [Tue, 5 May 2020 15:21:46 +0000 (16:21 +0100)]
[SveEmitter] Add builtins for SVE2 Vector histogram count instructions
This patch adds builtins for:
- svhistcnt
- svhistseg
Sander de Smalen [Tue, 5 May 2020 15:19:24 +0000 (16:19 +0100)]
[SveEmitter] Add builtins for SVE2 Floating-point integer binary logarithm instructions
This patch adds builtins for:
- svlogb
Sander de Smalen [Tue, 5 May 2020 15:07:09 +0000 (16:07 +0100)]
[SveEmitter] Add builtins for SVE2 Floating-point widening multiply-accumulate
This patch adds builtins for:
- svmlalb, svmlalb_lane
- svmlalt, svmlalt_lane
- svmlslb, svmlslb_lane
- svmlslt, svmlslt_lane
Sander de Smalen [Tue, 5 May 2020 15:04:00 +0000 (16:04 +0100)]
[SveEmitter] Add builtins for SVE2 Complex integer dot product
This patch adds builtins for:
- svcdot, svcdot_lane
Sander de Smalen [Tue, 5 May 2020 14:26:59 +0000 (15:26 +0100)]
[SveEmitter] Add builtins for SVE2 Widening complex integer arithmetic
This patch adds builtins for:
- svaddlbt
- svqdmlalbt
- svqdmlslbt
- svsublbt
- svsubltb
Sander de Smalen [Tue, 5 May 2020 14:13:35 +0000 (15:13 +0100)]
[SveEmitter] Add builtins for SVE2 Narrowing DSP operations
This patch adds builtins for:
- svaddhnb
- svaddhnt
- svqrshrnb
- svqrshrnt
- svqrshrunb
- svqrshrunt
- svqshrnb
- svqshrnt
- svqshrunb
- svqshrunt
- svqxtnb
- svqxtnt
- svqxtunb
- svqxtunt
- svraddhnb
- svraddhnt
- svrshrnb
- svrshrnt
- svrsubhnb
- svrsubhnt
- svshrnb
- svshrnt
- svsubhnb
- svsubhnt
Sander de Smalen [Tue, 5 May 2020 14:10:48 +0000 (15:10 +0100)]
[SveEmitter] Add builtins for SVE2 Widening DSP operations
This patch adds builtins for:
- svabalb
- svabalt
- svabdlb
- svabdlt
- svaddlb
- svaddlt
- svaddwb
- svaddwt
- svmlalb, svmlalb_lane
- svmlalt, svmlalt_lane
- svmlslb, svmlslb_lane
- svmlslt, svmlslt_lane
- svmullb, svmullb_lane
- svmullt, svmullt_lane
- svqdmlalb, svqdmlalb_lane
- svqdmlalt, svqdmlalt_lane
- svqdmlslb, svqdmlslb_lane
- svqdmlslt, svqdmlslt_lane
- svqdmullb, svqdmullb_lane
- svqdmullt, svqdmullt_lane
- svshllb
- svshllt
- svsublb
- svsublt
- svsubwb
- svsubwt
Sander de Smalen [Tue, 5 May 2020 14:09:47 +0000 (15:09 +0100)]
[SveEmitter] Add builtins for SVE2 Uniform complex integer arithmetic
This patch adds builtins for:
- svcadd
- svqcadd
- svcmla
- svcmla_lane
- svqrdcmlah
- svqrdcmlah_lane
Yaxun (Sam) Liu [Thu, 7 May 2020 14:59:43 +0000 (10:59 -0400)]
Revert "Let clang print registered targets for --version"
This reverts commit
66041187c9028f730c41597fe5ea6a63fda1ccad.
Will reland it under --print-target.
Differential Revision: https://reviews.llvm.org/D79210
Tim Keith [Thu, 7 May 2020 14:50:39 +0000 (07:50 -0700)]
[flang] Fix to IsDescriptor
IsDescriptor was returning false for a component whose shape depended
on a length parameter. Change it to return true for any array with
non-constant bounds.
Differential Revision: https://reviews.llvm.org/D79349
Hans Wennborg [Thu, 7 May 2020 14:26:36 +0000 (16:26 +0200)]
Revert "[SLP] add another bailout for load-combine patterns"
It caused asserts building Chromium, see discussion on
https://reviews.llvm.org/D78997
This reverts commit
86dfbc676ebe4f46f9cff629f0fe21fa65bd0f97.
Sanjay Patel [Thu, 7 May 2020 14:12:47 +0000 (10:12 -0400)]
[VectorCombine] add tests for insert into arbitrary constant; NFC
Goes with D79452.
Sander de Smalen [Tue, 5 May 2020 14:08:10 +0000 (15:08 +0100)]
[SveEmitter] Add builtins for SVE2 Multiplication by indexed elements
This patch adds builtins for:
- svmla_lane
- svmls_lane
- svmul_lane
Sander de Smalen [Tue, 5 May 2020 14:00:57 +0000 (15:00 +0100)]
[SveEmitter] Add builtins for SVE2 Large integer arithmetic
This patch adds builtins for:
- svadclb
- svadclt
- svsbclb
- svsbclt
Sander de Smalen [Tue, 5 May 2020 13:59:15 +0000 (14:59 +0100)]
[SveEmitter] Add builtins for SVE2 Bitwise ternary logical instructions
This patch adds builtins for:
- svbcax
- svbsl
- svbsl1n
- svbsl2n
- sveor3
- svnbsl
- svxar
Sander de Smalen [Tue, 5 May 2020 13:58:01 +0000 (14:58 +0100)]
[SveEmitter] Add builtins for SVE2 widening pairwise arithmetic
This patch adds builtins for:
- svadalp
Sander de Smalen [Tue, 5 May 2020 13:57:18 +0000 (14:57 +0100)]
[SveEmitter] Add builtins for SVE2 Non-widening pairwise arithmetic
This patch adds builtins for:
- svaddp
- svmaxnmp
- svmaxp
- svminnmp
- svminp
Alexey Bataev [Thu, 30 Apr 2020 17:32:22 +0000 (13:32 -0400)]
[OPENMP]Consider 'omp_null_allocator' as a predefined allocator.
Summary:
omp.h header file defines omp_null_allocator as a predefined allocator,
need to consider it also as a predefined allocator.
Reviewers: jdoerfert
Subscribers: jholewinski, yaxunl, guansong, cfe-commits, caomhin
Tags: #clang
Differential Revision: https://reviews.llvm.org/D79186
Simon Pilgrim [Thu, 7 May 2020 14:08:17 +0000 (15:08 +0100)]
[X86] Add AVX512VL concat-cast tests.
Lei Zhang [Tue, 5 May 2020 20:43:00 +0000 (16:43 -0400)]
[mlir][spirv] Serialize all operands together if possible
SPIR-V ops can mix operands and attributes in the definition. These
operands and attributes are serialized in the exact order of the definition
to match SPIR-V binary format requirements. It can cause excessive
generated code bloat because we are emitting code to handle each
operand/attribute separately. So here we probe first to check whether all
the operands are ahead of attributes. Then we can serialize all operands
together.
This removes ~1000 lines of code from the generated inc file.
Differential Revision: https://reviews.llvm.org/D79446
Lei Zhang [Tue, 5 May 2020 20:41:58 +0000 (16:41 -0400)]
[mlir][spirv] Remove template functions for getting op's opcode
These template functions are used in the serializer, where we can
actually directly query the opcode from the op's definition and
use that in the auto-generated serialization logic.
This removes a set of templates accounting for 319 lines from
the auto-generated inc file.
Differential Revision: https://reviews.llvm.org/D79444
Sjoerd Meijer [Thu, 7 May 2020 12:12:46 +0000 (13:12 +0100)]
[LV] Fix typo in variable name. NFC.
Sander de Smalen [Tue, 5 May 2020 13:53:07 +0000 (14:53 +0100)]
[SveEmitter] Add builtins for SVE2 uniform DSP operations
This patch adds builtins for:
- svqdmulh, svqdmulh_lane
- svqrdmlah, svqrdmlah_lane
- svqrdmlsh, svqrdmlsh_lane
- svqrdmulh, svqrdmulh_lane
Sander de Smalen [Tue, 5 May 2020 13:20:26 +0000 (14:20 +0100)]
[SveEmitter] Add more SVE2 builtins for shift operations
This patch adds builtins for:
- svqshlu
- svrshr
- svrsra
- svsli
- svsra
- svsri
Sander de Smalen [Tue, 5 May 2020 13:13:43 +0000 (14:13 +0100)]
[SveEmitter] Add builtins for SVE2 saturating shift left and addition
This patch adds builtins for:
- svqrshl
- svqshl
- svsqadd
- svuqadd
Sander de Smalen [Tue, 5 May 2020 12:50:50 +0000 (13:50 +0100)]
[SveEmitter] Add builtins for SVE2 uniform DSP operations
This patch adds builtins for:
- svqadd, svhadd, svrhadd
- svqsub, svhsub, svqusbr, svhsubr
- svqabs
- svqneg
- svrecpe
- svrsqrte
Sander de Smalen [Tue, 5 May 2020 12:46:45 +0000 (13:46 +0100)]
[SveEmitter] Add builtins for svqdecp and svqincp
This patch adds builtins for saturating increment/decrement by svcntp,
in scalar and vector forms.
Sander de Smalen [Wed, 6 May 2020 12:55:50 +0000 (13:55 +0100)]
[SveEmitter] Add builtins for svinsr
Simon Pilgrim [Thu, 7 May 2020 11:28:31 +0000 (12:28 +0100)]
[X86][AVX] combineSignExtendInReg - promote mask arithmetic before v4i64 canonicalization
We rely on the combine
(sext_in_reg (v4i64 a/sext (v4i32 x)), v4i1) -> (v4i64 sext (v4i32 sext_in_reg (v4i32 x, ExtraVT)))
to avoid complex v4i64 ashr codegen, but doing so prevents v4i64 comparison mask promotion, so ensure we attempt to promote before canonicalizing the (hopefully now redundant sext_in_reg).
Helps with the poor codegen in PR45808.
Sam Parker [Thu, 7 May 2020 12:13:58 +0000 (13:13 +0100)]
[NFC][AArch64] Add test
Add cost model test for cast operations.
Calixte Denizet [Mon, 20 Apr 2020 08:50:30 +0000 (10:50 +0200)]
[profile] Don't crash when forking in several threads
Summary:
When forking in several threads, the counters were written out in using the same global static variables (see GCDAProfiling.c): that leads to crashes.
So when there is a fork, the counters are resetted in the child process and they will be dumped at exit using the interprocess file locking.
When there is an exec, the counters are written out and in case of failures they're resetted.
Reviewers: jfb, vsk, marco-c, serge-sans-paille
Reviewed By: marco-c, serge-sans-paille
Subscribers: llvm-commits, serge-sans-paille, dmajor, cfe-commits, hiraditya, dexonsmith, #sanitizers, marco-c, sylvestre.ledru
Tags: #sanitizers, #clang, #llvm
Differential Revision: https://reviews.llvm.org/D78477
Sergej Jaskiewicz [Thu, 7 May 2020 12:01:39 +0000 (15:01 +0300)]
Revert "[cmake] Allow std::filesystem tests in CrossWinToARMLinux.cmake"
This reverts commit
67175d8dc53b580bad439f85fda12623fa6993fa.
https://reviews.llvm.org/D78200 has been reverted, so our bot is red.
Make it green by turning off std::filesystem.
Alexander Belyaev [Thu, 7 May 2020 08:53:06 +0000 (10:53 +0200)]
[MLIR] Make ParallelLoopFusion pass scan through all nested regions.
Differential Revision: https://reviews.llvm.org/D79558
Anna Welker [Thu, 7 May 2020 11:29:15 +0000 (12:29 +0100)]
[ARM][MVE] Add support for incrementing gathers
Enables the MVEGatherScatterLowering pass to build
pre-incrementing gathers. Incrementing writeback gathers
are built when it is possible to replace the loop increment
instruction.
Differential Revision: https://reviews.llvm.org/D76786