Commit Graph

250131 Commits

Author SHA1 Message Date
Craig Topper 1fd4196337 [X86] When recognizing vector loads or VZEXT_LOAD in selectScalarSSELoad make sure we pass the load's user rather than load itself to the second operand of IsLegalToFold.
llvm-svn: 290089
2016-12-19 08:35:56 +00:00
Craig Topper 04bd11ec4d [TableGen] Use 'unsigned' instead of 'bool' in a place where the code conditionally assigns numeric values. They happen to be 0 and 1 so this is NFC.
llvm-svn: 290088
2016-12-19 08:35:08 +00:00
Daniel Jasper f5123fecfe Add files I seem to have dropped in my revert (r290086).
Sorry!

llvm-svn: 290087
2016-12-19 08:32:13 +00:00
Daniel Jasper aec2fa352f Revert @llvm.assume with operator bundles (r289755-r289757)
This creates non-linear behavior in the inliner (see more details in
r289755's commit thread).

llvm-svn: 290086
2016-12-19 08:22:17 +00:00
Daniel Jasper e5f3eba9c3 Fix format after recent clang-format change.
llvm-svn: 290085
2016-12-19 07:54:15 +00:00
Daniel Jasper e6169665ec clang-format: Allow "single column" list layout even if that violates the
column limit.

Single-column layout basically means that we format the list with one
element per line. Not doing that when there is a column limit violation
doesn't change the fact that there is an item that doesn't fit within
the column limit.

Before (with a column limit of 30):
  std::vector<int> a = {
      aaaaaaaa, aaaaaaaa,
      aaaaaaaa, aaaaaaaa,
      aaaaaaaaaa, aaaaaaaa,
      aaaaaaaaaaaaaaaaaaaaaaaaaaa};

After:
  std::vector<int> a = {
      aaaaaaaa,
      aaaaaaaa,
      aaaaaaaa,
      aaaaaaaa,
      aaaaaaaaaa,
      aaaaaaaa,
      aaaaaaaaaaaaaaaaaaaaaaaaaaa};

(and previously we would have formatted like "After" it wasn't for the one
item that is too long)

llvm-svn: 290084
2016-12-19 07:26:11 +00:00
Dean Michael Berris 2cc7fc2cc6 [XRay][compiler-rt] Fix missing include of <cerrno>
Futher attempt to un-break ARM and AArch64 build.

Follow-up on D25360.

llvm-svn: 290083
2016-12-19 05:26:14 +00:00
Richard Smith dbe74e0ccd Add __cpp_structured_bindings feature test macro for structured bindings, per
latest (provisional) draft of SD-6.

llvm-svn: 290082
2016-12-19 04:21:36 +00:00
Richard Smith cb0ccb08ee [c++1z] cxx_status: mark p0195r2 as done.
llvm-svn: 290081
2016-12-19 04:16:03 +00:00
Richard Smith 22a250cd5d [c++1z] P0195R2: Support pack-expansion of using-declarations.
This change introduces UsingPackDecl as a marker for the set of UsingDecls
produced by pack expansion of a single (unresolved) using declaration. This is
not strictly necessary (we just need to be able to map from the original using
declaration to its expansions somehow), but it's useful to maintain the
invariant that each declaration reference instantiates to refer to one
declaration.

llvm-svn: 290080
2016-12-19 04:08:53 +00:00
Dean Michael Berris 6f16e2c456 [XRay][compiler-rt] Post-commit review fixup of XRay refactoring.
Missed a couple of files:

- Using #pragma once
- Missing top-matter for headers
- Missing an include for <cstdint>

Follow-up on D25360.

llvm-svn: 290079
2016-12-19 03:59:20 +00:00
Dean Michael Berris 4527ebecb6 [XRay][compiler-rt] Explicitly include <cstdint> for types
This is an attempt to un-break the ARM7, AArch64 builds.

Follow-up on D25360.

llvm-svn: 290078
2016-12-19 03:47:35 +00:00
Dean Michael Berris 094173ba2c [XRay] [compiler-rt] Move machine-dependent code into machine-dependent files.
Summary: Include the necessary headers while there.

Reviewers: dberris

Subscribers: llvm-commits

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

llvm-svn: 290077
2016-12-19 03:21:26 +00:00
Rui Ueyama 8f687f71fb Remove inappropriate use of CachedHashStringRef.
Use of CachedHashStringRef makes sense only when we reuse hash values.
Sprinkling it to all DenseMap has no benefits and just complicates data types.
Basically we shouldn't use CachedHashStringRef unless there is a strong
reason to to do so.

llvm-svn: 290076
2016-12-19 03:14:16 +00:00
Yaxun Liu adb58e7598 Add a lit test for PR31374
Differential Revision: https://reviews.llvm.org/D27909

llvm-svn: 290075
2016-12-19 02:55:53 +00:00
Dean Michael Berris a53217d185 [XRay] [compiler-rt] Fix format string; sanitizers' internal printf() doesn't support %ld.
Summary:
Getting rid of the distance number altogether because:
- a person knowledgeable enough to know what the message means will also
  know how to do hexadecimal math (with the help of a calculator)
- numbers outside INT_MIN - INT_MAX are hard to comprehend anyway

This unbreaks the case when you dynamically link a library with XRay and
it exits pre-main() with a not very informative static string.

Author: pelikan

Reviewers: dberris

Subscribers: llvm-commits, mehdi_amini

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

llvm-svn: 290074
2016-12-19 00:47:40 +00:00
Craig Topper 375aa90291 [X86] Remove all of the patterns that use X86ISD:FAND/FXOR/FOR/FANDN except for the ones needed for SSE1. Anything SSE2 or above uses the integer ISD opcode.
This removes 11721 bytes from the DAG isel table or 2.2%

llvm-svn: 290073
2016-12-19 00:42:28 +00:00
Richard Smith 4eeaec46f7 Fix name hiding and redeclaration checking for dependent local
using-declarations.

llvm-svn: 290072
2016-12-18 22:01:46 +00:00
Richard Smith d8a9e37558 Fix some interactions between C++11 and C++14 features and using-declarations:
* a dependent non-type using-declaration within a function template can be
   valid, as it can refer to an enumerator, so don't reject it in the template
   definition
 * we can partially substitute into a dependent using-declaration if it appears
   within a (local class in a) generic lambda within a function template, which
   means an UnresolvedUsing*Decl doesn't necessarily instantiate to a UsingDecl.

llvm-svn: 290071
2016-12-18 21:39:37 +00:00
Tom de Vries 601d5bafb2 [FileCheck] Fix --strict-whitespace --match-full-lines -- add test-case
Add test-case that was missing in "[FileCheck] Fix --strict-whitespace
--match-full-lines" commit.

llvm-svn: 290070
2016-12-18 21:04:47 +00:00
Tom de Vries 1714676ae0 [FileCheck] Fix --strict-whitespace --match-full-lines
Make sure FileCheck --strict-whitespace --match-full-lines translates
'CHECK: bla ' into pattern '^ bla $' instead of pattern '^bla$'.

llvm-svn: 290069
2016-12-18 20:45:59 +00:00
David Majnemer b7477b540e [PDB] Don't use the long type
Long is not the same size across a number of the platforms we support.
Use unsigned int here instead, it is more appropriate because
overflow/wrap-around is possible and, in this case, expected.

llvm-svn: 290068
2016-12-18 20:10:50 +00:00
Sanjay Patel 2b9d4b4daf [InstCombine] use commutative matchers for patterns with commutative operators
Background/motivation - I was circling back around to:
https://llvm.org/bugs/show_bug.cgi?id=28296

I made a simple patch for that and noticed some regressions, so added test cases for
those with rL281055, and this is hopefully the minimal fix for just those cases.

But as you can see from the surrounding untouched folds, we are missing commuted patterns
all over the place, and of course there are no regression tests to cover any of those cases.

We could sprinkle "m_c_" dust all over this file and catch most of the missing folds, but 
then we still wouldn't have test coverage, and we'd still miss some fraction of commuted 
patterns because they require adjustments to the match order.

I'm aware of the concern about the potential compile-time performance impact of adding 
matches like this (currently being discussed on llvm-dev), but I don't think there's any
evidence yet to suggest that handling commutative pattern matching more thoroughly is not
a worthwhile goal of InstCombine.

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

llvm-svn: 290067
2016-12-18 18:49:48 +00:00
Daniel Jasper 373f9a6a0c Revert r289955 and r289962. This is causing lots of ASAN failures for us.
Not sure whether it causes and ASAN false positive or whether it
actually leads to incorrect code or whether it even exposes bad code.
Hans, I'll get you instructions to reproduce this.

llvm-svn: 290066
2016-12-18 14:36:38 +00:00
Michael Zuckerman 4b88a770ef [X86] [AVX512] Minor fix in encoding of scalar EVEX instructions. NFC.
Commit on behalf of Gadi Haber  

Removed EVEX_V512 prefix from scalar EVEX instructions since HW ignores L'L bits anyway (LIG). 4 instructions are modified.
The changed encodings are validated with XED.
Rviewers: delena, igorb

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

llvm-svn: 290065
2016-12-18 14:29:00 +00:00
Simon Pilgrim e940daf532 [X86][SSE] Add support for combining target shuffles to SHUFPS.
As discussed on D27692, the next step will be to allow cross-domain shuffles once the combined shuffle depth passes a certain point.

llvm-svn: 290064
2016-12-18 14:26:02 +00:00
Simon Pilgrim ccfbf384ba Wdocumentation fix
llvm-svn: 290063
2016-12-18 14:12:38 +00:00
Rui Ueyama 9381eb1045 Remove lld/Support/Memory.h.
I thought for a while about how to remove it, but it looks like we
can just copy the file for now. Of course I'm not happy about that,
but it's just less than 50 lines of code, and we already have
duplicate code in Error.h and some other places. I want to solve
them all at once later.

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

llvm-svn: 290062
2016-12-18 14:06:06 +00:00
Tom de Vries a26bc91456 [FileCheck] Fix comment in ReadCheckFile
The comment in ReadCheckFile claims that both leading and trailing whitespace
are removed, but the associated statement only removes leading whitespace.

llvm-svn: 290061
2016-12-18 09:41:20 +00:00
Craig Topper 7029db0eaa [X86][SSE][AVX-512] Convert FAND/FOR/FXOR/FANDN nodes to integer operations if they are available. This will allow a bunch of patterns to be removed.
These nodes are only emitted for lowering FABS/FNEG/FNABS/FCOPYSIGN. Ideally we just wouldn't create these nodes if SSE2 or higher is available, but it was simple to just convert them in DAG combine.

For SSE2, AVX, and AVX512 with DQI this is no functional change as the execution domain fixing pass ensures the right domain is selected regardless of the ISD opcode.

For AVX-512 without DQI we end up using integer instructions since the floating point versions aren't available. But we were already doing that for any logical operations in code that didn't come from FABS/FNEG/FNABS/FCOPYSIGN so this seems no worse. And we get the benefit of being able to fold broadcasts now.

llvm-svn: 290060
2016-12-18 07:54:23 +00:00
Yaxun Liu c9318c6cf2 Fix a lit test issue exposed by r290056
The test requests a target which supports cl_khr_gl_msaa_sharing since in test/PCH/ocl_types.h
it tries to enable cl_khr_gl_msaa_sharing. Therefore this test fails on targets not supporting
cl_khr_gl_msaa_sharing, e.g. ppc64, etc.

The fix is to add triple spir-unknown-unknown which supports cl_khr_gl_msaa_sharing.

llvm-svn: 290059
2016-12-18 07:26:01 +00:00
Yaxun Liu cc2741ce85 Attempt to fix build failure and regressions due to r290056
Add llvm:: namespace to StringRef.
Make conversion between bool and uint64_t explicit.

llvm-svn: 290058
2016-12-18 06:35:06 +00:00
Craig Topper add9cc697a [AVX-512] Use EVEX encoded XOR instruction for zeroing scalar registers when DQI and VLX instructions are available.
This can give the register allocator more registers to use.

llvm-svn: 290057
2016-12-18 06:23:14 +00:00
Yaxun Liu 5b74665a41 Recommit r289979 [OpenCL] Allow disabling types and declarations associated with extensions
Fixed undefined behavior due to cast integer to bool in initializer list.

llvm-svn: 290056
2016-12-18 05:18:55 +00:00
Craig Topper 2baef8f466 [AVX-512] Make sure VLX is also enabled before using EVEX encoded logic ops for scalars. I missed this in r290049.
llvm-svn: 290055
2016-12-18 04:17:00 +00:00
David Majnemer 1d3dcb0602 [PDB] Don't reimplement CRC32
We already have a CRC32 implementation which is compatible with the PDB
hash, reuse it.

llvm-svn: 290054
2016-12-18 00:41:15 +00:00
David Majnemer 9bca03bf81 [PDB] Validate superblock addresses
- Validate the address of the block map.
- Validate the address of the free block map.

llvm-svn: 290053
2016-12-18 00:41:10 +00:00
Chris Bieneman ca7d19e595 [CMake] Fix issue reported on sanitizer bots
This should resolve an issue reported on the commit thread that impacted sanitizer bots.

llvm-svn: 290052
2016-12-17 21:28:24 +00:00
Malcolm Parsons 79578cc936 [clang-tidy] Remove duplicated check from move-constructor-init
Summary:
An addition to the move-constructor-init check was duplicating the
modernize-pass-by-value check.
Remove the additional check and UseCERTSemantics option.
Run the move-constructor-init test with both checks enabled.
Fix modernize-pass-by-value false-positive when initializing a base
class.
Add option to modernize-pass-by-value to only warn about parameters
that are already values.

Reviewers: alexfh, flx, aaron.ballman

Subscribers: cfe-commits

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

llvm-svn: 290051
2016-12-17 20:23:14 +00:00
Matt Arsenault 3aaf11fbd4 AMDGPU: Fix broken check prefix in test
llvm-svn: 290050
2016-12-17 20:03:59 +00:00
Craig Topper d3295c6a3a [AVX-512] Use EVEX encoded logic operations for scalar types when they are available. This gives the register allocator more registers to work with.
llvm-svn: 290049
2016-12-17 19:26:00 +00:00
Craig Topper 81b021e7c0 [AVX-512] Update scalar logic test to show missed opportunity to use EVEX encoded logic instructions to get more registers to use.
llvm-svn: 290048
2016-12-17 19:25:55 +00:00
Matthias Braun 15b56e6973 Revert "AArch64CollectLOH: Rewrite as block-local analysis."
It is still breaking Chrome. http://llvm.org/PR31361

This reverts commit r290026.

llvm-svn: 290047
2016-12-17 18:53:11 +00:00
Craig Topper e32b5fd7f9 [InstCombine] Simplify code slightly. NFC
llvm-svn: 290046
2016-12-17 18:10:04 +00:00
Sylvestre Ledru 521d7b45ba Fix the cmake declaration syntax
llvm-svn: 290045
2016-12-17 13:04:35 +00:00
Sylvestre Ledru 47b071deff Support of lldb on Kfreebsd
Summary: Patch by Pino Toscano. Reported in http://bugs.debian.org/835665

Reviewers: tfiala, emaste

Subscribers: beanz, mgorny, emaste, krytarowski, brucem, tberghammer, danalbert, srhines, #lldb

Tags: #lldb

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

llvm-svn: 290044
2016-12-17 12:48:06 +00:00
Daniel Jasper fa1030e40b Revert "[libFuzzer] add an experimental flag -experimental_len_control=1 that sets max_len to 1M and tries to increases the actual max sizes of mutations very gradually. Also remove a bit of dead code"
This reverts commit r289998.

See comment:
https://reviews.llvm.org/rL289998

llvm-svn: 290043
2016-12-17 12:27:49 +00:00
George Rimar 607fa711b2 [ELF] - Use DWARFDebugPubTable parser class intead of hand-written parsing.
DWARFDebugPubTable was introduced recently and allows us to get rid of
code duplication in LLD.

llvm-svn: 290042
2016-12-17 10:18:05 +00:00
George Rimar 83e0dbcaad [DWARF] - Make PubIndexEntryDescriptor::toBits() to be const.
That is usefull when iterating over entries of new DWARFDebugPubTable class
via DWARFDebugPubTable::getData which returns ArrayRef.

llvm-svn: 290041
2016-12-17 10:15:39 +00:00
George Rimar e71e33fe93 [DWARF] - Introduce DWARFDebugPubTable class for dumping pub* sections.
Patch implements parser of pubnames/pubtypes tables instead of static 
function used before. It is now should be possible to reuse it
in LLD or other projects and clean up the duplication code.

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

llvm-svn: 290040
2016-12-17 09:10:32 +00:00