Граф коммитов

60145 Коммитов

Автор SHA1 Сообщение Дата
Craig Topper c64147ff0f Use range-based for loop to avoid the need for calculating an array size. NFC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254282 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30 03:11:12 +00:00
Craig Topper 9e943be2fc Use std::begin() and std::end() instead of doing the same manually. NFC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254281 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30 03:11:10 +00:00
Craig Topper cf7881a99f [X86] _mm256_permutevar8x32_ps should take an integer vector for its shuffle index input.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254270 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 22:53:32 +00:00
Simon Pilgrim 00b4173bc3 [X86][SSE2] Added SSE2 IR + assembly codegen builtin tests
Improved tests as discussed in PR24580

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254262 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 20:23:00 +00:00
NAKAMURA Takumi 19557be46c clang/test/CodeGen/arm-v8.1a-neon-intrinsics.c REQUIRES both arm and aarch64.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254252 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 13:43:05 +00:00
Alexandros Lamprineas 002268bdf5 ARM v8.1a adds Advanced SIMD instructions for Rounding Double Multiply
Add/Subtract.

Add missing tests that accidentally were not committed in rL254250.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254251 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 10:53:28 +00:00
Alexandros Lamprineas 3b1c04bd7b ARM v8.1a adds Advanced SIMD instructions for Rounding Double Multiply
Add/Subtract.

The following instructions are added to AArch32 instruction set:

- VQRDMLAH: Vector Saturating Rounding Doubling Multiply Accumulate
            Returning High Half
- VQRDMLSH: Vector Saturating Rounding Doubling Multiply Subtract
            Returning High Half

The following instructions are added to AArch64 instruction set:

- SQRDMLAH: Signed Saturating Rounding Doubling Multiply Accumulate
            Returning High Half
- SQRDMLSH: Signed Saturating Rounding Doubling Multiply Subtract
            Returning High Half

This patch adds intrinsic and ACLE macro support for these instructions,
as well as corresponding tests.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254250 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 10:43:59 +00:00
Craig Topper 967346a231 [X86] Remove temporary variables from intrinsic macros. NFC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254247 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 06:50:33 +00:00
Daniel Sanders ff742a73b5 Fixed default label in fully covered switch warning that was introduced in r254203.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254208 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-27 19:49:24 +00:00
Kelvin Li 0fafce93c6 [OpenMP] Parsing and sema support for thread_limit clause.
http://reviews.llvm.org/D15029


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254207 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-27 18:47:36 +00:00
Artyom Skrobov 0e7a031ee7 int function without a return statement is invalid C++.
Changing the return type to void.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254206 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-27 18:10:49 +00:00
Daniel Sanders 91f593226b [mips] Interrupt attribute support.
Summary: This patch adds support for the interrupt attribute for mips32r2+.

Patch by Simon Dardis.

Reviewers: dsanders, aaron.ballman

Subscribers: aaron.ballman, cfe-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254205 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-27 18:03:44 +00:00
Daniel Sanders b4dacc31f3 Revert r254203: [mips] Interrupt attribute support.
I forgot to credit the author.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254204 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-27 18:00:36 +00:00
Daniel Sanders 16e3a3a943 [mips] Interrupt attribute support.
Summary: This patch adds support for the interrupt attribute for mips32r2+.

Reviewers: dsanders, aaron.ballman

