140427 Commits

Author SHA1 Message Date
Adrian Prantl
60a7c431c0 Add DWARF debug info support for C++11 inline namespaces.
This implements the DWARF 5 DW_AT_export_symbols feature:
http://dwarfstd.org/ShowIssue.php?issue=141212.1

<rdar://problem/18616046>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285959 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 19:42:02 +00:00
Kostya Serebryany
2d1f4f5e9e [libFuzzer] fix -error_exitcode=N, now with a test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285958 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 19:31:18 +00:00
Michael LeMay
cbbb2b1243 [ADT] IntervalMap: fix setStart and setStop
Summary:
These functions currently require that the new closed interval has a length of
at least 2.  They also currently permit empty half-open intervals.  This patch
defines nonEmpty in each traits structure and uses it to correct the
implementations of setStart and setStop.

Reviewers: stoklund, chandlerc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285957 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 19:14:46 +00:00
Rafael Espindola
a625bffced Remove the last use of report_fatal_error from ELF.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285955 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 19:07:15 +00:00
Justin Bogner
1787ec76dd PDB: Fix some APIs to avoid use-after-frees
The buffer is already owned by the PDBFile for all of these APIs, so
don't pass it in separately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285953 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 18:28:04 +00:00
Rafael Espindola
c771cb1243 Add error handling to getEntry.
Issue found by inspection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285951 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 18:05:33 +00:00
Tom Stellard
f83a9ec554 AMDGPU/SI: Re add VIInstructions.td to unbreak bots
This file is unused as of r285939, but we need to keep it around
for bots that don't do full rebuilds.   We should be able to delete this
again in a few days.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285948 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 17:56:46 +00:00
Chandler Carruth
604dd12e78 Remove a redundant condition found by PVS-Studio.
Filed http://llvm.org/PR30897 to teach Clang to warn on this kind of
stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285945 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 17:42:02 +00:00
Rafael Espindola
d77057e7c0 Replace another report_fatal_error with an ErrorOr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285944 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 17:37:28 +00:00
Rafael Espindola
7446318ad9 Replace a report_fatal_error with an ErrorOr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285942 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 17:28:33 +00:00
Rafael Espindola
074ecc25c3 Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285940 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 17:18:31 +00:00
Tom Stellard
7c173dd5fa AMDGPU: Add VI i16 support
Patch By: Wei Ding

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285939 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 17:13:50 +00:00
Chandler Carruth
9a2d9babdc Delete some dead code and add a missing "0x" prefix to a hex string in
llvm-readobj.

Another bug caught by PVS-Studio.

It'd be nice to actually have a test for this, but I found it by
inspection from PVS-Studio.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285937 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 17:11:11 +00:00
Chandler Carruth
cad7687580 Delete a dead store found by PVS-Studio.
Quite sad we still aren't really using aggressive dead code warnings
from Clang that we could potentially use to catch this and so many other
things.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285936 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 17:01:38 +00:00
Rafael Espindola
30b32cdf45 Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285935 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 16:58:27 +00:00
Rafael Espindola
9421b70755 Add lower level versions of some functions.
This adds versions of getSectionIndex, getSection and getSymbol that
instead of a Elf_Shdr take the content of that section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285932 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 16:51:44 +00:00
Davide Italiano
8eb98effd1 Make this test Windows-only (try to placate buildbots).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285931 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 16:43:10 +00:00
Chandler Carruth
b2400000cc Fix a bug found by inspection by PVS-Studio.
This condition is trivially always true prior to the change. The comment
at the call site makes it clear that we expect *all* of these to be '=',
'S', or 'I' so fix the code.

