]> granicus.if.org Git - clang/log
clang
8 years agoAMDGPU: Update datalayout string
Matt Arsenault [Tue, 31 May 2016 16:58:18 +0000 (16:58 +0000)]
AMDGPU: Update datalayout string

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271297 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFixed bug
Piotr Padlewski [Tue, 31 May 2016 15:56:26 +0000 (15:56 +0000)]
Fixed bug

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271293 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoclang-c: Add the clang_getCursorVisibility() API
Ehsan Akhgari [Tue, 31 May 2016 15:55:51 +0000 (15:55 +0000)]
clang-c: Add the clang_getCursorVisibility() API

This patch adds an API for querying the visibility of the entity
referred to by a cursor.

Patch by Michael Wu <mwu@mozilla.com>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271292 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert r253909 because it was committed with an incorrect message
Ehsan Akhgari [Tue, 31 May 2016 15:39:10 +0000 (15:39 +0000)]
Revert r253909 because it was committed with an incorrect message

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271291 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ASTMatchers] Breaking change of `has` matcher
Piotr Padlewski [Tue, 31 May 2016 15:25:05 +0000 (15:25 +0000)]
[ASTMatchers] Breaking change of `has` matcher

has matcher can now match to implicit and paren casts

http://reviews.llvm.org/D20801

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271288 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAvoid unused variable warning in release builds.
Benjamin Kramer [Tue, 31 May 2016 14:14:42 +0000 (14:14 +0000)]
Avoid unused variable warning in release builds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271280 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[clang-format] insert new #includes into correct blocks when cleaning up Replacement...
Eric Liu [Tue, 31 May 2016 13:34:20 +0000 (13:34 +0000)]
[clang-format] insert new #includes into correct blocks when cleaning up Replacement with cleanupAroundReplacements().

Summary:
When a replacement's offset is set to UINT_MAX or -1U, it is treated as
a header insertion replacement by cleanupAroundReplacements(). The new #include
directive is then inserted into the correct block.

Reviewers: klimek, djasper

Subscribers: klimek, cfe-commits, bkramer

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271276 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Add load/store co-processor intrinsics.
Ranjeet Singh [Tue, 31 May 2016 13:31:25 +0000 (13:31 +0000)]
[ARM] Add load/store co-processor intrinsics.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271275 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Clang][Intrinsics][avx512] Adding round cvt to clang
Michael Zuckerman [Tue, 31 May 2016 11:27:34 +0000 (11:27 +0000)]
[Clang][Intrinsics][avx512] Adding round cvt to clang

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271265 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OPENMP] Update in ReleaseNotes for OpenMP support.
Alexey Bataev [Tue, 31 May 2016 11:17:08 +0000 (11:17 +0000)]
[OPENMP] Update in ReleaseNotes for OpenMP support.

Added notes about full support of all non-offloading features of OpenMP
4.5 + info about option -fopenmp-version=[31|40|45] that allows to
control supported OpenMP version.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271263 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CommonOptionsParser] Return source paths as const ref.
Benjamin Kramer [Tue, 31 May 2016 10:17:46 +0000 (10:17 +0000)]
[CommonOptionsParser] Return source paths as const ref.

This saves a superfluous copy and makes managing the lifetime of the
returned strings a bit easier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271262 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Convert masked load builtins to generic masked load intrinsics instead of...
Craig Topper [Tue, 31 May 2016 06:58:07 +0000 (06:58 +0000)]
[AVX512] Convert masked load builtins to generic masked load intrinsics instead of the x86 specific ones.

This will allow the x86 intrinsics to be removed from the backend.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271253 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MSVC] Fix stack overflow in unqualified type lookup logic, by Will
Alexey Bataev [Tue, 31 May 2016 06:21:27 +0000 (06:21 +0000)]
[MSVC] Fix stack overflow in unqualified type lookup logic, by Will
Wilson.

An unqualified lookup for in base classes may cause stack overflow if
the base class is a specialization of current class.
Patch by Will Wilson.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271251 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Use unaligned load intrinsics to implement other intrinsics instead of manually...
Craig Topper [Tue, 31 May 2016 05:49:13 +0000 (05:49 +0000)]
[X86] Use unaligned load intrinsics to implement other intrinsics instead of manually creating the unaligned load.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271250 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Emit generic masked store instrinsics instead of using x86 specific intrinsics.
Craig Topper [Tue, 31 May 2016 01:50:10 +0000 (01:50 +0000)]
[AVX512] Emit generic masked store instrinsics instead of using x86 specific intrinsics.

This will allow us to remove the x86 instrinics from the backend.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271246 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Ensure load/store tests unaligned pointers really are align 1
Simon Pilgrim [Mon, 30 May 2016 19:20:55 +0000 (19:20 +0000)]
[X86] Ensure load/store tests unaligned pointers really are align 1

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271227 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCodeGen: address post-commit review comments
Saleem Abdulrasool [Mon, 30 May 2016 18:26:06 +0000 (18:26 +0000)]
CodeGen: address post-commit review comments

