Commit Graph

255557 Commits

Author SHA1 Message Date
Rui Ueyama c1a0ac2c4a Add a comment about .note.GNU-split-stack.
llvm-svn: 295941
2017-02-23 07:35:11 +00:00
Ayman Musa 6e670cf44f [X86][AVX512] Change VCVTSS2SD and VCVTSD2SS node types to keep consistency between VEX/EVEX versions.
AVX versions of the converts work on f32/f64 types, while AVX512 version work on vectors.

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

llvm-svn: 295940
2017-02-23 07:24:21 +00:00
Rui Ueyama 65efe35632 Update comment: .note.GNU-stack is added by default today.
llvm-svn: 295939
2017-02-23 07:15:46 +00:00
Rui Ueyama 0633273d05 Update a comment about .note.GNU-stack.
llvm-svn: 295938
2017-02-23 07:06:43 +00:00
Rui Ueyama 6e0142d78c Use isa<MergeInputSection> to check if a section is a merge section.
We have InputSection, MergeInputSection and EhInputSection, so
isa<MergeInputSection> is equivalent to !isa<InputSection> && !isa<
EhInputSection>.

llvm-svn: 295937
2017-02-23 06:47:18 +00:00
Petr Hosek b27bb59a5d [ELF] Ignore R_*_NONE relocs when relocating non-alloc sections
We shouldn't report an error for R_*_NONE relocs since we're emitting
them when writing relocations to discarded sections.

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

llvm-svn: 295936
2017-02-23 06:22:28 +00:00
George Burgess IV 0d6592a899 [CodeGen] Don't reemit expressions for pass_object_size params.
This fixes an assertion failure in cases where we had expression
statements that declared variables nested inside of pass_object_size
args. Since we were emitting the same ExprStmt twice (once for the arg,
once for the @llvm.objectsize call), we were getting issues with
redefining locals.

This also means that we can be more lax about when we emit
@llvm.objectsize for pass_object_size args: since we're reusing the
arg's value itself, we don't have to care so much about side-effects.

llvm-svn: 295935
2017-02-23 05:59:56 +00:00
Argyrios Kyrtzidis 0af90586e7 [c-index-test] For the 'core' invocation, avoid running it under a new thread.
It's unnecessary.

llvm-svn: 295934
2017-02-23 05:51:47 +00:00
Matt Arsenault f0a88dbaab LoadStoreVectorizer: Split even sized illegal chains properly
Implement isLegalToVectorizeLoadChain for AMDGPU to avoid
producing private address spaces accesses that will need to be
split up later. This was doing the wrong thing in the case
where the queried chain was an even number of elements.

A possible <4 x i32> store was being split into
store <2 x i32>
store i32
store i32

rather than
store <2 x i32>
store <2 x i32>

when legal.

llvm-svn: 295933
2017-02-23 03:58:53 +00:00
Rafael Espindola c8d0c7a0e3 Add another missing instantiation.
llvm-svn: 295932
2017-02-23 03:38:14 +00:00
Richard Trieu bcaaf96674 [ODRHash] Handle types in ODR hashing.
Fields will now have their types added to the hash, allowing for detection of
mismatched field types.  This detection allows the existing ODR checking to
produce the correct message.

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

llvm-svn: 295931
2017-02-23 03:25:57 +00:00
Craig Topper 185ced8b2b [X86][IR] In AutoUpgrade, check explicitly for xop.vpcmov and xop.vpcmov.256 instead of anything starting with xop.vpcmov
There were some older intrinsics that only existed for less than a month in 2012 that still exist in some out of tree test files that start with this string, but aren't able to be handled by the current upgrade code and fire an assert. Now we'll go back to treating them as not intrinsics at all and just passing them through to output.

Fixes PR32041, sort of.

llvm-svn: 295930
2017-02-23 03:22:14 +00:00
Rafael Espindola 277155b054 Add missing template instantiations.
llvm-svn: 295929
2017-02-23 03:18:03 +00:00
Matt Arsenault 3e9ce44eee TargetOptions: Fix not accounting for NoSignedZerosFPMath in ==
llvm-svn: 295928
2017-02-23 03:16:44 +00:00
Rui Ueyama 65316d7b36 Use uint64_t instead of ELFT*::uint.
This shouldn't change the meaning of the code.

llvm-svn: 295927
2017-02-23 03:15:57 +00:00
Rui Ueyama de3a54602e s/Mac/macOS/ because that's now the official name of the OS.
llvm-svn: 295926
2017-02-23 02:58:14 +00:00
Rafael Espindola 4b8baab907 Trying to fix the windows build.
llvm-svn: 295925
2017-02-23 02:50:50 +00:00
Rafael Espindola c404d50d7c Merge InputSectionData and InputSectionBase.
Now that InputSectionBase is not a template there is no reason to have
the two.

