Craig Topper [Wed, 19 Apr 2017 20:32:11 +0000 (20:32 +0000)]
[APInt] Use SignExtend64 instead of reinventing it. NFC
llvm-svn: 300747
Eli Friedman [Wed, 19 Apr 2017 20:19:58 +0000 (20:19 +0000)]
[SCEV] Make SCEV or modeling more aggressive.
Use haveNoCommonBitsSet to figure out whether an "or" instruction
is equivalent to addition. This handles more cases than just
checking for a constant on the RHS.
Differential Revision: https://reviews.llvm.org/D32239
llvm-svn: 300746
Kostya Serebryany [Wed, 19 Apr 2017 20:17:41 +0000 (20:17 +0000)]
[sanitizer-coverage] remove run-time support for the deprecated -fsanitize-coverage=8bit-counters
llvm-svn: 300745
Kostya Serebryany [Wed, 19 Apr 2017 20:15:58 +0000 (20:15 +0000)]
[sanitizer-coverage] deprecate -fsanitize-coverage=8bit-counters
llvm-svn: 300744
Shoaib Meenai [Wed, 19 Apr 2017 20:11:04 +0000 (20:11 +0000)]
[libc++] Use _LIBCPP_ABI_MICROSOFT instead of _MSC_VER
_LIBCPP_ABI_MICROSOFT is more appropriate to use here, since the
conditionals are controlling Microsoft mangling. It wasn't used
originally since it didn't exist at the time.
llvm-svn: 300743
Dehao Chen [Wed, 19 Apr 2017 20:09:38 +0000 (20:09 +0000)]
Using address range map to speedup finding inline stack for address.
Summary:
In the current implementation, to find inline stack for an address incurs expensive linear search in 2 places:
* linear search for the top-level DIE
* recursive linear traverse the DIE tree to find the path to the leaf DIE
In this patch, a map is built from address to its corresponding leaf DIE. The inline stack is built by traversing from the leaf DIE up to the root DIE. This speeds up batch symbolization by ~10X without noticible memory overhead.
Reviewers: dblaikie
Reviewed By: dblaikie
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32177
llvm-svn: 300742
David Blaikie [Wed, 19 Apr 2017 20:08:21 +0000 (20:08 +0000)]
Parse backend options during thinlto backend compile actions
llvm-svn: 300741
Dehao Chen [Wed, 19 Apr 2017 20:08:14 +0000 (20:08 +0000)]
Update the madd.ll test with utils/update_llc_test_checks.py (NFC)
llvm-svn: 300740
Kostya Serebryany [Wed, 19 Apr 2017 19:57:16 +0000 (19:57 +0000)]
[sanitizer-coverage] deprecate some of the stale coverage variants
llvm-svn: 300738
Dehao Chen [Wed, 19 Apr 2017 19:50:34 +0000 (19:50 +0000)]
PR32710: Disable using PMADDWD for unsigned short.
Summary: PMADDWD can only handle signed short.
Reviewers: mkuper, wmi
Reviewed By: mkuper
Subscribers: andreadb, llvm-commits
Differential Revision: https://reviews.llvm.org/D32236
llvm-svn: 300737
Matt Arsenault [Wed, 19 Apr 2017 19:38:10 +0000 (19:38 +0000)]
AMDGPU: Don't emit amd_kernel_code_t for callable functions
This is inserted directly in the text section. The relocation
for the function ends up resolving to the beginning of the
amd_kernel_code_t header rather than the actual function
entry point.
Also skip some of the comments for initialization
that only makes sense for kernels.
llvm-svn: 300736
Aditya Nandakumar [Wed, 19 Apr 2017 19:14:20 +0000 (19:14 +0000)]
[tblgen] GCC/MS builtin to target intrisics map.
Patch by Ettore Speziale
Allow TableGen to generate static functions to perform GCC/MS builtin name to
target specific intrinsic ID mapping.
https://reviews.llvm.org/D31150
llvm-svn: 300735
Artem Tamazov [Wed, 19 Apr 2017 19:12:06 +0000 (19:12 +0000)]
[AMDGPU][mc][tests][NFC] Update bulk ISA tests for Gfx7 and Gfx8
Added approx. 1100 gfx7 and 1040 gfx8 test cases.
llvm-svn: 300734
Jim Ingham [Wed, 19 Apr 2017 18:56:44 +0000 (18:56 +0000)]
Add CopyDiagnostic to the DiagnosticManager.
From Gregor Milos (gmilos@apple.com), for:
https://reviews.llvm.org/D32078
llvm-svn: 300733
Matt Arsenault [Wed, 19 Apr 2017 18:29:07 +0000 (18:29 +0000)]
StructurizeCFG: Directly invert cmp instructions
The most common case for a branch condition is
a single use compare. Directly invert the branch
predicate rather than adding a lot of xor i1 true
which the DAG will have to fold later.
This produces nicer to read structurizer output.
This produces some random changes in codegen
due to the DAG swapping branch conditions itself,
and then does a poor job of dealing with those
inverts.
llvm-svn: 300732
Sanjoy Das [Wed, 19 Apr 2017 18:21:09 +0000 (18:21 +0000)]
[GVN] Don't coerce non-integral pointers to integers or vice versa
Summary:
See http://llvm.org/docs/LangRef.html#non-integral-pointer-type
The NewGVN test does not fail without these changes (perhaps it does
try to coerce pointers <-> integers to begin with?), but I added the
test case anyway.
Reviewers: dberlin
Subscribers: mcrosier, llvm-commits, Prazek
Differential Revision: https://reviews.llvm.org/D32208
llvm-svn: 300730
Davide Italiano [Wed, 19 Apr 2017 18:18:25 +0000 (18:18 +0000)]
[Utility/StringLexer] Remove dead code.
Differential Revision: https://reviews.llvm.org/D32148
llvm-svn: 300729
Richard Smith [Wed, 19 Apr 2017 18:17:51 +0000 (18:17 +0000)]
Update comment to match r300252.
llvm-svn: 300728
David Gross [Wed, 19 Apr 2017 18:14:21 +0000 (18:14 +0000)]
Teach RenderScriptRuntime about changed context representation.
Summary:
The runtime discovers contexts through RenderScriptRuntime::Capture*()
methods. These methods see the low-level context representation.
However, the runtime calls APIs that require the high-level context
representation. Therefore, it needs to call yet another API to find
the high-level representation associated with a given low-level
representation.
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D32184
llvm-svn: 300727
Tim Northover [Wed, 19 Apr 2017 18:07:54 +0000 (18:07 +0000)]
ARM: TLS calling convention doesn't preserve r9 or r12 on Darwin.
llvm-svn: 300726
Sanjay Patel [Wed, 19 Apr 2017 18:05:06 +0000 (18:05 +0000)]
[DAG] add splat vector support for 'and' in SimplifyDemandedBits
The patch itself is simple: stop discriminating against vectors in visitAnd() and again in
SimplifyDemandedBits().
Some notes for reference:
1. We're not consistent about calls to SimplifyDemandedBits in the various visitXXX functions.
Sometimes, we check if the RHS is a constant first. Other times (like here), we just dive in.
2. I'd like to break the vector shackles in steps for the sake of risk minimization, but we could
make similar simultaneous changes in other places if we think that would be better.
3. I don't know what the intent of the changed tests in this patch was supposed to be, but since
they wiggled in a positive way, I'm just going with that. :)
4. In the rotate tests, note that we can see through non-splat constants. This is a result of D24253.
5. My motivation for being here now is to make D31944 look better, so this is step 1 of N towards
improving the vector codegen in that patch without writing any actual new code.
Differential Revision: https://reviews.llvm.org/D32230
llvm-svn: 300725
Peter Collingbourne [Wed, 19 Apr 2017 18:00:05 +0000 (18:00 +0000)]
IR: Remove some comments that are documenting the obvious. NFC.
llvm-svn: 300724
Vedant Kumar [Wed, 19 Apr 2017 17:58:30 +0000 (17:58 +0000)]
[Coverage] Don't emit mappings for functions in dependent contexts (fixes PR32679)
The coverage implementation marks functions which won't be emitted as
'deferred', so that it can emit empty coverage regions for them later
(once their linkages are known).
Functions in dependent contexts are an exception: if there isn't a full
instantiation of a function, it shouldn't be marked 'deferred'. We've
been breaking that rule without much consequence because we just ended
up with useless, extra, empty coverage mappings. With PR32679, this
behavior finally caused a crash, because clang marked a partial template
specialization as 'deferred', causing the MS mangler to choke in its
delayed-template-parsing mode:
error: cannot mangle this template type parameter type yet
(http://bugs.llvm.org/show_bug.cgi?id=32679)
Fix this by checking if a decl's context is a dependent context before
marking it 'deferred'.
Based on a patch by Adam Folwarczny!
Differential Revision: https://reviews.llvm.org/D32144
llvm-svn: 300723
Akira Hatanaka [Wed, 19 Apr 2017 17:54:08 +0000 (17:54 +0000)]
[Sema][ObjC] Disallow jumping into ObjC fast enumeration loops.
rdar://problem/
31635406
Differential Revision: https://reviews.llvm.org/D32187
llvm-svn: 300722
Benjamin Kramer [Wed, 19 Apr 2017 17:46:15 +0000 (17:46 +0000)]
[MathExtras] Fix undefined behavior (shift by bit width)
While there add some unit tests for uint64_t. Found by ubsan.
llvm-svn: 300721
Matt Arsenault [Wed, 19 Apr 2017 17:42:39 +0000 (17:42 +0000)]
AMDGPU: Don't align callable functions to 256
llvm-svn: 300720
Matt Arsenault [Wed, 19 Apr 2017 17:42:34 +0000 (17:42 +0000)]
AMDGPU: Change DivergenceAnalysis for function arguments
Stop assuming all functions are kernels.
llvm-svn: 300719
Reid Kleckner [Wed, 19 Apr 2017 17:28:52 +0000 (17:28 +0000)]
Prefer addAttr(Attribute::AttrKind) over the AttributeList overload
This should simplify the call sites, which typically want to tweak one
attribute at a time. It should also avoid creating ephemeral
AttributeLists that live forever.
llvm-svn: 300718
Davide Italiano [Wed, 19 Apr 2017 17:26:57 +0000 (17:26 +0000)]
[InstCombine] Reduce visitLoadInst() code duplication. NFCI.
llvm-svn: 300717
Keith Wyss [Wed, 19 Apr 2017 17:20:47 +0000 (17:20 +0000)]
Skip tests that use 'llvm_xray' for standalone builds.
Summary:
Tests that generate output with compiler-rt and verify it with the llvm_xray
command (built from the llvm tree) are extremely convenient, but compiler-rt
can be built out of tree and llvm_xray is not built for every target.
This change intends to disable tests for out of tree builds, but does nothing
to detect whether llvm_xray can be found elsewhere on the path, is fresh enough,
or is part of a build target for the in tree build.
Tested:
Tested that this didn't break check-xray. Haven't reproduced bots or standalone
builds.
Reviewers: dberris, kcc
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32150
llvm-svn: 300716
Craig Topper [Wed, 19 Apr 2017 17:01:58 +0000 (17:01 +0000)]
[APInt] Move the 'return *this' from the slow cases of assignment operators inline. We should let the compiler see that the fast/slow cases both return *this.
I don't think we chain assignments together very often so this shouldn't matter much.
llvm-svn: 300715
Sanjay Patel [Wed, 19 Apr 2017 16:48:22 +0000 (16:48 +0000)]
[InstSimplify] fold identity shuffles (recursing if needed)
This patch simplifies the examples from D31509 and D31927 (PR30630) and catches
the basic identity shuffle tests that Zvi recently added.
I'm not sure if we have something like this in DAGCombiner, but we should?
It's worth noting that "MaxRecurse / RecursionLimit" is only 3 on entry at the moment.
We might want to bump that up if there are longer shuffle chains like this in the wild.
For now, we're ignoring shuffles that have undef mask elements because it's not
clear how those should be handled.
Differential Revision: https://reviews.llvm.org/D31960
llvm-svn: 300714
Sanjay Patel [Wed, 19 Apr 2017 16:22:19 +0000 (16:22 +0000)]
use 'auto' with 'dyn_cast' and fix formatting; NFC
llvm-svn: 300713
Alex Lorenz [Wed, 19 Apr 2017 15:52:11 +0000 (15:52 +0000)]
Add #pragma clang attribute support to the external_source_symbol attribute
Prior to this commit the external_source_symbol attribute wasn't supported by
#pragma clang attribute for the following two reasons:
- The Named attribute subject hasn't been supported by TableGen.
- There was no way to specify a subject match rule for #pragma clang attribute
that could operate on a set of attribute subjects (e.g. the ones that derive
from NamedDecl).
This commit fixes the two issues and thus adds external_source_symbol support to
#pragma clang attribute.
rdar://
31169028
Differential Revision: https://reviews.llvm.org/D32176
llvm-svn: 300712
Zachary Turner [Wed, 19 Apr 2017 15:50:43 +0000 (15:50 +0000)]
Add an #include for <climits> for CHAR_BIT.
llvm-svn: 300711
Zachary Turner [Wed, 19 Apr 2017 15:45:31 +0000 (15:45 +0000)]
[Support] Add some helpers to generate bitmasks.
Frequently you you want a bitmask consisting of a specified
number of 1s, either at the beginning or end of a word.
The naive way to do this is to write
template<typename T>
T leadingBitMask(unsigned N) {
return (T(1) << N) - 1;
}
but using this function you cannot produce a word with every
bit set to 1 (i.e. leadingBitMask<uint8_t>(8)) because left
shift is undefined when N is greater than or equal to the
number of bits in the word.
This patch provides an efficient, branch-free implementation
that works for all values of N in [0, CHAR_BIT*sizeof(T)]
Differential Revision: https://reviews.llvm.org/D32212
llvm-svn: 300710
Zachary Turner [Wed, 19 Apr 2017 15:43:23 +0000 (15:43 +0000)]
Remove eol-style:native from MathExtras.h
llvm-svn: 300709
Dehao Chen [Wed, 19 Apr 2017 15:28:58 +0000 (15:28 +0000)]
Revert r300697 which causes buildbot failure.
llvm-svn: 300708
Krzysztof Parzyszek [Wed, 19 Apr 2017 15:15:51 +0000 (15:15 +0000)]
[Hexagon] Generate proper offset in opt-addr-mode
Also, make a few changes to allow using the pass in .mir testcases.
Among other things, change the abbreviation from opt-amode to amode-opt,
because otherwise lit would expand the "opt" part to the full path to
the opt binary.
llvm-svn: 300707
Krzysztof Parzyszek [Wed, 19 Apr 2017 15:14:30 +0000 (15:14 +0000)]
[Hexagon] Remove RDefMap, use Liveness:getNearestAliasedRef instead
llvm-svn: 300706
Krzysztof Parzyszek [Wed, 19 Apr 2017 15:12:44 +0000 (15:12 +0000)]
[RDF] Switch NodeList to SmallVector from std::vector
The list has a single element 75+% of the time, reservation of 4 elements
is sufficient in 95% of cases.
llvm-svn: 300705
Krzysztof Parzyszek [Wed, 19 Apr 2017 15:11:23 +0000 (15:11 +0000)]
[RDF] Use faster version of findBlock
llvm-svn: 300704
Gabor Horvath [Wed, 19 Apr 2017 15:11:10 +0000 (15:11 +0000)]
Remove unnecessary condition as suggested by clang-tidy. NFC
Patch by: Gergely Angeli!
Differential Revision: https://reviews.llvm.org/D31938
llvm-svn: 300703
Krzysztof Parzyszek [Wed, 19 Apr 2017 15:10:09 +0000 (15:10 +0000)]
[RDF] Cache register units for reg masks instead of recalculating them
llvm-svn: 300702
Krzysztof Parzyszek [Wed, 19 Apr 2017 15:08:31 +0000 (15:08 +0000)]
[Hexagon] Cache reached blocks in bit tracker instead of scanning list
llvm-svn: 300701
Sanjay Patel [Wed, 19 Apr 2017 14:58:09 +0000 (14:58 +0000)]
[PowerPC] add test and auto-generate checks; NFC
llvm-svn: 300700
Gabor Horvath [Wed, 19 Apr 2017 14:55:58 +0000 (14:55 +0000)]
[clang-tidy] misc-misplaced-widening-cast: Disable checking of implicit widening casts by default.
Patch by Ádám Balogh!
Differential Revision: https://reviews.llvm.org/D32164
llvm-svn: 300699
Sanjay Patel [Wed, 19 Apr 2017 14:55:50 +0000 (14:55 +0000)]
[ARM] add test and auto-generate checks; NFC
llvm-svn: 300698
Dehao Chen [Wed, 19 Apr 2017 14:50:57 +0000 (14:50 +0000)]
Using address range map to speedup finding inline stack for address.
Summary:
In the current implementation, to find inline stack for an address incurs expensive linear search in 2 places:
* linear search for the top-level DIE
* recursive linear traverse the DIE tree to find the path to the leaf DIE
In this patch, a map is built from address to its corresponding leaf DIE. The inline stack is built by traversing from the leaf DIE up to the root DIE. This speeds up batch symbolization by ~10X without noticible memory overhead.
Reviewers: dblaikie
Reviewed By: dblaikie
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32177
llvm-svn: 300697
Davide Italiano [Wed, 19 Apr 2017 14:23:42 +0000 (14:23 +0000)]
[InstSimplify] Deduce correct type for vector GEP.
InstSimplify returned the wrong type when simplifying a vector GEP
and we ended up crashing when trying to replace all uses with the
new value. Fixes PR32697.
Differential Revision: https://reviews.llvm.org/D32180
llvm-svn: 300693
Nico Weber [Wed, 19 Apr 2017 14:03:40 +0000 (14:03 +0000)]
Let ubsan search UBSAN_SYMBOLIZER_PATH for llvm-symbolizer
https://reviews.llvm.org/D27375
llvm-svn: 300692
Francis Ricci [Wed, 19 Apr 2017 14:00:42 +0000 (14:00 +0000)]
Implement function to get registers from suspended thread on darwin
Reviewers: kubamracek, alekseyshl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32182
llvm-svn: 300691
Francis Ricci [Wed, 19 Apr 2017 14:00:35 +0000 (14:00 +0000)]
Move valid caller-pc checks out of platform-specific checks
Summary:
ProcessPlatformSpecificAllocations for linux leak sanitizer iterated over
memory chunks and ran two checks concurrently:
1) Ensured the pc was valid
2) Checked whether it was a linker allocation
All platforms will need the valid pc check, so it is moved out of the platform-
specific file. To prevent code and logic duplication, the linker allocation
check is moved as well, with the name of the linker supplied by the platform-specific
module. In cases where we don't need to check for linker allocations (ie Darwin),
this name will be a nullptr, and we'll only run the caller pc checks.
Reviewers: kubamracek, alekseyshl, kcc
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32130
llvm-svn: 300690
Jonas Hahnfeld [Wed, 19 Apr 2017 13:55:39 +0000 (13:55 +0000)]
[Driver] Unify linking of OpenMP runtime. NFCI.
While at it, extend test for FreeBSD and check for -lrt iff on Linux.
Differential Revision: https://reviews.llvm.org/D30087
llvm-svn: 300689
Nirav Dave [Wed, 19 Apr 2017 13:52:38 +0000 (13:52 +0000)]
[DAG] Loop over remaining candidates on successful merge of stores of
extracted vectors types. NFCI.
llvm-svn: 300688
Peter Smith [Wed, 19 Apr 2017 12:46:32 +0000 (12:46 +0000)]
[ELF] Always use Script::assignAddresses()
This change fabricates linker script commands for the case where there is
no linker script SECTIONS to control address assignment. This permits us
to have a single Script->assignAddresses() function.
There is a small change in user-visible-behavior with respect to the
handling of .tbss SHT_NOBITS, SHF_TLS as the Script->assignAddresses()
requires setDot() to be called with monotically increasing addresses.
The tls-offset.s test has been updated so that the script and non-script
results match.
This change should make the non-script behavior of lld closer to an
equivalent linker script.
Differential Revision: https://reviews.llvm.org/D31888
llvm-svn: 300687
Roger Ferrer Ibanez [Wed, 19 Apr 2017 12:23:28 +0000 (12:23 +0000)]
Avoid assert when a non-static member function is qualified with __unaligned
Under -fms-extensions __unaligned is a type-qualifier that can be applied to a
non-static member function declaration.
This causes an assertion when mangling the name under Itanium, where that
qualifier is not mangled.
This patch justs makes the minimal change to avoid the crash and avoid mangling
__unaligned, as it currently happens with non-member functions.
Differential Revision: https://reviews.llvm.org/D31976
llvm-svn: 300686
Rui Ueyama [Wed, 19 Apr 2017 12:21:46 +0000 (12:21 +0000)]
Write multiple REQUIRES in one line.
llvm-svn: 300685
Dylan McKay [Wed, 19 Apr 2017 12:13:45 +0000 (12:13 +0000)]
[AVR] Remove the 'multibyte' asm test
It tests registers which are not actually used on AVR.
llvm-svn: 300684
Simon Pilgrim [Wed, 19 Apr 2017 12:06:40 +0000 (12:06 +0000)]
Regenerate test. NFCI.
llvm-svn: 300683
Dylan McKay [Wed, 19 Apr 2017 12:02:52 +0000 (12:02 +0000)]
[AVR] Fix the test suite
A bunch of tests failed because memory operations have been reordered.
I am unsure which commit changed this behaviour as the AVR build was
failing at that point with an unrelated error.
This commit just reoders some of the CHECK lines in some tests to suit
current llc output.
llvm-svn: 300682
Rui Ueyama [Wed, 19 Apr 2017 11:58:59 +0000 (11:58 +0000)]
Fix buildbot failure.
llvm-svn: 300681
Rui Ueyama [Wed, 19 Apr 2017 11:42:12 +0000 (11:42 +0000)]
Rename a test file so that it matches with the option name it is testing.
llvm-svn: 300679
Igor Breger [Wed, 19 Apr 2017 11:34:59 +0000 (11:34 +0000)]
[GlobalIsel][X86] support G_TRUNC selection.
Summary:
[GlobalIsel][X86] support G_TRUNC selection.
Add regbank-select and legalizer tests. Currently legalization of trunc i64 on 32bit platform not supported.
Reviewers: ab, zvi, rovka
Reviewed By: zvi
Subscribers: dberris, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D32115
llvm-svn: 300678
Rui Ueyama [Wed, 19 Apr 2017 11:34:55 +0000 (11:34 +0000)]
Remove a redundant test.
We already have compress-debug-output.s, and that test should suffice
for the -compressed-debug-section option.
llvm-svn: 300677
Rui Ueyama [Wed, 19 Apr 2017 11:32:27 +0000 (11:32 +0000)]
Update comment.
llvm-svn: 300676
Rui Ueyama [Wed, 19 Apr 2017 11:32:13 +0000 (11:32 +0000)]
Rename CompressedHeader ZDebugHeader.
`CompressedHeader` is a header for compressed data, and the header
itself is not compressed. So the previous name was confusing.
llvm-svn: 300675
Rui Ueyama [Wed, 19 Apr 2017 11:31:58 +0000 (11:31 +0000)]
Simplify createHeader and inline it.
createHeader didn't use data members of Elf_Chdr type and write
directly to a given buffer. That is not a good practice because
the function had a knowledge of the struct layout.
llvm-svn: 300674
Rui Ueyama [Wed, 19 Apr 2017 11:31:45 +0000 (11:31 +0000)]
Fallthrough to reduce code a bit. NFC.
llvm-svn: 300673
Simon Pilgrim [Wed, 19 Apr 2017 11:06:22 +0000 (11:06 +0000)]
[X86] Add D32039/PR31357 tests to show current BSWAP codegen
llvm-svn: 300672
Simon Pilgrim [Wed, 19 Apr 2017 10:52:09 +0000 (10:52 +0000)]
[X86][SSE] Add scheduling latency/throughput tests for (most) SSE2 instructions
llvm-svn: 300671
Pavel Labath [Wed, 19 Apr 2017 10:13:29 +0000 (10:13 +0000)]
Fix TestRegisterVariables for clang/arm
Clang rejects __attribute__((regparm)) when targetting arm. The default
calling convention passes arguments in registers anyway, so we can just
remove them in this case.
llvm-svn: 300670
Pavel Labath [Wed, 19 Apr 2017 10:13:22 +0000 (10:13 +0000)]
Revert yesterdays IPv6 patches
The break the linux bots (and probably any other machine which would
run the test suite in a massively parallel way). The problem is that it
can happen that we only successfully create an IPv6 listening socket
(because the relevant IPv4 port is used by another process) and then the
connecting side attempts to connect to the IPv4 port and fails.
It's not very obvious how to fix this problem, so I am reverting this
until we come up with a solution.
llvm-svn: 300669
Renato Golin [Wed, 19 Apr 2017 09:02:52 +0000 (09:02 +0000)]
Revert "ARMFrameLowering: Reserve emergency spill slot for large arguments"
This reverts commit r300639, as it broke self-hosting on ARM. PR32709.
llvm-svn: 300668
Alex Lorenz [Wed, 19 Apr 2017 08:58:56 +0000 (08:58 +0000)]
Add support for editor placeholders to Clang
This commit teaches Clang to recognize editor placeholders that are produced
when an IDE like Xcode inserts a code-completion result that includes a
placeholder. Now when the lexer sees a placeholder token, it emits an
'editor placeholder in source file' error and creates an identifier token
that represents the placeholder. The parser/sema can now recognize the
placeholders and can suppress the diagnostics related to the placeholders. This
ensures that live issues in an IDE like Xcode won't get spurious diagnostics
related to placeholders.
This commit also adds a new compiler option named '-fallow-editor-placeholders'
that silences the 'editor placeholder in source file' error. This is useful
for an IDE like Xcode as we don't want to display those errors in live issues.
rdar://
31581400
Differential Revision: https://reviews.llvm.org/D32081
llvm-svn: 300667
Igor Breger [Wed, 19 Apr 2017 08:40:44 +0000 (08:40 +0000)]
[GlobalISel][X86] Split select tests. NFC.
llvm-svn: 300666
Diana Picus [Wed, 19 Apr 2017 07:29:46 +0000 (07:29 +0000)]
[ARM] GlobalISel: Add support for G_MUL
Support G_MUL, very similar to G_ADD and G_SUB. The only difference is
in the instruction selector, where we have to select either MUL or MULv5
depending on the target.
llvm-svn: 300665
Kristof Beyls [Wed, 19 Apr 2017 07:23:57 +0000 (07:23 +0000)]
[GlobalISel] Support vector-of-pointers in LLT
This fixes PR32471.
As comment 10 on that bug report highlights
(https://bugs.llvm.org//show_bug.cgi?id=32471#c10), there are quite a
few different defendable design tradeoffs that could be made, including
not representing pointers at all in LLT.
I decided to go for representing vector-of-pointer as a concept in LLT,
while keeping the size of the LLT type 64 bits (this is an increase from
48 bits before). My rationale for keeping pointers explicit is that on
some targets probably it's very handy to have the distinction between
pointer and non-pointer (e.g. 68K has a different register bank for
pointers IIRC). If we keep a scalar pointer, it probably is easiest to
also have a vector-of-pointers to keep LLT relatively conceptually clean
and orthogonal, while we don't have a very strong reason to break that
orthogonality. Once we gain more experience on the use of LLT, we can
of course reconsider this direction.
Rejecting vector-of-pointer types in the IRTranslator is also an option
to avoid the crash reported in PR32471, but that is only a very
short-term solution; also needs quite a bit of code tweaks in places,
and is probably fragile. Therefore I didn't consider this the best
option.
llvm-svn: 300664
Kristof Beyls [Wed, 19 Apr 2017 06:38:37 +0000 (06:38 +0000)]
[GlobalISel] Remove non-determinism from IRTranslator.
This showed up in r300535/r300537, which were reverted in r300538 due to
some of the introduced tests in there failing on some bots, due to the
non-determinism fixed in this commit.
Re-committing r300535/r300537 will add 2 tests for the change in this
commit.
llvm-svn: 300663
Chandler Carruth [Wed, 19 Apr 2017 06:23:20 +0000 (06:23 +0000)]
Revert r300657 due to crashes in stage2 of bootstraps:
http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/2476/steps/build-stage2-LLVMgold.so/logs/stdio
http://bb.pgr.jp/builders/clang-3stage-x86_64-linux/builds/15036/steps/build_llvmclang/logs/stdio
I've updated the commit thread, reverting to get the bots back to green.
Original commit summary:
[JumpThread] We want to fold (not thread) when all predecessor go to single BB's successor.
llvm-svn: 300662
Daniel Jasper [Wed, 19 Apr 2017 06:06:38 +0000 (06:06 +0000)]
clang-format: Properly match parens of macro parameter lists.
No tests yet, but this will be tested by the upcoming:
https://reviews.llvm.org/D28462
llvm-svn: 300661
Dean Michael Berris [Wed, 19 Apr 2017 05:37:14 +0000 (05:37 +0000)]
[XRay][compiler-rt] Fix up CFI annotations and stack alignment
Summary:
Previously, we had been very undisciplined about CFI annotations with
the XRay trampolines. This leads to runtime crashes due to mis-alined
stack pointers that some function implementations may run into (i.e.
those using instructions that require properly aligned addresses coming
from the stack). This patch attempts to clean that up, as well as more
accurately use the correct amounts of space on the stack for stashing
and un-stashing registers.
Reviewers: eugenis, kcc
Subscribers: kpw, llvm-commits
Differential Revision: https://reviews.llvm.org/D32202
llvm-svn: 300660
Chandler Carruth [Wed, 19 Apr 2017 05:25:13 +0000 (05:25 +0000)]
Revert r300653 and r300650. The underlying commit fixes one issue with
modules but exposes much more widespread issues. Example and more
information is on the review thread for r300650.
Original commit summary:
[modules] Properly look up the owning module for an instantiation of a merged template.
llvm-svn: 300659
Craig Topper [Wed, 19 Apr 2017 05:17:33 +0000 (05:17 +0000)]
[CodeGen] Use APInt::lshrInPlace instead of APInt::lshr. NFC
llvm-svn: 300658
Xin Tong [Wed, 19 Apr 2017 05:15:57 +0000 (05:15 +0000)]
[JumpThread] We want to fold (not thread) when all predecessor go to single BB's successor. .
Summary: In case all predecessor go to a single successor of current BB. We want to fold (not thread).
Reviewers: efriedma, sanjoy
Reviewed By: sanjoy
Subscribers: dberlin, majnemer, llvm-commits
Differential Revision: https://reviews.llvm.org/D30869
llvm-svn: 300657
Tim Shen [Wed, 19 Apr 2017 03:22:50 +0000 (03:22 +0000)]
Cleanup some GraphTraits iteration code
Use children<> and nodes<> in appropriate places to cleanup the code.
Also, as part of the cleanup,
change the signature of DominatorTreeBase's Split.
It is a protected non-virtual member function called only twice,
both from within the class,
and the removed passed argument in both cases is '*this'.
The reason for the existence of that argument seems to be that
back before r43115 Split was a free function,
so an argument to get '*this' was needed - but now that is no longer the
case.
Patch by Yoav Ben-Shalom!
Differential Revision: https://reviews.llvm.org/D32118
llvm-svn: 300656
Serge Pavlov [Wed, 19 Apr 2017 03:12:05 +0000 (03:12 +0000)]
ARM: Use methods to access data stored with frame instructions
In r300196 several methods were added to TarfetInstrInfo to access
data stored with call frame setup/destroy instructions. This change
replaces calls to getOperand with calls to such special methods in
ARM target.
Differential Revision: https://reviews.llvm.org/D32127
llvm-svn: 300655
Chris Bieneman [Wed, 19 Apr 2017 02:53:53 +0000 (02:53 +0000)]
[CMake] Add configure check for sys/event.h
This enables the kqueue path in MainLoop for Darwin and BSD.
llvm-svn: 300654
Richard Smith [Wed, 19 Apr 2017 02:19:21 +0000 (02:19 +0000)]
Fix member function call with null 'this' pointer.
llvm-svn: 300653
Eric Fiselier [Wed, 19 Apr 2017 02:07:12 +0000 (02:07 +0000)]
Fix tests for extended noexcept in the container adaptors tests
llvm-svn: 300652
Reid Kleckner [Wed, 19 Apr 2017 01:51:13 +0000 (01:51 +0000)]
Remove buggy 'addAttributes(unsigned, AttrBuilder)' overload
The 'addAttributes(unsigned, AttrBuilder)' overload delegated to 'get'
instead of 'addAttributes'.
Since we can implicitly construct an AttrBuilder from an AttributeSet,
just standardize on AttrBuilder.
llvm-svn: 300651
Richard Smith [Wed, 19 Apr 2017 01:36:43 +0000 (01:36 +0000)]
[modules] Properly look up the owning module for an instantiation of a merged template.
When looking for the template instantiation pattern of a templated entity,
consistently select the definition of the pattern if there is one. This means
we'll pick the same owning module when we start instantiating a template that
we'll later pick when determining which modules are visible during that
instantiation.
llvm-svn: 300650
Eric Fiselier [Wed, 19 Apr 2017 01:35:58 +0000 (01:35 +0000)]
Cleanup usages of _LIBCPP_HAS_NO_<c++11-feature> in <exception>
llvm-svn: 300649
Eric Fiselier [Wed, 19 Apr 2017 01:34:08 +0000 (01:34 +0000)]
Cleanup usages of _LIBCPP_HAS_NO_<c++11-feature> in <bitset>, <ios>, <locale>, and <iterator>
llvm-svn: 300648
Chris Bieneman [Wed, 19 Apr 2017 01:32:08 +0000 (01:32 +0000)]
One more attempt and Windows
This is the last Windows compile error, so... Hit me with your best shot.
llvm-svn: 300647
Eric Fiselier [Wed, 19 Apr 2017 01:28:47 +0000 (01:28 +0000)]
Cleanup remaining usages of _LIBCPP_HAS_NO_<c++11-feature> in the functional library
llvm-svn: 300646
Eric Fiselier [Wed, 19 Apr 2017 01:23:39 +0000 (01:23 +0000)]
Cleanup remaining usages of _LIBCPP_HAS_NO_<c++11-feature> in tuple and utility
llvm-svn: 300644
Eric Fiselier [Wed, 19 Apr 2017 01:23:04 +0000 (01:23 +0000)]
Cleanup remaining _LIBCPP_HAS_NO_<c++11-feature> usages in container headers
llvm-svn: 300643
Kostya Serebryany [Wed, 19 Apr 2017 01:22:04 +0000 (01:22 +0000)]
[libFuzzer] update -help: mention -exact_artifact_path in help for -minimize_crash and -cleanse_crash
llvm-svn: 300642
Leslie Zhai [Wed, 19 Apr 2017 01:20:43 +0000 (01:20 +0000)]
[AVR] Migrate to new MCAsmInfo CodePointerSize
Reviewers: dylanmckay, rengolin, kzhuravl, jroelofs
Reviewed By: kzhuravl, jroelofs
Subscribers: kzhuravl, llvm-commits
Differential Revision: https://reviews.llvm.org/D32154
llvm-svn: 300641