David Majnemer pointed out that isOSBinFormatMachO is more compact.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271221 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Added missing tests (merge failure)
Simon Pilgrim [Mon, 30 May 2016 17:58:38 +0000 (17:58 +0000)]
[X86][SSE] Added missing tests (merge failure)

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271219 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] _mm_store1_ps/_mm_store1_pd should require an aligned pointer
Simon Pilgrim [Mon, 30 May 2016 17:55:25 +0000 (17:55 +0000)]
[X86][SSE] _mm_store1_ps/_mm_store1_pd should require an aligned pointer

According to the gcc headers, intel intrinsics docs and msdn codegen the _mm_store1_pd (and its _mm_store_pd1 equivalent) should use an aligned pointer - the clang headers are the only implementation I can find that assume non-aligned stores (by storing with _mm_storeu_pd).

Additionally, according to the intel intrinsics docs and msdn codegen the _mm_store1_ps (_mm_store_ps1) requires a similarly aligned pointer.

This patch raises the alignment requirements to match the other implementations by calling _mm_store_ps/_mm_store_pd instead.

I've also added the missing _mm_store_pd1 intrinsic (which maps to _mm_store1_pd like _mm_store_ps1 does to _mm_store1_ps).

As a followup I'll update the llvm fast-isel tests to match this codegen.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271218 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CUDA] Fix order of vectorized ldg intrinsics' elements.
Justin Lebar [Mon, 30 May 2016 17:12:55 +0000 (17:12 +0000)]
[CUDA] Fix order of vectorized ldg intrinsics' elements.

Summary: The order is [x, y, z, w], not [w, x, y, z].

Subscribers: cfe-commits, tra

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271215 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Replace unaligned store builtins in SSE/AVX intrinsic files with code that...
Craig Topper [Mon, 30 May 2016 17:10:30 +0000 (17:10 +0000)]
[X86] Replace unaligned store builtins in SSE/AVX intrinsic files with code that will compile to a native unaligned store. Remove the builtins since they are no longer used.

Intrinsics will be removed from llvm in a future commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271214 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agotest: add explicit targets for some tests
Saleem Abdulrasool [Mon, 30 May 2016 16:36:48 +0000 (16:36 +0000)]
test: add explicit targets for some tests

These tests currently expect MachO section names and do not provide a target.
Explicitly provide one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271212 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCodeGen: tweak CFConstantStrings for COFF and ELF
Saleem Abdulrasool [Mon, 30 May 2016 16:23:07 +0000 (16:23 +0000)]
CodeGen: tweak CFConstantStrings for COFF and ELF

Adjust the constant CFString emission to emit into more appropriate sections on
ELF and COFF targets.  It would previously try to use MachO section names
irrespective of the file format.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271211 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ASTMatchers] Add support of hasCondition for SwitchStmt.
Etienne Bergeron [Mon, 30 May 2016 15:25:25 +0000 (15:25 +0000)]
[ASTMatchers] Add support of hasCondition for SwitchStmt.

Summary:
The switch statement could be added to the hasCondition matcher.

Example:
```
clang-query> match switchStmt(hasCondition(ignoringImpCasts(declRefExpr())))
```

Output:
```
Match #1:

Binding for "root":
SwitchStmt 0x2f9b528 </usr/local/google/home/etienneb/examples/enum.cc:35:3, line:38:3>
|-<<<NULL>>>
|-ImplicitCastExpr 0x2f9b510 <line:35:11> 'int' <IntegralCast>
| `-ImplicitCastExpr 0x2f9b4f8 <col:11> 'enum Color' <LValueToRValue>
|   `-DeclRefExpr 0x2f9b4d0 <col:11> 'enum Color' lvalue Var 0x2f9a118 'C' 'enum Color'
`-CompoundStmt 0x2f9b610 <col:14, line:38:3>
  |-CaseStmt 0x2f9b578 <line:36:3, col:22>
  | |-ImplicitCastExpr 0x2f9b638 <col:8> 'int' <IntegralCast>
  | | `-DeclRefExpr 0x2f9b550 <col:8> 'enum Size' EnumConstant 0x2f99e40 'Small' 'enum Size'
  | |-<<<NULL>>>
  | `-ReturnStmt 0x2f9b5d0 <col:15, col:22>
  |   `-IntegerLiteral 0x2f9b5b0 <col:22> 'int' 1
  `-DefaultStmt 0x2f9b5f0 <line:37:3, col:12>
    `-BreakStmt 0x2f9b5e8 <col:12>

1 match.
```

Reviewers: aaron.ballman, sbenza, klimek

Subscribers: klimek, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271208 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Clang][avx512][builtin] Adding missing intrinsics for cvt
Michael Zuckerman [Mon, 30 May 2016 13:22:12 +0000 (13:22 +0000)]
[Clang][avx512][builtin] Adding missing intrinsics for cvt

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271205 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OPENMP 4.5] Additional codegen for statically scheduled loops with
Alexey Bataev [Mon, 30 May 2016 13:05:14 +0000 (13:05 +0000)]
[OPENMP 4.5] Additional codegen for statically scheduled loops with
'simd' modifier.

