Commit Graph

244178 Commits

Author SHA1 Message Date
Eric Fiselier ac473034fc Provide a constexpr addressof with GCC 7.
__builtin_addressof was added to the GCC trunk in the past week. This patch
teaches libc++ about it so it can correctly provide constexpr addressof.

Unfortunately this patch will break users of earlier GCC 7 builds, since
we expect __builtin_addressof but one won't be provided. One option would be
to only use __builtin_addressof for GCC 7.1 and above, but that means
waiting for another release.

Instead I've specifically chosen to break older GCC 7 versions. Since GCC 7
has yet to be released, and the 7.0 release is a development release, I
believe that anybody currently using GCC 7.0 will have no issue upgrading.

llvm-svn: 283715
2016-10-10 05:34:18 +00:00
Eric Fiselier 99b81a59fb Workaround missing C++14 constexpr semantics in filesystem
llvm-svn: 283714
2016-10-10 05:19:59 +00:00
Eric Fiselier a52ce7fd03 Remove use of int128_t inside the filesystem implementation
llvm-svn: 283712
2016-10-10 04:22:58 +00:00
Dylan McKay 1a523767dc [AVR] Enable generation of the TableGen assembly writer tables
This also changes the order of the statements in CMakeLists.txt to be
alphabetical.

llvm-svn: 283711
2016-10-10 01:28:45 +00:00
Brian Gesiak 11c48475c4 [lit] Remove (or allow specific) unused imports
Summary:
Using Python linter flake8 on the utils/lit reveals several linter
warnings designated "F401: Unused import". Fix or silence these
warnings.

Some of these unused imports are legitimate, while some are part of lit's API.
For example, users of lit expect to be able to access `lit.formats.ShTest` in
their `lit.cfg`, despite the module hierarchy for that symbol actually being
`lit.formats.shtest.ShTest`. To silence linter errors for these lines,
include a "noqa" directive.

Reviewers: echristo, delcypher, beanz, ddunbar

Subscribers: mehdi_amini, llvm-commits

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

llvm-svn: 283710
2016-10-10 01:22:06 +00:00
Brian Gesiak 3a0f79fb19 [lit] Remove unused TestingProgressDisplay attr
Summary:
`TestingProgressDisplay` initializes its `current` attribute to `None`, but
never reads or writes the value again. Remove it.

Reviewers: echristo, delcypher, beanz, ddunbar

Subscribers: llvm-commits, mehdi_amini

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

llvm-svn: 283709
2016-10-10 01:20:43 +00:00
Brian Gesiak b25861c31e [lit] Fix undefined symbol ArgumentError
Summary:
`ArgumentError` is not defined by the Python standard library.
Executing this line of code would throw a exception, but not the
intended one. It would throw a `NameError` exception, since `ArgumentError`
is undefined.

Use `ValueError` instead, which is defined by the Python standard
library.

Reviewers: echristo, delcypher, beanz, ddunbar

Subscribers: llvm-commits, mehdi_amini

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

llvm-svn: 283708
2016-10-10 01:19:27 +00:00
Brian Gesiak f35afa2cfc [lit] Remove semicolons in Python code
Summary:
Semicolons aren't necessary as statement terminators in Python, and
each of these uses are superfluous as they appear at the end of a line.
The convention is to not use semicolons where not needed, so remove them.

Reviewers: echristo, delcypher, beanz, ddunbar

Subscribers: llvm-commits, mehdi_amini

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

llvm-svn: 283707
2016-10-10 01:18:14 +00:00
Brian Gesiak e35cf5deb8 [lit] Remove unused variable in googletest format
Summary: `prefix` is written to but never read.

Reviewers: echristo, delcypher, beanz, ddunbar

Subscribers: llvm-commits, mehdi_amini

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

llvm-svn: 283706
2016-10-10 01:15:33 +00:00
Brian Gesiak ea76cdb22e [lit] Remove Python 2.6 and below exec workaround
Summary:
The minimum version of Python required to run LLVM's test suite is 2.7.
Remove a workaround for older Python versions.

Reviewers: echristo, delcypher, beanz, ddunbar

Subscribers: llvm-commits, mehdi_amini

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

llvm-svn: 283705
2016-10-10 01:11:52 +00:00
Craig Topper 64378f4378 [AVX-512] Port 128 and 256-bit memory->register sign/zero extend patterns from SSE file. Also add a minimal set for 512-bit.
llvm-svn: 283704
2016-10-09 23:08:39 +00:00
Craig Topper 29558b8284 [X86] Remove redundant patterns. The same pattern appears a few lines up.
llvm-svn: 283703
2016-10-09 23:08:33 +00:00
Mehdi Amini f42454b94b Move the global variables representing each Target behind accessor function
This avoids "static initialization order fiasco"

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