Subscribers: aaron.ballman, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254203 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-27 17:39:20 +00:00
Joerg Sonnenberger 4f0940af85 Revert Sparc and SparcV9 to external assembler. Now that the CPU
handling is corrected, the primary reason for forcing IAS as default is
gone and the remaining issues are still somewhat problematic in common
situations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254199 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-27 13:16:33 +00:00
Andrey Bokhanko a797c990d1 [x86] Exclusion of incorrect include headers paths for MCU target
Exclusion of /usr/include and /usr/local/include headers paths for MCU target.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254195 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-27 12:18:22 +00:00
Pierre Gousseau bbdf08fb39 Test commit
Remove tabs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254181 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-26 22:08:58 +00:00
Justin Bogner 87a17a30e1 docs: Remove references to the long-defunct LLVM_USED_LIBS
LLVM_USED_LIBS hasn't done anything since 2012, stop telling people to
set it in the docs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254173 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-26 19:52:24 +00:00
Oliver Stannard a5fa2dc25d [AArch64] Add command-line options for Statistical Profiling Extension
This adds the "+profile" and +noprofile" suffixes for the -march and
-mcpu options, to allow enabling or disabling the options Statistical
Profiling Extension to ARMv8.2-A.

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254161 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-26 15:38:54 +00:00
Oliver Stannard 82865664c6 [AArch64] Add command-line options for ARMv8.2-A
This adds new values for the -march option (armv8.2a and armv8.2-a,
which are aliases of each other), and new suffixes for the -march and
-mcpu options (+fp16 and +nofp16), to allow targeting the ARMv8.2-A
architecture and it's optional half-precision floating-point extension.

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254160 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-26 15:36:42 +00:00
Alexander Musman f4db326a17 Fix for merging decls in pragma weak
Calling CheckFunctionDeclaration so that 2 decls for the 'weak' are merged.
Differential Revision: http://reviews.llvm.org/D13048



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254143 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-26 09:34:30 +00:00
Alexey Bataev 3651ab647d [OPENMP 4.5] Fixed rules for 'ordered' clause.
According to OpenMP 4.5 the parameter of 'ordered' clause must be greater than or equal to the parameter of 'collapse' clause. Patch adds this rule.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254141 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-26 07:50:39 +00:00
Craig Topper 63199306ad [Diagnostics] Call setMapping on the correct diagnostic states in a few places. GetCurDiagState() was being used when it shouldn't be.
I spotted this by inspection in the for loop that wasn't using its iterator and was just acting on the current state repeatedly.

This appears to have been introduced as a copy and paste bug in r140763 over 4 years ago.

I have no idea how to test this. I just went back to the original commit and tried to use the variables it was using before that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254134 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-26 05:51:54 +00:00
Craig Topper 5a36f5afc3 Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254133 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-26 05:10:07 +00:00
Richard Smith 31bddffcac Update reference to final TM TS spec.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254123 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-26 02:23:21 +00:00
Richard Smith 8677278cfa P0002R1: increment on expressions of type bool is no longer allowed in C++1z.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254122 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-26 02:16:37 +00:00
Richard Smith 59763b390a [modules] Refactor handling of -fmodules-embed-*. Track this properly rather
than reusing the "overridden buffer" mechanism. This will allow us to make
embedded files and overridden files behave differently in future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254121 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-26 02:04:16 +00:00
Martell Malone d788d6ae0c Driver: protect from empty -L args
Differential Revision: http://reviews.llvm.org/D12466

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254117 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-26 01:02:07 +00:00
Devin Coughlin fbd1f82d27 [analyzer] Add tests for generalized lambda capture (C++14). NFC.
Add tests demonstrating that the analyzer supports generalized lambda capture. This
support falls out naturally from the work Gábor Horváth did adding C++11 lambdas to
the analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254114 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-26 00:11:23 +00:00
Devin Coughlin 2aed0cbe73 [analyzer] Include block capture copy expressions in the CFG.
This prevents spurious dead store warnings when a C++ lambda is casted to a block.

I've also added several tests documenting our still-incomplete support for lambda-to-block
casts.

rdar://problem/22236293

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254107 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-25 22:35:37 +00:00
Richard Smith 87bfff6664 P0001R1: 'register' storage class specifier is no longer permitted in C++1z.
We will still allow it in system headers, in macros from system headers, when
combined with an 'asm' label, and under the flag -Wno-register.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254097 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-25 21:34:21 +00:00
Richard Smith fe24b12878 Stop using SFINAE to detect whether a derived-class override of Traverse* can
take a queue; some supported versions of GCC believe that this substitution
failure is an error. Instead, use a partial specialization to detect the type
of a pointer to the corresponding member. This is less general, but good enough
for our uses.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254083 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-25 19:33:20 +00:00
Alexey Bataev 0a368f60e7 [MSVC] 'property' with an empty array in array subscript expression.
MSVC supports 'property' attribute and allows to apply it to the declaration of an empty array in a class or structure definition.
For example:
```
__declspec(property(get=GetX, put=PutX)) int x[];
```
The above statement indicates that x[] can be used with one or more array indices. In this case, i=p->x[a][b] will be turned into i=p->GetX(a, b), and p->x[a][b] = i will be turned into p->PutX(a, b, i);
Differential Revision: http://reviews.llvm.org/D13336


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254067 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-25 12:01:00 +00:00
Alexey Bataev 1b0e2ec43d [X86] Support for C calling convention only for MCU target.
For MCU only C calling convention is allowed, all other calling conventions are not supported.
Differential Revision: http://reviews.llvm.org/D14864


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254063 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-25 09:24:26 +00:00
Richard Smith 711fc0e26d Fix typo that was being SFINAE'd away (and apparently GCC 4.7.2 rejects-valid on this).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254053 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-25 02:41:42 +00:00
Richard Smith 0ca76d0c9c Teach RAV to pass its DataRecursionQueue to derived classes if they ask for it,
to allow them to explicitly opt into data recursion despite having overridden
Traverse*Stmt or Traverse*Expr. Use this to reintroduce data recursion to the
one place that lost it when DataRecursiveASTVisitor was removed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254041 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-24 23:50:47 +00:00
Kelvin Li 1854a566a3 [OpenMP] Parsing and sema support for num_teams clause
http://reviews.llvm.org/D14802


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254019 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-24 20:50:12 +00:00
Yaron Keren 80803f026b Replace [=] lambda capture with [&] per David Blaikieþ suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254013 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-24 20:18:24 +00:00
Devin Coughlin 4fe7f1bdf4 [analyzer] Pass value expression for inlined defensive checks when binding null to nonnull.
The nullability checker was not suppressing false positives resulting from
inlined defensive checks when null was bound to a nonnull variable because it
was passing the entire bind statement rather than the value expression to
trackNullOrUndefValue().