Runtime library defines new schedule constant kmp_sch_static_balanced_chunked = 45 for static loop-based directives  static with chunk adjustment (e.g., simd). Added codegen for this kind of schedule.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271204 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OPENMP 4.5] Fixed codegen for 'priority' and destructors in task-based
Alexey Bataev [Mon, 30 May 2016 09:06:50 +0000 (09:06 +0000)]
[OPENMP 4.5] Fixed codegen for 'priority' and destructors in task-based
directives.

'kmp_task_t' record type added a new field for 'priority' clause and
changed the representation of pointer to destructors for privates used
within loop-based directives.
Old representation:

typedef struct kmp_task {                   /* GEH: Shouldn't this be
aligned somehow? */
  void *shareds;                            /**< pointer to block of
    pointers to shared vars   */
  kmp_routine_entry_t routine;              /**< pointer to routine
    to call for executing task */
  kmp_int32 part_id;                        /**< part id for the
    task                          */
  kmp_routine_entry_t destructors;        /* pointer to function to
  invoke deconstructors of firstprivate C++ objects */
  /*  private vars  */
} kmp_task_t;

New representation:

typedef struct kmp_task {                   /* GEH: Shouldn't this be
aligned somehow? */
  void *shareds;                            /**< pointer to block of
    pointers to shared vars   */
  kmp_routine_entry_t routine;              /**< pointer to routine
    to call for executing task */
  kmp_int32 part_id;                        /**< part id for the
    task                          */
  kmp_cmplrdata_t data1; /* Two known
optional additions: destructors and priority */
  kmp_cmplrdata_t data2; /* Process
destructors first, priority second */
/* future data */
  /*  private vars  */
} kmp_task_t;

Also excessive initialization of 'destructors' fields to 'null' was
removed from codegen if it is known that no destructors shal be used.
Currently a special bit is used in 'kmp_tasking_flags_t' bitfields
('destructors_thunk' bitfield).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271201 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OpenCL] Remove tests without triple from test/Headers/opencl-c-header.cl.
Yaxun Liu [Mon, 30 May 2016 06:42:48 +0000 (06:42 +0000)]
[OpenCL] Remove tests without triple from test/Headers/opencl-c-header.cl.

This test requires triples with Itanium C++ ABI whereas triples with MSVC environment uses Microsoft C++ ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271198 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OpenCL] Add the default header file opencl-c.h for OpenCL C language
Yaxun Liu [Mon, 30 May 2016 02:22:28 +0000 (02:22 +0000)]
[OpenCL] Add the default header file opencl-c.h for OpenCL C language

OpenCL has large number of "builtin" functions ("builtin" in the sense of OpenCL spec) which are defined in header files. To compile OpenCL kernels using these builtin functions, a header file is needed.

This header file is based on the Khronos implementation (https://github.com/KhronosGroup/SPIR/blob/spirv-1.0/lib/Headers/opencl.h) with heavy refactoring.

Re-commit after fixing failures on ppc64/systemz etc.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271197 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoclang-format: Fix segfault introduced by allowing wraps after comments.
Daniel Jasper [Sun, 29 May 2016 22:07:22 +0000 (22:07 +0000)]
clang-format: Fix segfault introduced by allowing wraps after comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271191 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoEnable some accidentally dead tests and fix up the bitrot
David Blaikie [Sun, 29 May 2016 19:50:23 +0000 (19:50 +0000)]
Enable some accidentally dead tests and fix up the bitrot

Problem found by Nico, originally committed by me in r213213. The .test
prefix wasn't actually being run. Once that was fixed the test cases had
outdated command line syntax and IR debug info format, so updated for
those issues to get them back up and running.

Thanks Nico!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271188 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Make unsigned integer vector types generally available
Simon Pilgrim [Sun, 29 May 2016 18:49:08 +0000 (18:49 +0000)]
[X86][SSE] Make unsigned integer vector types generally available

As discussed on http://reviews.llvm.org/D20684, move the unsigned integer vector types used for zero extension to make them available for general use.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271187 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoclang-format: [JS] Support shebang lines on the very first line.
Martin Probst [Sun, 29 May 2016 14:41:36 +0000 (14:41 +0000)]
clang-format: [JS] Support shebang lines on the very first line.

Summary:
Shebang lines (`#!/bin/blah`) can be used in JavaScript scripts to indicate
they should be run using e.g. node. This change treats # lines on the first line
as line comments.

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271185 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoclang-format: [JS] fix async parsing.
Martin Probst [Sun, 29 May 2016 14:41:07 +0000 (14:41 +0000)]
clang-format: [JS] fix async parsing.

Summary:
Only treat the sequence `async function` as the start of a function expression,
as opposed to every occurrence of the token `async` (whoops).

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271184 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoclang-format: [JS] FormatToken.startsSequence/endsSequence.
Martin Probst [Sun, 29 May 2016 14:41:02 +0000 (14:41 +0000)]
clang-format: [JS] FormatToken.startsSequence/endsSequence.

Refactors AnnotatedLine.startsWith/endsWith by extracting the core functionality
into FormatToken.startsSequence/endsSequence. This allows checking tokens within
the pointered linked list structure with a lookahead, automatically ignoring
comments, which is useful in many places (e.g. see subsequent commit).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271183 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAvoid unnecessary std::string copies. NFC.
Benjamin Kramer [Sun, 29 May 2016 11:04:56 +0000 (11:04 +0000)]
Avoid unnecessary std::string copies. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271182 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Simplify alignr builtin support by recognizing that NumLaneElts is always 16...
Craig Topper [Sun, 29 May 2016 07:06:02 +0000 (07:06 +0000)]
[X86] Simplify alignr builtin support by recognizing that NumLaneElts is always 16. NFC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271176 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix typo.
Rafael Espindola [Sun, 29 May 2016 03:03:22 +0000 (03:03 +0000)]
Fix typo.

Thanks to David Majnemer for noticing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271166 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeGen] Use the ArrayRef form CreateShuffleVector instead of building ConstantVecto...
Craig Topper [Sun, 29 May 2016 02:39:30 +0000 (02:39 +0000)]
[CodeGen] Use the ArrayRef form CreateShuffleVector instead of building ConstantVectors or ConstantDataVectors and calling the other form.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271165 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMark test as requiring x86-registered-target.
Rafael Espindola [Sun, 29 May 2016 02:36:16 +0000 (02:36 +0000)]
Mark test as requiring x86-registered-target.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271163 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoHandle -Wa,--mrelax-relocations=[no|yes].
Rafael Espindola [Sun, 29 May 2016 02:01:14 +0000 (02:01 +0000)]
Handle -Wa,--mrelax-relocations=[no|yes].

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271162 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert r271136 [OpenCL] Add the default header file opencl-c.h for OpenCL C language...
Yaxun Liu [Sat, 28 May 2016 19:50:40 +0000 (19:50 +0000)]
Revert r271136 [OpenCL] Add the default header file opencl-c.h for OpenCL C language due to build failure on ppc64/hexagon/systemz.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271144 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCodeGen: support blocks on COFF targets in DLLs
Saleem Abdulrasool [Sat, 28 May 2016 19:41:35 +0000 (19:41 +0000)]
CodeGen: support blocks on COFF targets in DLLs