llvm-svn: 295924
2017-02-23 02:32:18 +00:00
Rafael Espindola b4c9b81aad Convert InputSectionBase to a class.
Removing this template is not a big win by itself, but opens the way
for removing more templates.

llvm-svn: 295923
2017-02-23 02:28:28 +00:00
Sean Callanan efe5d5fe9d Changed builld-llvm.py to use .json files
LLDB has many branches in a variety of repositories.
The build-script.py file is subtly different for each set.
This is unnecessary and causes merge headaches.

This patch makes build-llvm.py consult a directory full 
of .json files, each one of which matches a particular
branch using a regular expression.

This update to the patch introduces a FALLBACK file
whose contents take precedence if the current branch
could not be identified.  If the current branch could be
identified, FALLBACK is updated, allowing the user to
e.g. cut branches off of known branches and still have
the automatic checkout mechanism work.

It also documents all of this.

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

llvm-svn: 295922
2017-02-23 02:21:34 +00:00
Richard Smith 73c3c21fae Fix tracking of whether the previous template instantiation stack matches the current one.
Rather than attempting to compare whether the previous and current top of
context stack are "equal" (which fails for a number of reasons, such as the
context stack entries containing pointers to objects on the stack, or reaching
the same "top of stack" entry through two different paths), track the depth of
context stack at which we last emitted a note and invalidate it when we pop the
context stack to less than that depth.

This causes us to emit some missing "in instantiation of" notes and to stop
emitting redundant "in instantiation of" stacks matching the previous stack in
rare cases.

llvm-svn: 295921
2017-02-23 02:09:03 +00:00
Aaron Watry dfec3c8e95 math: Add native_tan as wrapper to tan
Trivially define native_tan as a redirect to tan.

If there are any targets with a native implementation, we can deal with it later.

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Matt Arsenault <arsenm2@gmail.com>
llvm-svn: 295920
2017-02-23 01:46:57 +00:00
Richard Smith 696e31271b Rename ActiveTemplateInstantiation to CodeSynthesisContext in preparation for
using it for other kinds of context (where we currently produce context notes
in a highly ad-hoc manner).

llvm-svn: 295919
2017-02-23 01:43:54 +00:00
Vedant Kumar e550d11d34 Rename a helper function, NFC.
llvm-svn: 295918
2017-02-23 01:22:38 +00:00
Matthias Braun 1cba1408c0 Test if we can use raw strings on all platforms compiling LLVM.
llvm-svn: 295917
2017-02-23 01:09:01 +00:00
Eli Friedman 13f2e35311 Explicitly state the behavior of inbounds with a null pointer.
See https://llvm.org/bugs/show_bug.cgi?id=31439; this reflects LLVM's
behavior in practice, and should be compatible with C/C++ rules.

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

llvm-svn: 295916
2017-02-23 00:48:18 +00:00
Sean Callanan 3b7c7e1d64 Reverted 295897 pending refinements and fixes for green-dragon.
llvm-svn: 295915
2017-02-23 00:46:30 +00:00
Matt Arsenault d4bca1e9ef AMDGPU: Replace disabled exp inputs with undef
llvm-svn: 295914
2017-02-23 00:44:03 +00:00
Rui Ueyama 85d54b050e Fix /msvclto.
Previously, bitcode files in library paths were passed to the MSVC linker.
This patch strips them.

llvm-svn: 295913
2017-02-23 00:26:42 +00:00
Matt Arsenault a9e16e6597 AMDGPU: Add another BFE pattern
This is the pattern that falls out of the instruction's
definition if offset == 0.

llvm-svn: 295912
2017-02-23 00:23:43 +00:00
Richard Trieu d0786099b1 [ODRHash] Add IdentiferInfo and FieldDecl support.
IdentifierInfo is hashed based on the stored string.  FieldDecl versus other
Decl is now detected, as well as differently named fields.

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

llvm-svn: 295911
2017-02-23 00:23:01 +00:00
Rafael Espindola a55b86c0e5 Reduce templating a bit. NFC.
llvm-svn: 295909
2017-02-23 00:02:03 +00:00
Matt Arsenault 79a45db7f5 AMDGPU: Use clamp with f64
llvm-svn: 295908
2017-02-22 23:53:37 +00:00
Greg Clayton 98f9bcc1c9 Fixed errors in AllocatedBlock:
- Allow zero byte size request for memory and ensure it gets a unique address
- Exit the free block loop when we find an appropriate free block

<rdar://problem/30644888>

