Commit Graph

63886 Commits

Author SHA1 Message Date
Jacob Baungard Hansen 13a4937404 [Sparc] Add software float option -msoft-float
Summary:
Following patch D19265 which enable software floating point support in the Sparc backend, this patch enables the option to be enabled in the front-end using the -msoft-float option.

The user should ensure a library (such as the builtins from Compiler-RT) that includes the software floating point routines is provided.

Reviewers: jyknight, lero_chris

Subscribers: jyknight, cfe-commits

Differential Revision: http://reviews.llvm.org/D20419

llvm-svn: 270538
2016-05-24 08:30:08 +00:00
Alexey Bataev 9afe57541e [OPENMP] Fixed codegen for firstprivate vars in standalone worksharing
directives.

If firstprivate variable is is captured by value in outlined region and then used as firstprivate variable in inner worksharing directive, the copy for this firstprivate variable was not created. Fixed this bug.

llvm-svn: 270536
2016-05-24 07:40:12 +00:00
Dmitry Polukhin 6194d9f5d8 [MSVC2015] dllexport for defaulted special class members
Clang doesn't dllexport defaulted special member function defaulted
inside class but does it if they defaulted outside class. MSVC doesn't
make any distinction where they were defaulted. Also MSVC 2013 and 2015
export different set of members. MSVC2015 doesn't emit trivial defaulted
x-tors but does emit copy assign operator.

Differential revision: http://reviews.llvm.org/D20422

llvm-svn: 270535
2016-05-24 06:37:14 +00:00
Saleem Abdulrasool 09d305fb6c CodeGen: indicate to the backend the exception model
Thread through -fsjlj-exceptions to the backend via the TargetOptions.  This is
in preparation for supporting SjLj exceptions on x86 (e.g. for MinGW).

llvm-svn: 270528
2016-05-24 03:21:01 +00:00
Mike Spertus 819fb787ce Visualize ellipses in TemplateTypeParm and TemplateTypeParmDecl
Now a TemplateTypeParm will be visualized as typename ...T if it is a pack

llvm-svn: 270521
2016-05-24 01:47:41 +00:00
Saleem Abdulrasool ec988b76cc clang-c: de-anonymize structure declaration
The statement constructed an anonymous structure which was typedefed.  The
anonymous structure has internal linkage, and that would cause an error when
building with modules.  Give the type declaration a tag name to address the
error when building with modules.

llvm-svn: 270520
2016-05-24 01:23:24 +00:00
Richard Smith 22e7cc6a32 Properly track the found declaration (possibly a using-declaration) when
handling an explicit member specialization.

llvm-svn: 270514
2016-05-24 00:01:49 +00:00
Mike Spertus 64aa76d9ca Visualizer for Pack template arguments
llvm-svn: 270505
2016-05-23 22:27:44 +00:00
Simon Pilgrim 90770c7c76 [X86][SSE] Replace lossless i32/f32 to f64 conversion intrinsics with generic IR
Both the (V)CVTDQ2PD(Y) (i32 to f64) and (V)CVTPS2PD(Y) (f32 to f64) conversion instructions are lossless and can be safely represented as generic __builtin_convertvector calls instead of x86 intrinsics without affecting final codegen.

This patch removes the clang builtins and their use in the sse2/avx headers - a future patch will deal with removing the llvm intrinsics, but that will require a bit more work.

Differential Revision: http://reviews.llvm.org/D20528

llvm-svn: 270499
2016-05-23 22:13:02 +00:00
Justin Lebar 91f6f07bb8 [CUDA] Add -fcuda-approx-transcendentals flag.
Summary:
This lets us emit e.g. sin.approx.f32.  See
http://docs.nvidia.com/cuda/parallel-thread-execution/#floating-point-instructions-sin

Reviewers: rnk

Subscribers: tra, cfe-commits

Differential Revision: http://reviews.llvm.org/D20493

llvm-svn: 270484
2016-05-23 20:19:56 +00:00
Richard Smith cc1b82be17 Fix filtering of prior declarations when checking for a tag redeclaration to
map to the redecl context for both decls, not just one of them, and to properly
check that the decl contexts are equivalent.