We have a bug I will update to track the fact that Clang doesn't warn on
this: http://llvm.org/PR13101

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285930 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 16:39:25 +00:00
Rafael Espindola
e91b7e8657 Move function out of line. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285929 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 16:24:35 +00:00
Rafael Espindola
93f2b8b998 Inline function into only use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285928 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 16:10:39 +00:00
Saleem Abdulrasool
d59cd54070 vim: special case the CHECK prefix
A large number of tests in the LLVM tree use the default (CHECK) prefix
to indicate checked expressions via FileCheck.  Highlight it as a
special comment.  Although this wont get all the instances of the
checked patters, it is strictly better than the current state.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285927 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 15:56:06 +00:00
Rafael Espindola
2e9ec7b081 Return existing error code.
Should fix the -Werror bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285921 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 14:53:25 +00:00
Rafael Espindola
bd823cc949 Move a free function out of ELFFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285920 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 14:41:17 +00:00
Alexander Timofeev
d767830f39 [AMDGPU][CodeGen] To improve CGEMM performance: combine LDS reads.
hange explores the fact that LDS reads may be reordered even if access
the same location.

Prior the change, algorithm immediately stops as soon as any memory
access encountered between loads that are expected to be merged
together. Although, Read-After-Read conflict cannot affect execution
correctness.

Improves hcBLAS CGEMM manually loop-unrolled kernels performance by 44%.
Also improvement expected on any massive sequences of reads from LDS.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285919 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 14:37:13 +00:00
Zvi Rackover
d55aa1c80c Refactor creation of X86ISD::SETCC nodes to a helper function. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285917 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 14:25:24 +00:00
Nicolai Haehnle
de5ede6734 DAGCombiner: fix use-after-free when merging consecutive stores
Summary:
Have MergeConsecutiveStores explicitly return information about the stores
that were merged, so that we can safely determine whether the starting
node has been freed.

Reviewers: chandlerc, bogner, niravd

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285916 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 14:25:04 +00:00
Rafael Espindola
58c4c962e2 Split out a getSectionIndex.
That code is currently duplicated in lld.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285915 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 14:24:53 +00:00
James Molloy
6300980dd1 Revert "[Thumb] Teach ISel how to lower compares of AND bitmasks efficiently"
This reverts commit r285893. It caused (probably) http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15-full-sh/builds/83 .

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285912 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 14:08:01 +00:00
Rafael Espindola
497f2006c4 replace a report_fatal_error with a ErrorOr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285910 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 13:58:15 +00:00
John Brawn
a0e0673b0f [CMake] Make CMAKE_INSTALL_RPATH work again
r285714 made it so that when CMAKE_INSTALL_RPATH is set _install_rpath is not
set, but that means INSTALL_RPATH gets set to an empty string which isn't what
we want. Fix this by setting INSTALL_RPATH only when _install_rpath is set.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285908 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 13:55:04 +00:00
Rafael Espindola
77e7778b3e Replace a report_fatal_error with an ErrorOr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285905 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 13:43:30 +00:00
Rafael Espindola
74509075a4 Split getStringTableForSymtab.
For use in cases where we already have the section table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285903 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 13:22:51 +00:00
Rafael Espindola
fdc348bc66 Split getSHNDXTable in two.
Some clients already have the section table available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285898 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 12:23:41 +00:00
James Molloy
e03e2fa99d [Thumb] Teach ISel how to lower compares of AND bitmasks efficiently
This recommits r281323, which was backed out for two reasons. One, a selfhost failure, and two, it apparently caused Chromium failures. Actually, the latter was a red herring. The log has expired from the former, but I suspect that was a red herring too (actually caused by another problematic patch of mine). Therefore reapplying, and will watch the bots like a hawk.

For the common pattern (CMPZ (AND x, #bitmask), #0), we can do some more efficient instruction selection if the bitmask is one consecutive sequence of set bits (32 - clz(bm) - ctz(bm) == popcount(bm)).

1) If the bitmask touches the LSB, then we can remove all the upper bits and set the flags by doing one LSLS.
2) If the bitmask touches the MSB, then we can remove all the lower bits and set the flags with one LSRS.
3) If the bitmask has popcount == 1 (only one set bit), we can shift that bit into the sign bit with one LSLS and change the condition query from NE/EQ to MI/PL (we could also implement this by shifting into the carry bit and branching on BCC/BCS).
4) Otherwise, we can emit a sequence of LSLS+LSRS to remove the upper and lower zero bits of the mask.