llvm-svn: 283702
2016-10-09 23:00:34 +00:00
Eric Fiselier 6912539717 Remove debug output from gen_linker_script.py
llvm-svn: 283701
2016-10-09 21:43:30 +00:00
Eric Fiselier 054fc4cef6 Fix linker script generation for in-tree builds
llvm-svn: 283700
2016-10-09 21:34:03 +00:00
Eric Fiselier fc1b0d5c24 [libc++abi] Fix bug which cased the static libunwind to always be chosen
llvm-svn: 283699
2016-10-09 20:44:48 +00:00
Eric Fiselier 0d42e158b1 [CMake] Correct configuration order of the sub-projects based on ther dependancies
llvm-svn: 283698
2016-10-09 20:38:29 +00:00
Davide Italiano aedafd411a [llvm-link] Fix description of -disable-lazy-loading option
Patch by Will Dietz!

llvm-svn: 283697
2016-10-09 17:15:04 +00:00
Zvi Rackover b764bf2987 [X86] Adding the 'nounwind' attribute to test functions for cleaner generated code
Thanks to RKSimon for the suggestion.

llvm-svn: 283696
2016-10-09 13:33:51 +00:00
Zvi Rackover f841080caf [X86] Improve the rotate ISel test
Summary:
- Added 64-bit target testing.
- Added 64-bit operand test cases.
- Added cases that demonstrate pr30644

Reviewers: RKSimon, craig.topper, igorb

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

llvm-svn: 283695
2016-10-09 13:07:25 +00:00
Elena Demikhovsky 5b10aa1f1e DAG: Setting Masked-Expand-Load as a variant of Masked-Load node
Masked-expand-load node represents load operation that loads a variable amount of elements from memory according to amount of "true" bits in the mask and expands the loaded elements according to their position in the mask vector.
Right now, the node is used in intrinsics for VEXPAND* instructions. 
The work is done towards implementation of masked.expandload and masked.compressstore intrinsics.

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

llvm-svn: 283694
2016-10-09 10:48:52 +00:00
Tobias Grosser b270288752 Fix formatting after recent cl:: changes
This fixes 'make check-polly'

llvm-svn: 283693
2016-10-09 08:31:35 +00:00
Craig Topper 43973154dd [AVX-512] Fix execution domain for EVEX encoded VINSERTPS.
llvm-svn: 283692
2016-10-09 06:41:47 +00:00
Peter Collingbourne cc723cccab MC: Remove unused entities.
llvm-svn: 283691
2016-10-09 04:39:13 +00:00
Peter Collingbourne 5c924d7117 Target: Remove unused entities.
llvm-svn: 283690
2016-10-09 04:38:57 +00:00
Craig Topper e30cb00dc0 [AVX-512] Add subvector insert and extract to load/store folding tables.
llvm-svn: 283689
2016-10-09 03:54:13 +00:00
Craig Topper 50a468e03f [AVX-512] Add avx512dq to the fp stack folding test.
llvm-svn: 283688
2016-10-09 03:54:09 +00:00
Craig Topper 4262d53024 [AVX-512] Add the vector down convert instructions to the store folding tables.
llvm-svn: 283687
2016-10-09 03:54:05 +00:00
Kostya Serebryany 7abb95d3b3 [libFuzzer] make a test less flaky
llvm-svn: 283686
2016-10-09 03:45:38 +00:00
Hal Finkel 60ebf61274 When optimizing for size, enable loop rerolling by default
We have a loop-rerolling optimization which can be enabled by using
-freroll-loops. While sometimes loops are hand-unrolled for performance
reasons, when optimizing for size, we should always undo this manual
optimization to produce smaller code (our optimizer's unroller will still
unroll the rerolled loops if it thinks that is a good idea).

llvm-svn: 283685
2016-10-09 03:06:31 +00:00
Hal Finkel 5b5f4f0c74 [CMake] Fix in-tree libcxxabi build support after r283659
r283659 changed the argument to gen_link_script.py from SCRIPT_ABI_LIBNAME to
LIBCXX_LIBRARIES_PUBLIC, assuming that all of the items in the
LIBCXX_LIBRARIES_PUBLIC list were library names. This is not right, however,
for in-tree libcxxabi builds, we might have the target name in this list. There
was special logic to fixup SCRIPT_ABI_LIBNAME for this situation; change it to
apply a similar fixup for LIBCXX_LIBRARIES_PUBLIC.

llvm-svn: 283684
2016-10-09 02:49:31 +00:00
Justin Lebar 3b593f56fc [CUDA] Don't install cuda_wrappers/{algorithm,complex} into the main include dir.
This is obviously wrong -- if we do this, then all compiles will pick up
these wrappers, which is not what we want.