llvm-svn: 270482
2016-05-23 20:03:04 +00:00
David Majnemer 7eca8a3d41 Address post-commit review feedback to r270457
Add two tests which show our error handling behavior for invalid
parameters in the layout_version and empty_bases attributes.

Amend our documentation to make it more clear that
__declspec(empty_bases) and __declspec(layout_version) can only apply to
classes, structs, and unions.

llvm-svn: 270461
2016-05-23 17:32:35 +00:00
David Majnemer b3d96882ec Clang support for __is_assignable intrinsic
MSVC now supports the __is_assignable type trait intrinsic,
to enable easier and more efficient implementation of the
Standard Library's is_assignable trait.
As of Visual Studio 2015 Update 3, the VC Standard Library
implementation uses the new intrinsic unconditionally.

The implementation is pretty straightforward due to the previously
existing is_nothrow_assignable and is_trivially_assignable.
We handle __is_assignable via the same code as the other two except
that we skip the extra checks for nothrow or triviality.

Patch by Dave Bartolomeo!

Differential Revision: http://reviews.llvm.org/D20492

llvm-svn: 270458
2016-05-23 17:21:55 +00:00
David Majnemer cd3ebfe293 [MS ABI] Implement __declspec(empty_bases) and __declspec(layout_version)
The layout_version attribute is pretty straightforward: use the layout
rules from version XYZ of MSVC when used like
struct __declspec(layout_version(XYZ)) S {};

The empty_bases attribute is more interesting.  It tries to get the C++
empty base optimization to fire more often by tweaking the MSVC ABI
rules in subtle ways:
1. Disable the leading and trailing zero-sized object flags if a class
   is marked __declspec(empty_bases) and is empty.

   This means that given:
   struct __declspec(empty_bases) A {};
   struct __declspec(empty_bases) B {};
   struct C : A, B {};

   'C' will have size 1 and nvsize 0 despite not being annotated
   __declspec(empty_bases).

2. When laying out virtual or non-virtual bases, disable the injection
   of padding between classes if the most derived class is marked
   __declspec(empty_bases).

   This means that given:
   struct A {};
   struct B {};
   struct __declspec(empty_bases) C : A, B {};

   'C' will have size 1 and nvsize 0.

3. When calculating the offset of a non-virtual base, choose offset zero
   if the most derived class is marked __declspec(empty_bases) and the
   base is empty _and_ has an nvsize of 0.

   Because of the ABI rules, this does not mean that empty bases
   reliably get placed at offset 0!

   For example:
   struct A {};
   struct B {};
   struct __declspec(empty_bases) C : A, B { virtual ~C(); };

   'C' will be pointer sized to account for the vfptr at offset 0.
   'A' and 'B' will _not_ be at offset 0 despite being empty!
   Instead, they will be located right after the vfptr.

   This occurs due to the interaction betweeen non-virtual base layout
   and virtual function pointer injection: injection occurs after the
   nv-bases and shifts them down by the size of a pointer.

llvm-svn: 270457
2016-05-23 17:16:12 +00:00
Michael Zuckerman f86eb71616 [clang][AVX512][Builtin] adding missing intrinsics for vpmultishiftqb{128|256|512} instruction set .
Differential Revision: http://reviews.llvm.org/D20521

llvm-svn: 270441
2016-05-23 15:04:39 +00:00
Jacob Baungard Hansen c345705bee Test commit
llvm-svn: 270435
2016-05-23 13:12:29 +00:00
Michael Zuckerman e6542002fc [Clang][AVX512][BUILTIN]adding missing intrinsics for movdaq instruction set
Differential Revision: http://reviews.llvm.org/D20514

llvm-svn: 270401
2016-05-23 08:01:48 +00:00
Saleem Abdulrasool 6f8442bdd8 Driver: support exherbo's multiarch support
Exherbo has an alternative file system layout to accommodate multiarch.  The
loader is located at /usr/${triple}/lib/${loader}.  Adjust the Linux toolchain
to support that on exherbo.

