summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Retain an expression pack expansion when the parameter pack expansion code asksRichard Smith2014-06-061-2/+27
| | | | | | us to. llvm-svn: 210355
* PR14841: If partial substitution of explicitly-specified template argumentsRichard Smith2014-06-061-0/+11
| | | | | | | | results in a template having too many arguments, but all the trailing arguments are packs, that's OK if we have a partial pack substitution: the trailing pack expansions may end up empty. llvm-svn: 210350
* [PPC64LE] Implement little-endian semantics for vec_pack familyBill Schmidt2014-06-061-0/+147
| | | | | | | | | | | | | | | | | | | | | | | | | The PowerPC vector-pack instructions are defined architecturally with a big-endian bias, in that the vector element numbering is assumed to be "left to right" regardless of whether the processor is in big-endian or little-endian mode. This definition is unnatural for little-endian code generation. To facilitate ease of porting, the vec_pack and related interfaces are designed to use natural element ordering, so that elements are numbered according to little-endian design principles when code is generated for a little-endian target. The vec_pack calls are implemented as calls to vec_perm, specifying selection of the odd-numbered vector elements. For little endian, this means the odd-numbered elements counting from the right end of the register. Since the underlying instructions count from the left end, we must instead select the even-numbered vector elements for little endian to achieve the desired semantics. The correctness of this code is tested by the new pack.c test added in a previous patch. I plan to later make the existing ppc32 Altivec compile-time tests work for ppc64 and ppc64le as well. llvm-svn: 210340
* Replacing r210333 with an improved solution; we should never reach this code ↵Aaron Ballman2014-06-061-2/+3
| | | | | | with any other loop hint options. llvm-svn: 210338
* [PPC64LE] Implement little-endian semantics for vec_mul[eo]Bill Schmidt2014-06-061-0/+67
| | | | | | | | | | | | | | | | | | | | | | | The PowerPC vector-multiply-even and vector-multiply-odd instructions are defined architecturally with a big-endian bias, in that the vector element numbering is assumed to be "left to right" regardless of whether the processor is in big-endian or little-endian mode. This definition is unnatural for little-endian code generation. To facilitate ease of porting, the vec_mule and vec_mulo interfacs are designed to use natural element ordering, so that elements are numbered according to little-endian design principles when code is generated for a little-endian target. The desired semantics can be achieved by using the opposite instruction for little-endian mode. That is, when a call to vec_mule appears in the code, a vector-multiply-odd is generated, and when a call to vec_mulo appears in the code, a vector-multiply-even is generated. The correctness of this code is tested by the new mult-even-odd.c test added in a previous patch. I plan to later make the existing ppc32 Altivec compile-time tests work for ppc64 and ppc64le as well. llvm-svn: 210337
* clang-format: Fix incorrect indentation.Daniel Jasper2014-06-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Before (JavaScript example, but can extend to other languages): return { a: 'E', b: function() { return function() { f(); // This is wrong. }; } }; After: return { a: 'E', b: function() { return function() { f(); // This is better. }; } }; llvm-svn: 210334
* Quieting a false-positive which was causing the sanitizer bots to go red.Aaron Ballman2014-06-061-1/+1
| | | | llvm-svn: 210333
* Adding a new #pragma for the vectorize and interleave optimization hints.Aaron Ballman2014-06-066-78/+552
| | | | | | Patch thanks to Tyler Nowicki! llvm-svn: 210330
* Fix typosAlp Toker2014-06-063-8/+8
| | | | llvm-svn: 210328
* Remove an unused variableTimur Iskhodzhanov2014-06-061-2/+0
| | | | llvm-svn: 210324
* Revert "Revert "Devise a package-private means to determine the LLVM version ↵Alp Toker2014-06-062-5/+4
| | | | | | | | | | | string"" We probably just need to touch LLVM's configure this time to work around the totally inadequate Makefile build server integration. This reverts commit r210314. llvm-svn: 210320
* Revert "Devise a package-private means to determine the LLVM version string"Alp Toker2014-06-062-4/+5
| | | | | | | | This didn't work out on the build servers. Investigating This reverts commit r210313. llvm-svn: 210314
* Devise a package-private means to determine the LLVM version stringAlp Toker2014-06-062-5/+4
| | | | | | | | | | This will unbreak clang vendor builds as a follow-up to r210238, now that we can't poke into LLVM's private config.h (nor should the string be exposed by llvm-config.h). This hopefully removes for good the last include of LLVM's config.h. llvm-svn: 210313
* PR11306 - Variadic template fix-it suggestion. Recover from misplaced or ↵Nikola Smiljanic2014-06-063-21/+47
| | | | | | redundant ellipsis in parameter pack. llvm-svn: 210304
* PR19936: Fix a really dumb bug where we would profile dependent operator* ↵Richard Smith2014-06-051-6/+6
| | | | | | expressions incorrectly. llvm-svn: 210296
* Remove old proposal noticesAlp Toker2014-06-051-3/+0
| | | | | | Let's just go ahead and assume the answer was 'I do' llvm-svn: 210295
* Provide fallback locations for backend remarksAlp Toker2014-06-051-8/+15
| | | | | | | | | | | | Instead of disembodied diagnostics when debug info is disabled it's now possible to identify the associated function's location in order to provide some amount of of context. We use the definition's body right brace location to differentiate the fallback from diagnostics that genuinely relate to the function declaration itself (a convention also used by gcc). llvm-svn: 210294
* Implement -Wframe-larger-than backend diagnosticAlp Toker2014-06-058-56/+94
| | | | | | | | | | | | | | | | | | Add driver and frontend support for the GCC -Wframe-larger-than=bytes warning. This is the first GCC-compatible backend diagnostic built around LLVM's reporting feature. This commit adds infrastructure to perform reverse lookup from mangled names emitted after LLVM IR generation. We use that to resolve precise locations and originating AST functions, lambdas or block declarations to produce seamless codegen-guided diagnostics. An associated change, StringMap now maintains unique mangled name strings instead of allocating copies. This is a net memory saving in C++ and a small hit for C where we no longer reuse IdentifierInfo storage, pending further optimisation. llvm-svn: 210293
* When an inline-asm diagnostic is reported by the backend, report it with theJoey Gouly2014-06-051-6/+17
| | | | | | | | correct severity. Previously all inline-asm diagnostics were reported as errors. llvm-svn: 210286
* Mangle predefined string constants names to merge them at link-timeAlexey Samsonov2014-06-051-30/+6
| | | | | | | | | | | | | | | | | | | | | Summary: This change generalizes the code used to create global LLVM variables referencing predefined strings (e.g. __FUNCTION__): now it just calls GetAddrOfConstantStringFromLiteral method. As a result, global variables for these predefined strings may get mangled names and linkonce_odr linkage. Fix the test accordingly. Test Plan: clang regression tests Reviewers: majnemer Reviewed By: majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4023 llvm-svn: 210284
* Cleanup, and always create a DecltypeType for a decltype expression, ratherRichard Smith2014-06-051-21/+16
| | | | | | | than omitting it the first time we see a decltype type with a particular expression. llvm-svn: 210283
* [PPC64LE] Implement little-endian semantics for vec_permBill Schmidt2014-06-051-21/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PowerPC vperm (vector permute) instruction is defined architecturally with a big-endian bias, in that the two input vectors are assumed to be concatenated "left to right" and the elements of the combined input vector are assumed to be numbered from "left to right" (i.e., with element 0 referencing the high-order element). This definition is unnatural for little-endian code generation. To facilitate ease of porting, the vec_perm interface is designed to use natural element ordering, so that elements are numbered according to little-endian design principles when code is generated for a little-endian target. The desired semantics can be achieved with the vperm instruction provided that the two input vector registers are reversed, and the permute control vector is complemented. The complementing is performed using an xor with a vector containing all one bits. Only the rightmost 5 bits of each element of the permute control vector are relevant, so it would be possible to complement the vector with respect to a <16xi8> vector containing all 31s. However, when the permute control vector is not a constant, using 255 instead has the advantage that the vec_xor can be recognized during code generation as a vnor instruction. (Power8 introduces a vnand instruction which could alternatively be generated.) The correctness of this code is tested by the new perm.c test added in a previous patch. I plan to later make the existing ppc32 Altivec compile-time tests work for ppc64 and ppc64le as well. llvm-svn: 210279
* Add hasLocalStorage/hasGlobalStorage matchers.Samuel Benzaquen2014-06-051-0/+2
| | | | | | | | | | | | | | Summary: Add hasLocalStorage/hasGlobalStorage matchers for VarDecl nodes. Update the doc. Also add them to the dynamic registry. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D4034 llvm-svn: 210278
* Add pointer types to global named registerRenato Golin2014-06-052-5/+29
| | | | | | | | | | This patch adds support for pointer types in global named registers variables. It'll be lowered as a pair of read/write_register and inttoptr/ptrtoint calls. Also adds some early checks on types on SemaDecl to avoid the assert. Tests changed accordingly. (PR19837) llvm-svn: 210274
* [mips] Add macros _MIPS_ISA and __mips_isa_rev (same expansion as defined by ↵Matheus Almeida2014-06-051-0/+15
| | | | | | | | | | | | | | GCC). Summary: The Linux Kernel is one example of a piece of software that relies on them. Reviewers: atanasyan Reviewed By: atanasyan Differential Revision: http://reviews.llvm.org/D3756 llvm-svn: 210270
* Fix driver warning about -pthread on Android.Evgeniy Stepanov2014-06-051-3/+3
| | | | | | -pthread is no-op on Android. Suppress the unused argument warning. llvm-svn: 210253
* Fix driver warning about -shared-libasan on Android.Evgeniy Stepanov2014-06-051-2/+2
| | | | | | | Asan runtime library is always shared on Android, and -shared-libasan is no-op. Suppress the unused argument warning. llvm-svn: 210252
* XCore target: Fix 'typestring' binding qualifier to the array and not the typeRobert Lytton2014-06-051-6/+12
| | | | | | Differential Revision: http://reviews.llvm.org/D3949 llvm-svn: 210250
* Changing this line of code back to the way it was before Alp's config.h ↵Puyan Lotfi2014-06-051-0/+1
| | | | | | | | | clean up changes. I've already spoken to Alp and he signed off on making this one change, so that our buildbots go green in the short term. llvm-svn: 210238
* Bugfix: don't assert if someone manages to declare an operator new/delete ↵Richard Smith2014-06-051-2/+3
| | | | | | template before the builtin operator new/delete. llvm-svn: 210230
* [ubsan] Don't add a --dynamic-list for ubsan symbols when building a sharedRichard Smith2014-06-041-2/+8
| | | | | | | | | library. That results in the linker resolving all references to weak symbols in the DSO to the definition from within that DSO. Ironically, this rarely causes observable problems, except that it causes ubsan's own dynamic type check to spuriously fail (because we fail to properly merge type_info object names). llvm-svn: 210220
* Formatting cleanup.Richard Smith2014-06-041-10/+9
| | | | llvm-svn: 210219
* Don't dynamically initialize dllimport vars (PR19933)Hans Wennborg2014-06-041-0/+6
| | | | | | | | They should be initialized when they're exported. Differential Revision: http://reviews.llvm.org/D4020 llvm-svn: 210217
* Remove the overload of GetAddrOfConstantString methodAlexey Samsonov2014-06-043-41/+11
| | | | llvm-svn: 210214
* Refactor and generalize GetAddrOfConstantString and ↵Alexey Samsonov2014-06-042-95/+87
| | | | | | | | | | | | | GetAddrOfConstantStringFromLiteral. Share mode code between these functions and re-structure them in a way which shows how similar they actually are. The latter function works well with literals of multi-byte chars and does a GlobalVariable name mangling (if global strings are non-writable). No functionality change. llvm-svn: 210212
* This cast is not necessary any more (llvm api change).Rafael Espindola2014-06-041-1/+1
| | | | llvm-svn: 210206
* Update for llvm api change.Rafael Espindola2014-06-043-4/+4
| | | | llvm-svn: 210204
* MS-ABI: Mangle empty template parameter packs correctlyDavid Majnemer2014-06-041-4/+9
| | | | | | Tested for compatibility with VS2013. llvm-svn: 210198
* MS-ABI: Implement user defined literalsDavid Majnemer2014-06-041-5/+2
| | | | | | | | | Straightforward implementation of UDLs, it's compatible with VS "14". This nearly completes our implementation of C++ name mangling for the MS-ABI. llvm-svn: 210197
* [OPENMP] Parsing/Sema for OMPLasprivateClause.Alexander Musman2014-06-049-6/+267
| | | | | | Parsing this clause, allowing it on directive ‘omp simd’ and semantic checks. llvm-svn: 210184
* clang-format: Leave empty lines within UnwrappedLines.Daniel Jasper2014-06-042-4/+4
| | | | | | | | These are commonly used to structure things like enums or long braced lists. There doesn't seem to be a good reason to have the behavior in such structures be different from the behavior between statements. llvm-svn: 210183
* [OPENMP] Small comment and reformatting fixes.Alexander Musman2014-06-042-79/+68
| | | | | | | | | Fix post-commit review comments by Carlo Bertolli for commit r209660 - OMP collapse clause. Re-formatted TransformOMP* functions in TreeTransform.h with clang-format. llvm-svn: 210169
* Remove the last remaining llvm/Config/config.h includesAlp Toker2014-06-046-12/+6
| | | | | | | | | | | | This corrects long-standing misuses of LLVM's internal config.h. In most cases the public llvm-config.h header was intended and we can now remove the old hacks thanks to LLVM r210144. The config.h header is private, won't be installed and should no longer be included by clang or other modules. llvm-svn: 210145
* Downgrade "definition of dllimport static field" error to warning for class ↵Hans Wennborg2014-06-041-2/+11
| | | | | | | | | | | | | | | | | | | templates (PR19902) This allows us to compile the following kind of code, which occurs in MSVC headers: template <typename> struct S { __declspec(dllimport) static int x; }; template <typename T> int S<T>::x; The definition works similarly to a dllimport inline function definition and gets available_externally linkage. Differential Revision: http://reviews.llvm.org/D3998 llvm-svn: 210141
* Add __builtin_operator_new and __builtin_operator_delete, which act like callsRichard Smith2014-06-034-2/+43
| | | | | | | to the normal non-placement ::operator new and ::operator delete, but allow optimizations like new-expressions and delete-expressions do. llvm-svn: 210137
* Fix leak from r210059Alp Toker2014-06-032-1/+7
| | | | | | | Also revert r210096 which temporarily disabled the test while this was being investigated. llvm-svn: 210115
* clang-format: Refactor indentation behavior for multiple nested blocks.Daniel Jasper2014-06-034-33/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a few oddities when formatting multiple nested JavaScript blocks, e.g.: Before: promise.then( function success() { doFoo(); doBar(); }, [], function error() { doFoo(); doBaz(); }); promise.then([], function success() { doFoo(); doBar(); }, function error() { doFoo(); doBaz(); }); After: promise.then( function success() { doFoo(); doBar(); }, [], function error() { doFoo(); doBaz(); }); promise.then([], function success() { doFoo(); doBar(); }, function error() { doFoo(); doBaz(); }); llvm-svn: 210097
* [OPENMP] Loop canonical form analysis (Sema)Alexander Musman2014-06-035-18/+515
| | | | | | | | | This patch implements semantic analysis to make sure that the loop is in OpenMP canonical form. This is the form required for 'omp simd', 'omp for' and other loop pragmas. Differential revision: http://reviews.llvm.org/D3778 llvm-svn: 210095
* Remove incorrect assertion.Richard Smith2014-06-031-4/+3
| | | | llvm-svn: 210092
* Implement DR990 and DR1070. Aggregate initialization initializes uninitializedRichard Smith2014-06-032-84/+121
| | | | | | | | | elements from {}, rather than value-initializing them. This permits calling an initializer-list constructor or constructing a std::initializer_list object. (It would also permit initializing a const reference or rvalue reference if that weren't explicitly prohibited by other rules.) llvm-svn: 210091
OpenPOWER on IntegriCloud