llvm-svn: 283683
2016-10-09 00:27:39 +00:00
Kostya Serebryany c5325ed29d [libFuzzer] when shrinking the corpus, delete evicted files previously created by the current process
llvm-svn: 283682
2016-10-08 23:24:45 +00:00
Mehdi Amini 8ec7b4f588 ThinLTO: Fix Gold test after caching fix in r283655
(I don't have Gold available, so this is speculative)

llvm-svn: 283681
2016-10-08 22:49:28 +00:00
Justin Lebar d3c5d2a4de [CUDA] Support <complex> and std::min/max on the device.
Summary:
We do this by wrapping <complex> and <algorithm>.

Tests are in the test-suite.

Reviewers: tra

Subscribers: jhen, beanz, cfe-commits, mgorny

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

llvm-svn: 283680
2016-10-08 22:16:12 +00:00
Justin Lebar 2dfbe9a3b4 [CUDA] Rename cuda_builtin_vars.h to __clang_cuda_builtin_vars.h.
Summary: This matches the idiom we use for our other CUDA wrapper headers.

Reviewers: tra

Subscribers: beanz, mgorny, cfe-commits

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

llvm-svn: 283679
2016-10-08 22:16:08 +00:00
Justin Lebar e9eb792a0f [CUDA] Declare our __device__ math functions in the same inline namespace as our standard library.
Summary:
Currently we declare our inline __device__ math functions in namespace
std.  But libstdc++ and libc++ declare these functions in an inline
namespace inside namespace std.  We need to match this because, in a
later patch, we want to get e.g. <complex> to use our device overloads,
and it only will if those overloads are in the right inline namespace.

Reviewers: tra

Subscribers: cfe-commits, jhen

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

llvm-svn: 283678
2016-10-08 22:16:03 +00:00
Justin Lebar 67a78a6cc0 [CUDA] Add #pragma clang force_cuda_host_device_{begin,end} pragmas.
Summary:
These cause us to consider all functions in-between to be __host__
__device__.

You can nest these pragmas; you just can't have more 'end's than
'begin's.

Reviewers: rsmith

Subscribers: tra, jhen, cfe-commits

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

llvm-svn: 283677
2016-10-08 22:15:58 +00:00
Kostya Serebryany 9adc7c8b4a [libFuzzer] control the reload interval by a flag, make it 10 seconds by default
llvm-svn: 283676
2016-10-08 22:12:14 +00:00
Kostya Serebryany cd04ec25dd [libFuzzer] fix use-after-free in libFuzzer found by ... fuzzing.
llvm-svn: 283675
2016-10-08 21:57:48 +00:00
Simon Pilgrim 319c094771 [X86][SSE] Regenerate select tests
llvm-svn: 283674
2016-10-08 21:17:44 +00:00
Zvi Rackover ce4900aaa6 Revert "[X86] Apply the Update LLC Test Checks tool on the rotate tests."
This reverts commit 283667.

llvm-svn: 283673
2016-10-08 20:54:20 +00:00
Simon Pilgrim 9e7a22fc13 [X86][SSE] Regenerate and add 32-bit tests to widening tests
llvm-svn: 283672
2016-10-08 19:54:28 +00:00
Mehdi Amini 732afdd09a Turn cl::values() (for enum) from a vararg function to using C++ variadic template
The core of the change is supposed to be NFC, however it also fixes
what I believe was an undefined behavior when calling:

 va_start(ValueArgs, Desc);

with Desc being a StringRef.

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

llvm-svn: 283671
2016-10-08 19:41:06 +00:00
Simon Pilgrim 30cbd1ab84 Fix comment typos - full update script path in assertions note
llvm-svn: 283670
2016-10-08 18:51:55 +00:00
Craig Topper 2067142d7d [AVX-512] Add test case for PR30430 that I should have added in r281959.
llvm-svn: 283669
2016-10-08 18:50:00 +00:00
Craig Topper 086f0c1401 [AVX-512] Fix a bug in getLargestLegalSuperClass where we inflated to VR128X/VR256X even when VLX isn't supported.
This seems to have been responsible for the XMM16-31 spills observed in PR29112. With this fixed the test case has been modified to no longer have a spill of XMM16.

llvm-svn: 283668
2016-10-08 18:49:57 +00:00
Zvi Rackover 2413d475fc [X86] Apply the Update LLC Test Checks tool on the rotate tests.
Also added cases demonstrating pr30644.

llvm-svn: 283667
2016-10-08 18:44:47 +00:00
Simon Pilgrim d0d90fb9b2 [X86][AVX2] Regenerate and add 32-bit tests to core tests
llvm-svn: 283666
2016-10-08 18:36:57 +00:00
Colin LeMahieu c69f7ff6c0 [Hexagon] Adding change of flow max 1 (cofMax1) TS flag for marking this restriction rather than implying it from TypeJR.
llvm-svn: 283665
2016-10-08 17:18:51 +00:00