llvm-svn: 295907
2017-02-22 23:42:55 +00:00
Michael Kuperstein 6181c62b95 Revert r295868 because it breaks a different SLP lit test.
llvm-svn: 295906
2017-02-22 23:35:13 +00:00
Matt Arsenault d5c6515b68 AMDGPU: Fold FP clamp as modifier bit
The manual is unclear on the details of this. It's not
clear to me if denormals are not allowed with clamp,
or if that is only omod. Not allowing denorms for
fp16 or fp64 isn't useful so I also question if that
is really a restriction. Same with whether this is valid
without IEEE mode enabled.

llvm-svn: 295905
2017-02-22 23:27:53 +00:00
Wei Ding f2cce02eb2 AMDGPU : Update TrapCode based on Trap Handler ABI.
Differential Revision: http://reviews.llvm.org/D30232

llvm-svn: 295904
2017-02-22 23:22:19 +00:00
Alex Lorenz f9a28a287c [ObjC][Modules] Don't perform property lookup in hidden class extensions
rdar://30603803

llvm-svn: 295903
2017-02-22 23:18:49 +00:00
Justin Bogner d519a92a27 [libFuzzer] Update traces hooks test after r293741
This test now passes on darwin.

llvm-svn: 295902
2017-02-22 23:12:36 +00:00
Peter Collingbourne 6321251a4e ELF: Simplify the thinlto.ll test and verify that importing is working correctly.
llvm-svn: 295901
2017-02-22 23:06:49 +00:00
Justin Bogner 59c8420018 [libFuzzer] Mark a test that infinite loops as unsupported
We need to investigate this, but for now it just causes too much
headache when trying to run these tests.

llvm-svn: 295900
2017-02-22 23:05:17 +00:00
Matt Arsenault f5262256a1 AMDGPU: Add replacement bfe intrinsics
llvm-svn: 295899
2017-02-22 23:04:58 +00:00
Sanjay Patel 4805ce0b17 [InstCombine] don't try SimplifyDemandedInstructionBits from add/sub because it's slow and unlikely to succeed
Notably, no regression tests change when we remove these calls, and these are expensive calls.

The motivation comes from the general acknowledgement that the compiler is getting slower:
http://lists.llvm.org/pipermail/llvm-dev/2017-January/109188.html
http://lists.llvm.org/pipermail/llvm-dev/2016-December/108279.html

And specifically the test case attached to PR32037:
https://bugs.llvm.org//show_bug.cgi?id=32037

Profiling the middle-end (opt) part of the compile:
$ ./opt -O2 row_common.bc -o /dev/null

...visitAdd and visitSub are near the top of the instcombine list, and the calls to SimplifyDemandedInstructionBits()
are high within each of those. Those calls account for 1%+ of the opt time in either debug or release profiles. And 
that's the rough win I see from this patch when testing opt built release from r295864 on an iMac with Haswell 4GHz
(model 4790K).

It seems unlikely that we'd be able to eliminate add/sub or change their operands given that add/sub normally affect
all bits, and the PR32037 example shows no IR difference after this change using -O2.

Also worth noting - the code comment in visitAdd:
// This handles stuff like (X & 254)+1 -> (X&254)|1
...isn't true. That transform is handled later with a call to haveNoCommonBitsSet().

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

llvm-svn: 295898
2017-02-22 23:01:12 +00:00
Sean Callanan ff1fb7f846 Changed builld-llvm.py to use .json files
LLDB has many branches in a variety of repositories.
The build-script.py file is subtly different for each set.
This is unnecessary and causes merge headaches.

This patch makes build-llvm.py consult a directory full 
of .json files, each one of which matches a particular
branch using a regular expression.

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

llvm-svn: 295897
2017-02-22 22:57:59 +00:00
George Rokos 63efdd9e1e [OpenMP] Missing virtual destructor in KMPAffinity
Added virtual destructor in a class containing virtual functions.

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

llvm-svn: 295896
2017-02-22 22:50:28 +00:00
Dylan McKay 19d9533496 [AVR] Disable integrated assembler for a few tests
Fixes the build.

llvm-svn: 295895
2017-02-22 22:41:13 +00:00
George Burgess IV 75b34a9610 [CodeGen] Add param info for ctors with ABI args.
This fixes a few assertion failures. Please see the added test case.

llvm-svn: 295894
2017-02-22 22:38:25 +00:00
Eugene Zelenko db56e5a89a [CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 295893
2017-02-22 22:32:51 +00:00
Krzysztof Parzyszek ab57c2bad3 [Hexagon] Implement @llvm.readcyclecounter()
llvm-svn: 295892
2017-02-22 22:28:47 +00:00
Matt Arsenault 7b6c5d28f5 AMDGPU: Don't add emergency stack slot if all spills are SGPR->VGPR
This should avoid reporting any stack needs to be allocated in the
case where no stack is truly used. An unused stack slot is still
left around in other cases where there are real stack objects
but no spilling occurs.

llvm-svn: 295891
2017-02-22 22:23:32 +00:00