This extends the blocks support to support blocks with a dynamically linked
blocks runtime.  The previous code generation would work only for static builds
of the blocks runtime.  Mark the block "isa" pointers and functions as dllimport
if no explicit declaration marked with __declspec(dllexport) is found.  This
additional check allows for the use of the functionality in the runtime library
if desired.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271138 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OpenCL] Add the default header file opencl-c.h for OpenCL C language
Yaxun Liu [Sat, 28 May 2016 19:09:01 +0000 (19:09 +0000)]
[OpenCL] Add the default header file opencl-c.h for OpenCL C language

OpenCL has large number of "builtin" functions ("builtin" in the sense of OpenCL spec) which are defined in header files. To compile OpenCL kernels using these builtin functions, a header file is needed.

This header file is based on the Khronos implementation (https://github.com/KhronosGroup/SPIR/blob/spirv-1.0/lib/Headers/opencl.h) with heavy refactoring.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271136 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Add masked v16i32 and v8i64 unaligned store tests.
Craig Topper [Sat, 28 May 2016 18:59:06 +0000 (18:59 +0000)]
[AVX512] Add masked v16i32 and v8i64 unaligned store tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271134 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[driver][mips] Fix local variable naming. NFC
Simon Atanasyan [Sat, 28 May 2016 09:44:15 +0000 (09:44 +0000)]
[driver][mips] Fix local variable naming. NFC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271110 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[driver][mips] Revert support for CodeSourcery MIPS toolchain
Simon Atanasyan [Sat, 28 May 2016 09:44:04 +0000 (09:44 +0000)]
[driver][mips] Revert support for CodeSourcery MIPS toolchain

This is revert of r270366. The support for CS toolchain were dropped too early.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271109 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Replace VPMOVSX and (V)PMOVZX integer extension intrinsics with generic...
Simon Pilgrim [Sat, 28 May 2016 08:12:45 +0000 (08:12 +0000)]
[X86][SSE] Replace VPMOVSX and (V)PMOVZX integer extension intrinsics with generic IR (clang)

The VPMOVSX and (V)PMOVZX sign/zero extension intrinsics can be safely represented as generic __builtin_convertvector calls instead of x86 intrinsics.

This patch removes the clang builtins and their use in the sse2/avx headers - a companion patch will remove/auto-upgrade the llvm intrinsics.

Note: We already did this for SSE41 PMOVSX sometime ago.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271106 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Add fract builtin
Matt Arsenault [Sat, 28 May 2016 00:43:27 +0000 (00:43 +0000)]
AMDGPU: Add fract builtin

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271080 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoClean up: remove trailing spaces in x86 intrinsic headers.
Ekaterina Romanova [Sat, 28 May 2016 00:18:59 +0000 (00:18 +0000)]
Clean up: remove trailing spaces in x86 intrinsic headers.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271077 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agodocs: Clarify that LTO visibility is based on source-level symbol visibility.
Peter Collingbourne [Fri, 27 May 2016 22:31:30 +0000 (22:31 +0000)]
docs: Clarify that LTO visibility is based on source-level symbol visibility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271063 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Driver] Fix driver support for color diagnostics
Bruno Cardoso Lopes [Fri, 27 May 2016 20:43:00 +0000 (20:43 +0000)]
[Driver] Fix driver support for color diagnostics