llvm-svn: 270392
2016-05-23 02:17:28 +00:00
Bob Wilson 25c9125f11 Fix typo in documentation comment.
llvm-svn: 270391
2016-05-23 01:52:50 +00:00
Simon Atanasyan 69a710c03d [driver][mips] Follow-up to r270373. Add missed folder.
llvm-svn: 270380
2016-05-22 22:06:19 +00:00
Simon Atanasyan 6c51f5aca8 [driver][mips] clang-format the code. NFC
llvm-svn: 270374
2016-05-22 18:18:41 +00:00
Simon Atanasyan 2834a229b2 [driver][mips] Support new versions of MIPS CodeScape toolchains
llvm-svn: 270373
2016-05-22 18:18:07 +00:00
Simon Atanasyan 4f3fe5b1a6 [driver][mips] Use target triple mips-mti-linux-gnu for toolchain detection
llvm-svn: 270368
2016-05-22 15:28:34 +00:00
Simon Atanasyan cf7ac67f69 [driver][mips] Rename some variables to better reflect their purpose. NFC
llvm-svn: 270367
2016-05-22 15:27:58 +00:00
Simon Atanasyan 74468a5bc9 [driver][mips] Drop support for outdated version of CodeSourcery MIPS toolchain
llvm-svn: 270366
2016-05-22 15:27:36 +00:00
David Majnemer 5cfda6feb1 [AST] Cleanup comments regarding CXXRecordDecl::isEmpty
We were missing references to the standard, some of our home-grown
verbiage didn't make any sense.

No functional change is intended.

llvm-svn: 270353
2016-05-22 05:34:26 +00:00
Saleem Abdulrasool 783fc635f6 Driver: sink getLinuxDynamicLoader into the Toolchain
The parameter already requires the toolchain, sink the method into the class.
This also enables the use of the distro detection logic which will be needed to
support Exherbo's multiarch approach.

llvm-svn: 270352
2016-05-22 03:12:19 +00:00
Saleem Abdulrasool c9befbf552 Driver: simplify getDynameLinker
Convert the cascading if/else to a switch.  This makes it easier to follow the
logic.  Minor difference is that we no longer default to x86_64 but rather to
the architecture specified by the architecture.

llvm-svn: 270351
2016-05-22 01:37:36 +00:00
Simon Pilgrim 28666ce778 [X86][AVX] Ensure zero-extension of _mm256_extract_epi8 and _mm256_extract_epi16
Ensure _mm256_extract_epi8 and _mm256_extract_epi16 zero extend their i8/i16 result to i32. This matches _mm_extract_epi8 and _mm_extract_epi16.

Fix for PR27594

Differential Revision: http://reviews.llvm.org/D20468

llvm-svn: 270330
2016-05-21 21:14:35 +00:00
Justin Lebar 84da8b221e Update -ffast-math documentation to match reality.
Reviewers: rsmith

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D20457

llvm-svn: 270279
2016-05-20 21:33:01 +00:00
Yaxun Liu f7449a179b [OpenCL] Add to_{global|local|private} builtin functions.
OpenCL builtin functions to_{global|local|private} accepts argument of pointer type to arbitrary pointee type, and return a pointer to the same pointee type in different addr space, i.e.

global gentype *to_global(gentype *p);
It is not desirable to declare it as

global void *to_global(void *);
in opencl header file since it misses diagnostics.

This patch implements these builtin functions as Clang builtin functions. In the builtin def file they are defined to have signature void*(void*). When handling call expressions, their declarations are re-written to have correct parameter type and return type corresponding to the call argument.

In codegen call to addr void *to_addr(void*) is generated with addrcasts or bitcasts to facilitate implementation in builtin library.

Differential Revision: http://reviews.llvm.org/D19932

llvm-svn: 270261
2016-05-20 19:54:38 +00:00
Manman Ren b7fda4baa9 ObjectiveC: canonicalize "kindof id" to "id".
There is no need to apply kindof on an unqualified id type.

rdar://24753825

llvm-svn: 270241
2016-05-20 17:29:43 +00:00
Dimitry Andric c6d924cd06 Make __FreeBSD_cc_version predefined macro configurable at build time
The `FreeBSDTargetInfo` class has always set the `__FreeBSD_cc_version`
predefined macro to a rather static value, calculated from the major OS
version.