1-3 require only one 16-bit instruction and can elide the CMP. 4 requires two 16-bit instructions but can elide the CMP and doesn't require materializing a complex immediate, so is also a win.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285893 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 10:18:20 +00:00
George Rimar
d6479398a0 [tools/obj2yaml] - Update after LLVM change r285886
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285887 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 08:41:46 +00:00
George Rimar
47d5d41c6b [Object/ELF] - Make getSymbol() return Error.
That is consistent with other methods around
and helps to handle error on a caller side.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285886 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 08:40:55 +00:00
Jonas Hahnfeld
8186cc4fdc [CMake] Disable rpath for UnitTests
This was broken since rL285714.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285881 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 06:58:16 +00:00
Craig Topper
ba1655de51 [AVX-512] Use 'vnot' instead of 'not' in patterns involving vXi1 vectors.
This fixes selection of KANDN instructions and allows us to remove an extra set of patterns for KNOT and KXNOR.

Reviewers: delena, igorb

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285878 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 06:04:28 +00:00
Elena Demikhovsky
872445f31f Expandload and Compressstore intrinsics
2 new intrinsics covering AVX-512 compress/expand functionality.
This implementation includes syntax, DAG builder, operation lowering and tests.
Does not include: handling of illegal data types, codegen prepare pass and the cost model.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285876 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 03:23:55 +00:00
Rafael Espindola
d1f0655afc Split getSection in two.
This will allow avoiding repeated error checking in a few cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285874 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 02:24:59 +00:00
Teresa Johnson
6e15e36dae [ThinLTO] Handle distributed backend case when doing renaming
Summary:
The recent change I made to consult the summary when deciding whether to
rename (to handle inline asm) in r285513 broke the distributed build
case. In a distributed backend we will only have a portion of the
combined index, specifically for imported modules we only have the
summaries for any imported definitions. When renaming on import we were
asserting because no summary entry was found for a local reference being
linked in (def wasn't imported).

We only need to consult the summary for a renaming decision for the
exporting module. For imports, we would have prevented importing any
references to NoRename values already.

Reviewers: mehdi_amini

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285871 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-03 01:07:16 +00:00
Greg Bedwell
2ad749ea5e Revert "[InstCombine] allow splat vector folds in adjustMinMax()"
This reverts commit r285732.

This change introduced a new assertion failure in the following
testcase at -O2:

typedef short __v8hi __attribute__((__vector_size__(16)));
__v8hi foo(__v8hi &V1, __v8hi &V2, unsigned mask) {
  __v8hi Result = V1;
  if (mask & 0x80)
    Result[0] = V2[0];
  return Result;
}

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285866 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-02 23:17:05 +00:00
Rafael Espindola
a9558ab982 Simplify some typedefs. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285863 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-02 21:39:02 +00:00
Adrian McCarthy
39374062b1 Emit S_COMPILE3 record once per TU rather than once per function
This has some ripple effects in several tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285862 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-02 21:30:35 +00:00
Kevin Enderby
4b3270e0a7 Add the rest of the additional error checks for invalid Mach-O files when
the offsets and sizes of an element of the Mach-O file overlaps with
another element in the Mach-O file.

Some other tests for malformed Mach-O files now run into these
checks so their tests were also adjusted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285860 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-02 21:08:39 +00:00
Davide Italiano
fade6c26a0 [RuntimeDyld] Move an X86 only test to the correct directory.
This is an attempt to placate the bots after r285841.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285859 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-02 21:05:42 +00:00
Eli Friedman
a7bfb15b26 DCE math library calls with a constant operand.
On platforms which use -fmath-errno, math libcalls without any uses
require some extra checks to figure out if they are actually dead.

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

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285857 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-02 20:48:11 +00:00
Vedant Kumar
f13ebed41c [llvm-cov] Turn line numbers in html reports into clickable links
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285853 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-02 19:44:13 +00:00
Krzysztof Parzyszek
b051050ad1 [Hexagon] Remove registers coalesced in expand-condsets from live intervals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285846 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-02 17:59:54 +00:00
Artem Tamazov
714be8be1c [AMDGPU][mc] Improve test of special asm symbols.
Test simplified. Coverage extended.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285844 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-02 17:45:58 +00:00