Diagnostics that happen during driver time do not have color output support
unless -fcolor-diagonostic is explicitly passed into the driver.  This is not a
problem for cc1 since dianostic arguments are properly handled and color is
enabled by default if the terminal supports it.

Make the driver behave like CC1. There are tests that already check for these
flags, but for the color itself there's no sensible way to test it.

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

rdar://problem/26290980

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271042 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Headers] Remove redundant typedef. NFC.
Ahmed Bougacha [Fri, 27 May 2016 17:57:23 +0000 (17:57 +0000)]
[Headers] Remove redundant typedef. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271022 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd instcombine pass if sampleprofile pass is enabled.
Dehao Chen [Fri, 27 May 2016 16:14:35 +0000 (16:14 +0000)]
Add instcombine pass if sampleprofile pass is enabled.

Summary: Sample profile pass need to have instcombine pass. A related change is http://reviews.llvm.org/D17742. But we should not explicitly add dependency between to non-analysis passes. So we add the dependency here.

Reviewers: davidxl, dnovillo

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271010 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[msan] add a sentence about inline assembly
Kostya Serebryany [Fri, 27 May 2016 15:49:32 +0000 (15:49 +0000)]
[msan] add a sentence about inline assembly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271005 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OpenMP] Fix SEMA bug in the capture of global variables in template functions.
Samuel Antao [Fri, 27 May 2016 15:21:27 +0000 (15:21 +0000)]
[OpenMP] Fix SEMA bug in the capture of global variables in template functions.

Summary:
Target regions require globals to be captured. This patch fixes a bug exposed when that happens in a template function.

Reviewers: hfinkel, arpith-jacob, kkwli0, carlo.bertolli, ABataev

Subscribers: guansong, ABataev, cfe-commits, caomhin, fraggamuffin

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271001 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips] Compact branch policy setting.
Simon Dardis [Fri, 27 May 2016 15:13:31 +0000 (15:13 +0000)]
[mips] Compact branch policy setting.

This patch adds the commandline option -mcompact-branches={never,optimal,always),
which controls how LLVM generates compact branches for MIPSR6 targets. By default,
the compact branch policy is 'optimal' where LLVM will generate the most
appropriate branch for any situation. The 'never' and 'always' policy will disable
or always generate compact branches wherever possible respectfully.

Reviewers: dsanders, vkalintiris, atanasyan

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271000 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips] Kill 'support' for untested EABI.
Daniel Sanders [Fri, 27 May 2016 14:30:23 +0000 (14:30 +0000)]
[mips] Kill 'support' for untested EABI.

Summary:
There are no llvm backend tests* for EABI and no EABI buildbots. There were only
three clang tests, all of which checked that -mabi=eabi was passed to the
assembler.

*There is a single backend test that specifies EABI but it actually tests MIPS16.

Reviewers: atanasyan

Subscribers: emaste, sdardis, atanasyan, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270998 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoApply clang-tidy's misc-move-constructor-init throughout Clang.
Benjamin Kramer [Fri, 27 May 2016 14:27:13 +0000 (14:27 +0000)]
Apply clang-tidy's misc-move-constructor-init throughout Clang.

No functionality change intended, maybe a tiny performance improvement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270996 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTurn copies into references as suggested by clang-tidy's performance-unnecessary...
Benjamin Kramer [Fri, 27 May 2016 13:36:58 +0000 (13:36 +0000)]
Turn copies into references as suggested by clang-tidy's performance-unnecessary-copy-initialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270994 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Frontend] StringRefize and fix bad indentation.
Benjamin Kramer [Fri, 27 May 2016 12:52:19 +0000 (12:52 +0000)]
[Frontend] StringRefize and fix bad indentation.

NFC intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270991 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUpdate for following LLVM commit.
George Rimar [Fri, 27 May 2016 12:15:25 +0000 (12:15 +0000)]
Update for following LLVM commit.

It will be:
Recommit 270977 - [llvm-mc] - Teach llvm-mc to generate zlib styled compression sections.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270985 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips] Fold MipsTargetInfoBase subclasses into MipsTargetInfoBase and rename to MipsT...
Daniel Sanders [Fri, 27 May 2016 11:51:02 +0000 (11:51 +0000)]
[mips] Fold MipsTargetInfoBase subclasses into MipsTargetInfoBase and rename to MipsTargetInfo. NFC

Summary:
This unifies mips/mipsel and mips64/mips64el into a single class so that we can
later support O32 on mips64/mips64el and N32/N64 on mips/mipsel (when an
appropriate CPU selected).

Reviewers: atanasyan

Subscribers: atanasyan, jfb, cfe-commits, dschuff

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270984 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoConvert assert to static_assert. NFC.
Benjamin Kramer [Fri, 27 May 2016 11:48:53 +0000 (11:48 +0000)]
Convert assert to static_assert. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270983 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoclang-format: Allow splitting the line after /**/-comments.
Daniel Jasper [Fri, 27 May 2016 08:59:34 +0000 (08:59 +0000)]
clang-format: Allow splitting the line after /**/-comments.