This commit changes that checker to synactically match on the bind statement to
extract the value expression so it can be passed to trackNullOrUndefValue().

rdar://problem/23575439

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254007 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-24 19:15:11 +00:00
Nirav Dave 449c5870ac Fix rewrite of reserved library name in case of -nodefaultlibs
The Driver only checked if nostdlib was set when deciding to add
reserved_lib_stdcxx, but as nostdlib is always exactly nodefaultlibs and
nostartfiles we should be checking one (clearly nodefaultlibs in the
case) as well. This appears to be the only such instance of this in the
codebase.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253990 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-24 16:07:21 +00:00
Alexey Bataev 8c54870799 [OPENMP] Fix crash on codegen for 'task' directive with no shared variables.
If 'task' region does not have shared variables codegen could crash on calculation of size of list of shared variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253977 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-24 13:01:44 +00:00
Richard Smith 89a8ab58e9 Reduce the stack usage per recursive step when RecursiveASTVisitor cannot perform data recursion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253958 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-24 07:13:06 +00:00
Richard Smith 8100fed41b [modules] Add -cc1 flag -fmodules-embed-all-files.
This flag causes all files that were read by the compilation to be embedded
into a produced module file. This is useful for distributed build systems that
use an include scanning system to determine which files are "needed" by a
compilation, and only provide those files to remote compilation workers. Since
using a module can require any file that is part of that module (or anything it
transitively includes), files that are not found by an include scanner can be
required in a regular build using explicit modules. With this flag, only files
that are actually referenced by transitively-#included files are required to be
present on the build machine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253950 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-24 04:22:21 +00:00
Richard Smith e475fd3abe Remove DataRecursiveASTVisitor; it no longer serves any purpose, since it's just an alias for RecursiveASTVisitor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253949 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-24 03:55:01 +00:00
Richard Smith 89d5b46c21 Use data recursion in RecursiveASTVisitor when traversing Stmt and Expr nodes.
When RAV traverses a Stmt or Expr node, if the corresponding Traverse*
functions have not been overridden, it will now use data recursion to walk
those nodes. We arrange this to be an unobservable optimization to RAV
subclasses, and to gracefully degrade as parts of the visitation are overridden
with functions that might observe the visitation.

For instance, if an RAV subclass overrides TraverseUnaryNot, we will ensure
that there are real recursive stack frames for those traversals, but we'll
use data recursion for all other traversals.

This removes the need for DataRecursiveASTVisitor, and for the
'shouldUseDataRecursionFor' extension point, both of which are removed by this
change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253948 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-24 03:09:01 +00:00
Artem Belevich 547deb2089 Do not attempt to include CUDA headers during the test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253947 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-24 02:45:55 +00:00
Richard Smith 242f3f660f [coroutines] Build a CoroutineBodyStmt when finishing parsing a coroutine, and form the initial_suspend, final_suspend, and get_return_object calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253946 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-24 02:34:39 +00:00
NAKAMURA Takumi d03d2e5099 CodeGenFunction.h: Prune a \param in r253926. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253938 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 23:38:13 +00:00
Chris Bieneman 1ec22fd382 NFC. Fixing my consistently incorrect spelling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253937 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 23:34:13 +00:00
NAKAMURA Takumi c3a196b739 clang-c/Index.h: Move \brief. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253932 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 22:51:26 +00:00