In the FreeBSD base system, we will start incrementing the value of this
macro whenever we make any signifant change to clang, so we need a way
to configure the macro's value at build time.

Use `FREEBSD_CC_VERSION` for this, which we can define in the FreeBSD
build system using either the `-D` command line option, or an include
file.  Stock builds will keep the earlier value.

Differential Revision: http://reviews.llvm.org/D20037

llvm-svn: 270240
2016-05-20 17:27:22 +00:00
Yaxun Liu c537c8a72b [OpenCL] Allow explicit cast of 0 to event_t.
Patch by Aaron Enye Shi.

Differential Revision: http://reviews.llvm.org/D17578

llvm-svn: 270238
2016-05-20 17:18:16 +00:00
Simon Pilgrim 8a8c4e1404 [X86][AVX] Added _mm256_testc_si256/_mm256_testnzc_si256/_mm256_testz_si256 tests
llvm-svn: 270227
2016-05-20 15:49:17 +00:00
Adrian McCarthy 8e0879a9d3 Eliminate unnecessary file access checks in Clang driver on Windows
Differential Revision: http://reviews.llvm.org/D20454

llvm-svn: 270226
2016-05-20 15:46:23 +00:00
Benjamin Kramer f4c520d5d2 Add all the avx512 flavors to __builtin_cpu_supports's list.
This is matching what trunk gcc is accepting. Also adds a missing ssse3
case. PR27779. The amount of duplication here is annoying, maybe it
should be factored into a separate .def file?

llvm-svn: 270224
2016-05-20 15:21:08 +00:00
Krzysztof Parzyszek 89fb44147b [Hexagon] Recognize "s" constraint in inline-asm
llvm-svn: 270216
2016-05-20 13:50:32 +00:00
Simon Pilgrim 4fa8250ad0 [X86][AVX] Added _mm256_extract_epi64 test
llvm-svn: 270212
2016-05-20 12:57:21 +00:00
Simon Pilgrim 94b17773e5 [X86][AVX] Full set of AVX intrinsics tests
llvm/test/CodeGen/X86/avx-intrinsics-fast-isel.ll will be synced to this

llvm-svn: 270210
2016-05-20 12:41:02 +00:00
Martin Probst c4a0dd49a3 clang-format: [JS] sort ES6 imports.
Summary:
This change automatically sorts ES6 imports and exports into four groups:
absolute imports, parent imports, relative imports, and then exports. Exports
are sorted in the same order, but not grouped further.

To keep JS import sorting out of Format.cpp, this required extracting the
TokenAnalyzer infrastructure to separate header and implementation files.

Reviewers: djasper

Subscribers: cfe-commits, klimek

Differential Revision: http://reviews.llvm.org/D20198

llvm-svn: 270203
2016-05-20 11:24:24 +00:00
Daniel Jasper 997cf2fea8 clang-format: [JS] Treat "for" as a reserved word after a ".".
Otherwise, clang-format can get confused with statements like:

  x.for = 1;

llvm-svn: 270188
2016-05-20 06:16:01 +00:00
Saleem Abdulrasool b1d50c1c12 CodeGen: address -Wcast-qual warning
Add a const_cast rather than the C-style cast.  NFC.

llvm-svn: 270180
2016-05-20 03:58:12 +00:00
Richard Smith b391930bbf Re-alphabetize this file list.
llvm-svn: 270170
2016-05-20 01:07:10 +00:00
Richard Smith f5c3a63c28 Revert incorrect module map changes in r269907 and replace them with the
appropriate changes.

llvm-svn: 270169
2016-05-20 01:06:47 +00:00
Reid Kleckner a769fd50ba Avoid depending on test inputes that aren't in Inputs
Some people have weird CI systems that run each test subdirectory
independently without access to other parallel trees.

Unfortunately, this means we have to suffer some duplication until Art
can sort out how to share these types.

llvm-svn: 270164
2016-05-20 00:38:25 +00:00
Vedant Kumar 95a2a7f2a1 [Lexer] Don't merge macro args from different macro files
The lexer sets the end location of macro arguments incorrectly *if*,
while merging consecutive args to fit into a single SLocEntry, it finds
args which come from different macro files.