While it might change the meaning of the comment in rare circumstances,
it is better than violating the column limit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270975 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MSVC2015] Fix mangling for static variables initialization guards
Dmitry Polukhin [Fri, 27 May 2016 08:52:34 +0000 (08:52 +0000)]
[MSVC2015] Fix mangling for static variables initialization guards

It seems that suffix '@4HA' was omitted for unknown reason. It is
non-cont non-volatile 'int' type of normal variable TSS.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270974 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[clang-format] moved unit tests related to replacements cleaner from FormatTest.cpp...
Eric Liu [Fri, 27 May 2016 08:20:02 +0000 (08:20 +0000)]
[clang-format] moved unit tests related to replacements cleaner from FormatTest.cpp to CleanUpTest.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270971 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512][Builtin] Fix palignr intrinsic for avx512vlbw. The immediate should not...
Craig Topper [Fri, 27 May 2016 06:59:39 +0000 (06:59 +0000)]
[AVX512][Builtin] Fix palignr intrinsic for avx512vlbw. The immediate should not be multiplied by 8.

The 512-bit version was fixed recently but this was missed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270970 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OPENMP] Fixed processing of '-fopenmp-version=' option and test.
Alexey Bataev [Fri, 27 May 2016 04:13:39 +0000 (04:13 +0000)]
[OPENMP] Fixed processing of '-fopenmp-version=' option and test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270962 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeGen] Don't crash when sizeof(long) != 4 for some intrins
David Majnemer [Fri, 27 May 2016 02:06:19 +0000 (02:06 +0000)]
[CodeGen] Don't crash when sizeof(long) != 4 for some intrins

_InterlockedIncrement and _InterlockedDecrement have 'long' in their
prototypes.  We assumed 'long' was the same size as an i32 which is
incorrect for other targets.

This fixes PR27892.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270953 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Intrin.h] Sort the __read[fg]s intrinsics
David Majnemer [Fri, 27 May 2016 02:06:14 +0000 (02:06 +0000)]
[Intrin.h] Sort the __read[fg]s intrinsics

No functional change is intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270952 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoOpenMPClause.h: Fix r270882. [-Wdocumentation]
NAKAMURA Takumi [Fri, 27 May 2016 00:15:11 +0000 (00:15 +0000)]
OpenMPClause.h: Fix r270882. [-Wdocumentation]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270940 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoProduce better pretty stack traces from crashes in template instantiation: add
Richard Smith [Thu, 26 May 2016 20:23:13 +0000 (20:23 +0000)]
Produce better pretty stack traces from crashes in template instantiation: add
pretty stack trace entries for all cases where we instantiate the definition of
something, and include the fully-qualified name with template arguments in the
name of the instantiated entity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270904 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRe-commit r270748 "clang-cl: Treat dllimport explicit template instantiation definiti...
Hans Wennborg [Thu, 26 May 2016 19:42:56 +0000 (19:42 +0000)]
Re-commit r270748 "clang-cl: Treat dllimport explicit template instantiation definitions as declarations (PR27810, PR27811)"

Also make explicit instantiation decls not apply to nested classes when
targeting MSVC. That dll attributes are not inherited by inner classes
might be the explanation for MSVC's behaviour here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270897 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AMDGPU] Remove individual debugger options + update features
Konstantin Zhuravlyov [Thu, 26 May 2016 19:36:39 +0000 (19:36 +0000)]
[AMDGPU] Remove individual debugger options + update features

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270895 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OpenMP] Codegen for target update directive.
Samuel Antao [Thu, 26 May 2016 18:30:22 +0000 (18:30 +0000)]
[OpenMP] Codegen for target update directive.

Summary: This patch implements the code generation for the `target update` directive. The implemntation relies on the logic already in place for target data standalone directives, i.e. target enter/exit data.

Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev

Subscribers: caomhin, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270886 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OpenMP] Parsing and sema support for the from clause
Samuel Antao [Thu, 26 May 2016 17:49:04 +0000 (17:49 +0000)]
[OpenMP] Parsing and sema support for the from clause

Summary:
The patch contains the parsing and sema support for the `from` clause.

Patch based on the original post by Kelvin Li.

Reviewers: hfinkel, carlo.bertolli, kkwli0, arpith-jacob, ABataev

Subscribers: caomhin, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270882 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OpenMP] Parsing and sema support for the to clause
Samuel Antao [Thu, 26 May 2016 17:39:58 +0000 (17:39 +0000)]
[OpenMP] Parsing and sema support for the to clause

Summary:
The patch contains the parsing and sema support for the `to` clause.

Patch based on the original post by Kelvin Li.

Reviewers: carlo.bertolli, hfinkel, kkwli0, arpith-jacob, ABataev

Subscribers: caomhin, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270880 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OpenMP] Parsing and sema support for target update directive
Samuel Antao [Thu, 26 May 2016 17:30:50 +0000 (17:30 +0000)]
[OpenMP] Parsing and sema support for target update directive

Summary:
This patch is to add parsing and sema support for `target update` directive. Support for the `to` and `from` clauses will be added by a different patch.  This patch also adds support for other clauses that are already implemented upstream and apply to `target update`, e.g. `device` and `if`.

This patch is based on the original post by Kelvin Li.

Reviewers: hfinkel, carlo.bertolli, kkwli0, arpith-jacob, ABataev

Subscribers: caomhin, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270878 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OpenMP] Add support for the 'private pointer' flag to signal variables captured...
Samuel Antao [Thu, 26 May 2016 16:53:38 +0000 (16:53 +0000)]
[OpenMP] Add support for the 'private pointer' flag to signal variables captured in target regions and used in first-private clauses.

Summary: If a variable is implicitly mapped (doesn't show in a map clause), the runtime library has to be informed if the corresponding capture shows up in first-private clause, so that the storage previously allocated in the device is used. This patch adds the support for that.

Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev

Subscribers: caomhin, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270870 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OpenMP] Adjust map type bits according to latest spec and use zero size array sectio...
Samuel Antao [Thu, 26 May 2016 16:48:10 +0000 (16:48 +0000)]
[OpenMP] Adjust map type bits according to latest spec and use zero size array sections for pointers.

Summary: This patch changes the bits used to specify the map types according to the latest version of the libomptarget document and add the support for zero size array section when pointers are being implicitly mapped. This completes the missing new 4.5 map semantics.

Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev

Subscribers: caomhin, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270868 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdding missing _mm512_castsi512_si256 intrinsic.
Michael Zuckerman [Thu, 26 May 2016 14:32:11 +0000 (14:32 +0000)]
Adding missing _mm512_castsi512_si256 intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270851 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Analyzer] Correct stack address escape diagnostic
Sean Eveson [Thu, 26 May 2016 14:02:17 +0000 (14:02 +0000)]
[Analyzer] Correct stack address escape diagnostic

Summary:
Leaking a stack address via a static variable refers to it in the diagnostic as a 'global'. This patch corrects the diagnostic for static variables.

Patch by Phil Camp, SN Systems

Reviewers: dcoughlin, zaks.anna

Subscribers: xazax.hun, cfe-commits

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

Patch by Phil Camp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270849 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix crash while parsing variable template with variadic template arguments
Olivier Goffart [Thu, 26 May 2016 12:55:34 +0000 (12:55 +0000)]
Fix crash while parsing variable template with variadic template arguments

It is only a crash if the compiler optimize for this!=nullptr because
LocalInstantiationScope::getPartiallySubstitutedPack checks if 'this' is null
(This is crashing when clang is compiled with GCC6)

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270845 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[driver][mips] Specify stdlib used in the tests explicitly
Simon Atanasyan [Thu, 26 May 2016 11:32:19 +0000 (11:32 +0000)]
[driver][mips] Specify stdlib used in the tests explicitly

That allows to pass the tests even if default stdlib is not libstdc++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270842 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OPENMP] Add option '-fopenmp-version=[31|40|45]' allowing choosing
Alexey Bataev [Thu, 26 May 2016 11:10:11 +0000 (11:10 +0000)]
[OPENMP] Add option '-fopenmp-version=[31|40|45]' allowing choosing
OpenMP version.

If '-fopenmp' option is provided '-fopenmp-version=' allows to control,
which version of OpenMP must be supported. Currently it affects only the
value of _OPENMP define.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270838 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][F16C] Improved f16c intrinsics checks
Simon Pilgrim [Thu, 26 May 2016 10:20:25 +0000 (10:20 +0000)]
[X86][F16C] Improved f16c intrinsics checks

Added checks for upper elements being zero'd in scalar conversions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270836 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MSVC] Support for __unaligned qualifier in functions
Andrey Bokhanko [Thu, 26 May 2016 10:06:01 +0000 (10:06 +0000)]
[MSVC] Support for __unaligned qualifier in functions

This implements support for MS-specific __unaligned qualifier in functions and
makes the following test case both compile and mangle correctly:

struct S {
    void f() __unaligned;
};
void S::f() __unaligned {
}

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270834 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX2] Improved checks for float/double mask generation for non-masked gathers
Simon Pilgrim [Thu, 26 May 2016 09:56:50 +0000 (09:56 +0000)]
[X86][AVX2] Improved checks for float/double mask generation for non-masked gathers

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270833 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix instrinsics names:
Michael Zuckerman [Thu, 26 May 2016 08:10:12 +0000 (08:10 +0000)]
Fix instrinsics names:
_mm128_cmp_ps_mask-->_mm_cmp_ps_mask
_mm128_mask_cmp_ps_mask-->_mm_mask_cmp_ps_mask
_mm128_cmp_pd_mask-->_mm_cmp_pd_mask
_mm128_mask_cmp_pd_mask-->_mm_mask_cmp_pd_mask

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270830 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Clang][AVX512][BUILTIN] Adding intrinsics for set1
Michael Zuckerman [Thu, 26 May 2016 06:54:52 +0000 (06:54 +0000)]
[Clang][AVX512][BUILTIN] Adding intrinsics for set1

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270825 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OPENMP] Set '_OPENMP' macro to '201511' value to reflect support for
Alexey Bataev [Thu, 26 May 2016 04:56:05 +0000 (04:56 +0000)]
[OPENMP] Set '_OPENMP' macro to '201511' value to reflect support for
OpenMP 4.5.