Fix the issue by using separate SLocEntries in this situation.

This fixes a code coverage crasher (rdar://problem/26181005). Because
the lexer reported end locations for certain macro args incorrectly, we
would generate bogus coverage mappings with negative line offsets.

Reviewed-by: akyrtzi

Differential Revision: http://reviews.llvm.org/D20401

llvm-svn: 270160
2016-05-19 23:44:02 +00:00
Anton Yartsev 8a88b90817 [analyzer] Fix for PR23790 : constrain return value of strcmp() rather than returning a concrete value.
The function strcmp() can return any value, not just {-1,0,1} : "The strcmp(const char *s1, const char *s2) function returns an integer greater than, equal to, or less than zero, accordingly as the string pointed to by s1 is greater than, equal to, or less than the string pointed to by s2." [C11 7.24.4.2p3]
https://llvm.org/bugs/show_bug.cgi?id=23790
http://reviews.llvm.org/D16317

llvm-svn: 270154
2016-05-19 23:03:49 +00:00
Justin Lebar 2e4ecfdebe [CUDA] Implement __ldg using intrinsics.
Summary:
Previously it was implemented as inline asm in the CUDA headers.

This change allows us to use the [addr+imm] addressing mode when
executing ld.global.nc instructions.  This translates into a 1.3x
speedup on some benchmarks that call this instruction from within an
unrolled loop.

Reviewers: tra, rsmith

Subscribers: jhen, cfe-commits, jholewinski

Differential Revision: http://reviews.llvm.org/D19990

llvm-svn: 270150
2016-05-19 22:49:13 +00:00
Benjamin Kramer 97d7a66299 [Sema] Fix use after move. Found by ubsan.
llvm-svn: 270144
2016-05-19 21:53:33 +00:00
Artem Belevich 3650bbeebc [CUDA] Do not allow non-empty destructors for global device-side variables.
According to Cuda Programming guide (v7.5, E2.3.1):
> __device__, __constant__ and __shared__ variables defined in namespace
> scope, that are of class type, cannot have a non-empty constructor or a
> non-empty destructor.

Clang already deals with device-side constructors (see D15305).
This patch enforces similar rules for destructors.

Differential Revision: http://reviews.llvm.org/D20140

llvm-svn: 270108
2016-05-19 20:13:53 +00:00
Artem Belevich 85b6f63f42 [CUDA] Split device-var-init.cu tests into separate Sema and CodeGen parts.
Codegen tests for device-side variable initialization are subset of test
cases used to verify Sema's part of the job.
Including CodeGenCUDA/device-var-init.cu from SemaCUDA makes it easier to
keep both sides in sync.

Differential Revision: http://reviews.llvm.org/D20139

llvm-svn: 270107
2016-05-19 20:13:39 +00:00
Artem Belevich 31c3bad499 [CUDA] Enable fusing FP ops (-ffp-contract=fast) for CUDA by default.
This matches default nvcc behavior and gives substantial
performance boost on GPU where fmad is much cheaper compared to add+mul.

Differential Revision: http://reviews.llvm.org/D20341

llvm-svn: 270094
2016-05-19 18:44:45 +00:00
David Majnemer b0f1dbdf33 [MS ABI] Ignore transparent contexts when determining the effective context
We didn't skip over extern "C++" contexts, causing us to mangle things
which don't need to be mangled.

llvm-svn: 270089
2016-05-19 18:15:53 +00:00
Artem Belevich 2c323a0eae Check for nullptr argument.
Addresses static analysis report in PR15492.

Differential Revision: http://reviews.llvm.org/D20141

llvm-svn: 270086
2016-05-19 18:00:18 +00:00
Benjamin Kramer 504c01cc67 Don't rely on value numbers in test, those are fragile and change in Release (no asserts) builds.
llvm-svn: 270085
2016-05-19 17:57:35 +00:00
Artem Belevich ffa5fc51b8 [CUDA] Allow sm_50,52,53 GPUs
LLVM accepts them since r233575.

Differential Revision: http://reviews.llvm.org/D20405

llvm-svn: 270084
2016-05-19 17:47:47 +00:00
Simon Pilgrim 9b3729b043 [X86][SSE] Sync with llvm/test/CodeGen/X86/sse-intrinsics-fast-isel.ll
sse-builtins.c now just covers SSE1 intrinsics

llvm-svn: 270083
2016-05-19 17:11:31 +00:00
Simon Pilgrim bcf8846be5 [X86][SSE2] Fixed shuffle of results in _mm_cmpnge_sd/_mm_cmpngt_sd tests
llvm-svn: 270079
2016-05-19 16:48:59 +00:00
Simon Atanasyan a45502d412 [driver] Do not pass install dir to the MultilibSet include dirs callback
All additional include directories are relative to the toolchain install
folder. So let's do not pass this folder to each callback to simplify
and slightly reduce the code.

llvm-svn: 270069
2016-05-19 15:07:21 +00:00
Simon Atanasyan c69d28162b [driver] Do not pass target triple to the MultilibSet include dirs callback
No one callback uses target triple so we can escape passing the unused
argument.

llvm-svn: 270068
2016-05-19 15:07:00 +00:00
Simon Atanasyan d9fc3f030a [driver][mips] Hardcode triple name in case of CodeSourcery toolchain. NFC
CodeSourcery toolchain is a standalone toolchain which always uses
the same triple name in its paths. It is independent from target
triple used by the driver.

llvm-svn: 270067
2016-05-19 15:05:22 +00:00
Ranjeet Singh b631aafee3 [ARM] Fix cdp intrinsic
- Fixed cdp intrinsic to only accept compile time
  constant values previously you could pass in a
  variable to the builtin which would result in
  illegal llvm assembly output

Differential Revision: http://reviews.llvm.org/D20394

llvm-svn: 270058
2016-05-19 13:04:34 +00:00
Michael Zuckerman 178113e8cc [Clang][AVX512][intrinsics] continue completing missing set intrinsics
Differential Revision: http://reviews.llvm.org/D20160

llvm-svn: 270047
2016-05-19 12:07:49 +00:00
Simon Pilgrim 97728dfb39 [X86][SSE2] Added _mm_move_* tests
llvm-svn: 270043
2016-05-19 11:18:49 +00:00
Simon Pilgrim cddcd2bd45 [X86][SSE2] Added _mm_cast* and _mm_set* tests
llvm-svn: 270042
2016-05-19 11:03:48 +00:00
Benjamin Kramer b872733851 [Sema] Allow an external sema source to handle delayed typo corrections.
This probably isn't perfectly perfect but allows correcting function calls
again.

llvm-svn: 270039
2016-05-19 10:46:10 +00:00
Simon Pilgrim 3f64bb9618 [X86][SSE2] Sync with llvm/test/CodeGen/X86/sse2-intrinsics-fast-isel.ll
llvm-svn: 270034
2016-05-19 09:52:59 +00:00
Daniel Jasper 5dbcd3bd07 clang-format: [JS] Fix spacing in destructuring assignments.
Before:
  const[a, b, c] = [1, 2, 3];

After:
  const [a, b, c] = [1, 2, 3];

llvm-svn: 270029
2016-05-19 07:18:07 +00:00
Daniel Jasper 451544ab57 clang-format: Fix incorrect indentation in last line of macro definition
Before:
  #define MACRO(a) \
    if (a) {       \
      f();         \
    } else         \
    g()

After:
  #define MACRO(a) \
    if (a) {       \
      f();         \
    } else         \
      g()

llvm-svn: 270028
2016-05-19 06:30:48 +00:00
Daniel Jasper e2fab13313 clang-format: Fix enumerator case ranges.
Before:
  case a... b: break;

After:
  case a ... b: break;

llvm-svn: 270027
2016-05-19 06:19:17 +00:00
Vedant Kumar fa2d595541 Reapply^3 "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC"
Sync up with "(llvm) Use Error in InstrProf and Coverage".

llvm-svn: 270021
2016-05-19 03:54:54 +00:00
Faisal Vali 683b074209 Fix PR27601 by reverting [r267453] - Refactor traversal of bases in deduction of template parameters from base
This reversal is being done with r267453's author's (i.e. Richard Smith's) permission.

This fixes https://llvm.org/bugs/show_bug.cgi?id=27601 

Also, per Richard's request the examples from the bug report have been added to our test suite.

llvm-svn: 270016
2016-05-19 02:28:21 +00:00
Richard Smith 484f13aeb1 Revert accidentally-committed test for PR27558 (which currently fails...)
llvm-svn: 270010
2016-05-19 01:41:52 +00:00
Richard Smith 301bc21fd0 Make Sema::getPrintingPolicy less ridiculously expensive. This used to perform
an identifier table lookup, *and* copy the LangOptions (including various
std::vector<std::string>s). Twice. We call this function once each time we start
parsing a declaration specifier sequence, and once for each call to Sema::Diag.

This reduces the compile time for a sample .c file from the linux kernel by 20%.

llvm-svn: 270009
2016-05-19 01:39:10 +00:00
Rafael Espindola fc91edb062 Fix a funny Dvorak typo.
llvm-svn: 270006
2016-05-19 00:16:09 +00:00
Rafael Espindola 3c70d38d1f Update for llvm change.
llvm-svn: 269989
2016-05-18 22:04:57 +00:00
Simon Pilgrim 063c57c1f9 Revert r269967 (SSE2 builtin checks) due to failed buildbots
llvm-svn: 269970
2016-05-18 18:22:20 +00:00
Manman Ren 08ce73470c ObjectiveC Class Properties: warn if a class property accessor is mistakenly an
instance method.

When diagnosing unimplemented class property, make sure we emit
a warning when we only see an instance method with the right selector.

Also warn when we only see a class method for an instance property.

rdar://26141719

llvm-svn: 269968
2016-05-18 18:12:34 +00:00
Simon Pilgrim 8beed747ce [X86][SSE2] Sync with llvm/test/CodeGen/X86/sse2-intrinsics-fast-isel.ll
llvm-svn: 269967
2016-05-18 18:12:34 +00:00
Steven Wu 1257cd8fd8 [Driver] Fix the case when use -fembed-bitcode and -flto= together
Summary:
-fembed-bitcode was only checking for old style LTO flag (-flto) but not
considering the new -flto= style option. That makes clang output bitcode
embedded in bitcode object when using -flto= and -fembed-bitcode= together.
Now clang should output normal bitcode file when using LTO and ignores
-fembed-bitcode option.

Reviewers: joker.eph

Subscribers: joker.eph, cfe-commits

Differential Revision: http://reviews.llvm.org/D20374

llvm-svn: 269961
2016-05-18 17:04:52 +00:00
Haojian Wu 40b1277135 [ASTMacther] A follow-up on unresolvedLookupExpr test fixing.
llvm-svn: 269957
2016-05-18 16:48:44 +00:00
Paul Robinson 0531e3d625 [PS4] Clean up some test commentary. NFC
llvm-svn: 269941
2016-05-18 15:35:58 +00:00
Michael Zuckerman 2cacc35343 [Clang][AVX512] completing missing intrinsics [pandnd].
Differential Revision: http://reviews.llvm.org/D20101

llvm-svn: 269939
2016-05-18 15:25:53 +00:00
Haojian Wu da5b1131de [ASTMatcher] Fix a ASTMatcher test failure on Windows.
Reviewers: alexfh, aaron.ballman

Subscribers: thakis, cfe-commits, klimek

Differential Revision: http://reviews.llvm.org/D20369

llvm-svn: 269936
2016-05-18 15:15:12 +00:00
Vassil Vassilev 2ee10e6dc6 Teach Sema::MergeFunctionDecl to properly check for an out-of-line definition of a function that is declared as =default in its class definition.
First part of PR27699.

Patch by Cristina Cristescu!

Reviewed by Richard Smith and me.

llvm-svn: 269935
2016-05-18 15:14:46 +00:00
Krzysztof Parzyszek e0026e4e21 [Hexagon] Recognize "q" and "v" in inline-asm as register constraints
Clang follow-up to r269933.

llvm-svn: 269934
2016-05-18 14:56:14 +00:00
Simon Pilgrim a090864762 Removed duplicate SSE42 builtin tests from avx-builtins.c
llvm-svn: 269932
2016-05-18 14:32:16 +00:00
Simon Pilgrim 519c78f3ae [X86][SSE42] Sync with llvm/test/CodeGen/X86/sse42-intrinsics-fast-isel.ll
llvm-svn: 269931
2016-05-18 14:29:55 +00:00
Simon Pilgrim 7a4d7d47c9 [X86][SSE41] Sync with llvm/test/CodeGen/X86/sse41-intrinsics-fast-isel.ll
llvm-svn: 269926
2016-05-18 13:47:16 +00:00
Eric Liu baf58c2309 [clang-format] Make formatReplacements() also sort #includes.
Summary: [clang-format] Make formatReplacements() also sort #includes.

Reviewers: bkramer, djasper

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D20362

llvm-svn: 269924
2016-05-18 13:43:48 +00:00
Simon Pilgrim 7e148a94a4 [X86][SSE3] Sync with llvm/test/CodeGen/X86/sse3-intrinsics-fast-isel.ll
llvm-svn: 269921
2016-05-18 13:17:39 +00:00
Haojian Wu 7751c92582 [ASTMatcher] Add a node matcher for UnresolvedLookupExpr.
Reviewers: alexfh, aaron.ballman

Subscribers: aaron.ballman, klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D20360

llvm-svn: 269916
2016-05-18 12:53:59 +00:00
Petar Jovanovic 3ca1622a90 [Mips] Finetuning MIPS32 Android default variants
MIPS32 Android defaults to FPXX ("-fpxx").
MIPS32R6 Android defaults to FP64A ("-mfp64 -mno-odd-spreg").

Differential Revision: http://reviews.llvm.org/D20345

llvm-svn: 269914
2016-05-18 12:46:06 +00:00
Rafael Espindola e64e230dec Update for llvm change.
llvm-svn: 269910
2016-05-18 11:58:56 +00:00
Ashutosh Nema 51c9dd0081 Add new intrinsic support for MONITORX and MWAITX instructions
Summary:
MONITORX/MWAITX instructions provide similar capability to the MONITOR/MWAIT
pair while adding a timer function, such that another termination of the MWAITX
instruction occurs when the timer expires. The presence of the MONITORX and 
MWAITX instructions is indicated by CPUID 8000_0001, ECX, bit 29.

The MONITORX and MWAITX instructions are intercepted by the same bits that
intercept MONITOR and MWAIT. MONITORX instruction establishes a range to be
monitored. MWAITX instruction causes the processor to stop instruction
execution and enter an implementation-dependent optimized state until
occurrence of a class of events.

Opcode of MONITORX instruction is "0F 01 FA". Opcode of MWAITX instruction is
"0F 01 FB". These opcode information is used in adding tests for the
disassembler.

These instructions are enabled for AMD's bdver4 architecture.

Patch by Ganesh Gopalasubramanian!

Reviewers: echristo, craig.topper

Subscribers: RKSimon, joker.eph, llvm-commits, cfe-commits

Differential Revision: http://reviews.llvm.org/D19796

llvm-svn: 269907
2016-05-18 11:56:23 +00:00
Alexey Bataev a7547183ec Support for MSVS default calling convention options (/Gd, /Gz, /Gv,
/Gr), by Alexander Makarov

Patch for bug #27711
Differential Revision: http://reviews.llvm.org/D20171

llvm-svn: 269891
2016-05-18 09:06:38 +00:00
Eric Liu 2874ac3e28 [clang-format] Make FormatTokenLess::operator() const.
llvm-svn: 269889
2016-05-18 08:14:49 +00:00
Eric Liu ce5e4bc7ac Make clang-format cleaner remove redundant commas in list and redundant colon in constructor initializer.
Summary: Make clang-format cleaner remove redundant commas/colons in constructor initializer list.

Reviewers: klimek, djasper

Subscribers: cfe-commits, klimek

Differential Revision: http://reviews.llvm.org/D19804

llvm-svn: 269888
2016-05-18 08:02:56 +00:00
John McCall 6909fee7df Various improvements to the public IRGen interface.
llvm-svn: 269880
2016-05-18 05:21:18 +00:00