According to OpenMP 4.5 the _OPENMP macro name is defined to have the decimal value yyyymm where yyyy and mm are the year and month designations of the version of the OpenMP API that the implementation supports. Clang supports OpenMP 4.5 so updated value of _OPENMP macro to 201511.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270822 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDon't feed standard error to FileCheck.
Akira Hatanaka [Thu, 26 May 2016 02:32:10 +0000 (02:32 +0000)]
Don't feed standard error to FileCheck.

This is an attempt to fix the buildbot that started failing after
r270808.

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/13141

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270817 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ObjC] Remove _Atomic from return type and parameter type of
Akira Hatanaka [Thu, 26 May 2016 00:37:30 +0000 (00:37 +0000)]
[ObjC] Remove _Atomic from return type and parameter type of
objective-c properties.

This fixes an assert in CodeGen that fires when the getter and setter
functions for an objective-c property of type _Atomic(_Bool) are
synthesized.

rdar://problem/26322972

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270808 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Sema] Use the failure bits introduced by r270781.
George Burgess IV [Wed, 25 May 2016 22:38:36 +0000 (22:38 +0000)]
[Sema] Use the failure bits introduced by r270781.

r270781 introduced the ability to track whether or not we might have
had unmodeled side-effects during constant expression evaluation. This
patch makes the constexpr evaluator use that tracking.

Reviewed as a part of D18540.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270784 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Sema] Note when we encounter a problem in ExprConstant.
George Burgess IV [Wed, 25 May 2016 22:31:54 +0000 (22:31 +0000)]
[Sema] Note when we encounter a problem in ExprConstant.

Currently, the constexpr evaluator is very conservative about unmodeled
side-effects when we're evaluating an expression in a mode that allows
such side-effects.

This patch makes us note when we might have actually encountered an
unmodeled side-effect, which allows us to be more accurate when we know
an unmodeled side-effect couldn't have occurred.

This patch has been split into two commits; this one primarily
introduces the bits necessary to track whether we might have potentially
hit such a side-effect. The one that actually does the tracking (which
boils down to more or less a rename of keepEvaluatingAfterFailure to
noteFailure) is coming soon.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270781 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CGDebugInfo] Modify the preferred expression location for member calls.
Hal Finkel [Wed, 25 May 2016 22:08:27 +0000 (22:08 +0000)]
[CGDebugInfo] Modify the preferred expression location for member calls.

If the callee has a valid location (not all do), then use that. Otherwise, fall
back to the starting location. This makes sure that the debug info for calls
points to the call (not the start of the expression providing the object on
which the member function is being called).

For example, given this:

  f->foo()->bar();

we don't want both calls to point to the 'f', but rather to the 'foo()' and
the 'bar()'.

Fixes PR27567.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270775 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix rejects-valid on constexpr function that accesses a not-yet-defined 'extern
Richard Smith [Wed, 25 May 2016 22:06:25 +0000 (22:06 +0000)]
Fix rejects-valid on constexpr function that accesses a not-yet-defined 'extern
const' variable. That variable might be defined as 'constexpr', so we cannot
prove that a use of it could never be a constant expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270774 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd a loop's debug location to its llvm.loop metadata
Hal Finkel [Wed, 25 May 2016 21:53:24 +0000 (21:53 +0000)]
Add a loop's debug location to its llvm.loop metadata

Getting accurate locations for loops is important, because those locations are
used by the frontend to generate optimization remarks. Currently, optimization
remarks for loops often appear on the wrong line, often the first line of the
loop body instead of the loop itself. This is confusing because that line might
itself be another loop, or might be somewhere else completely if the body was
an inlined function call. This happens because of the way we find the loop's
starting location. First, we look for a preheader, and if we find one, and its
terminator has a debug location, then we use that. Otherwise, we look for a
location on an instruction in the loop header.

The fallback heuristic is not bad, but will almost always find the beginning of
the body, and not the loop statement itself. The preheader location search
often fails because there's often not a preheader, and even when there is a
preheader, depending on how it was formed, it sometimes carries the location of
some preceeding code.

I don't see any good theoretical way to fix this problem. On the other hand,
this seems like a straightforward solution: Put the debug location in the
loop's llvm.loop metadata. When emitting debug information, this commit causes
us to add the debug location as an operand to each loop's llvm.loop metadata.
Thus, we now generate this metadata for all loops (not just loops with
optimization hints) when we're otherwise generating debug information.

The remark test case changes depend on the companion LLVM commit r270771.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270772 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert r270748 "clang-cl: Treat dllimport explicit template instantiation definitions...
Hans Wennborg [Wed, 25 May 2016 20:49:14 +0000 (20:49 +0000)]
Revert r270748 "clang-cl: Treat dllimport explicit template instantiation definitions as declarations (PR27810, PR27811)"

It seems to have broken the sanitizer-windows bot.
Reverting while investigating.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270754 91177308-0d34-0410-b5e6-96231b3b80d8