summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Add doxygen comments to emmintrin.h's intrinsics.Ekaterina Romanova2016-07-221-0/+769
| | | | | | | | | | | | Only around 50% of the intrinsics in this file are documented now. The patches for the rest of the intrisics in this file will be send out later. The doxygen comments are automatically generated based on Sony's intrinsics docu ment. I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream. This patch was internally reviewed by Paul Robinson. llvm-svn: 276499
* P0217R3: Parsing support and framework for AST representation of C++1zRichard Smith2016-07-2215-31/+445
| | | | | | | | | | | decomposition declarations. There are a couple of things in the wording that seem strange here: decomposition declarations are permitted at namespace scope (which we partially support here) and they are permitted as the declaration in a template (which we reject). llvm-svn: 276492
* [Profile] Enable profile merging with -fprofile-generat[=<dir>]Xinliang David Li2016-07-222-2/+2
| | | | | | | This patch enables raw profile merging for this option which is the new intended behavior. llvm-svn: 276484
* [modules] Teach the ASTWriter to ignore mutations coming from the ASTReader.Vassil Vassilev2016-07-223-10/+23
| | | | | | | | | | | | | | | Processing update records (and loading a module, in general) might trigger unexpected calls to the ASTWriter (being a mutation listener). Now we have a mechanism to suppress those calls to the ASTWriter but notify other possible mutation listeners. Fixes https://llvm.org/bugs/show_bug.cgi?id=28332 Patch by Cristina Cristescu and me. Reviewed by Richard Smith (D21800). llvm-svn: 276473
* Add .rgba syntax extension to ext_vector_type typesPirama Arumuga Nainar2016-07-222-3/+34
| | | | | | | | | | | | | | | | | | Summary: This patch enables .rgba accessors to ext_vector_type types and adds tests for syntax validation and code generation. 'a' and 'b' can appear either in the point access mode or the numeric access mode (for indices 10 and 11). To disambiguate between the two usages, the accessor type is explicitly passed to relevant methods. Reviewers: rsmith Subscribers: Anastasia, bader, srhines, cfe-commits Differential Revision: http://reviews.llvm.org/D20602 llvm-svn: 276455
* Clang changes for overloading invariant.start and end intrinsicsAnna Thomas2016-07-221-1/+3
| | | | | | | | | | | | | | | | | | | | This change depends on the corresponding LLVM change at: https://reviews.llvm.org/D22519 The llvm.invariant.start and llvm.invariant.end intrinsics currently support specifying invariant memory objects only in the default address space. With this LLVM change, these intrinsics are overloaded for any adddress space for memory objects and we can use these llvm invariant intrinsics in non-default address spaces. Example: llvm.invariant.start.p1i8(i64 4, i8 addrspace(1)* %ptr) This overloaded intrinsic is needed for representing final or invariant memory in managed languages. llvm-svn: 276448
* test commit. update comment grammatically. NFCAnna Thomas2016-07-221-1/+1
| | | | llvm-svn: 276425
* [X86][AVX] Added support for lowering to VBROADCASTF128/VBROADCASTI128 with ↵Simon Pilgrim2016-07-221-0/+27
| | | | | | | | | | generic IR As discussed on D22460, I've updated the vbroadcastf128 pd256/ps256 builtins to map directly to generic IR - load+splat a 128-bit vector to both lanes of a 256-bit vector. Fix for PR28657. llvm-svn: 276417
* [analyzer] Add checker modeling potential C++ self-assignmentDevin Coughlin2016-07-215-3/+125
| | | | | | | | | | | | | | | | | | | | | This checker checks copy and move assignment operators whether they are protected against self-assignment. Since C++ core guidelines discourages explicit checking for `&rhs==this` in general we take a different approach: in top-frame analysis we branch the exploded graph for two cases, where &rhs==this and &rhs!=this and let existing checkers (e.g. unix.Malloc) do the rest of the work. It is important that we check all copy and move assignment operator in top frame even if we checked them already since self-assignments may happen undetected even in the same translation unit (e.g. using random indices for an array what may or may not be the same). This reapplies r275820 after fixing a string-lifetime issue discovered by the bots. A patch by Ádám Balogh! Differential Revision: https://reviews.llvm.org/D19311 llvm-svn: 276365
* Reverting r275115 which caused PR28634.Wolfgang Pieb2016-07-211-13/+1
| | | | | | | When empty (forwarding) basic blocks that are referenced by user labels are removed, incorrect code may be generated. llvm-svn: 276361
* [Sema] Handle errors during rewriteBuiltinFunctionDeclDavid Majnemer2016-07-211-1/+5
| | | | | | | | | | rewriteBuiltinFunctionDecl can encounter errors when performing DefaultFunctionArrayLvalueConversion. These errors were not handled which led to a null pointer dereference. This fixes PR28651. llvm-svn: 276352
* [CodeGen] Fix a crash when constant folding switch statementErik Pilkington2016-07-211-0/+8
| | | | | | Differential revision: https://reviews.llvm.org/D22542 llvm-svn: 276350
* Reroll "Include unreferenced nested types in member list only for CodeView"Adrian McCarthy2016-07-212-3/+20
| | | | | | Another attempt at r276271, hopefully without breaking ModuleDebugInfo test. llvm-svn: 276317
* Move some IntrusiveRefCntPtrs instead of copying.Benjamin Kramer2016-07-212-10/+13
| | | | | | No functionality change intended. llvm-svn: 276292
* Revert "Include unreferenced nested types in member list only for CodeView"Adrian McCarthy2016-07-212-20/+3
| | | | | | | | | | Patch broke ModuleDebugInfo test on the build bots (but not locally). Again. svn revision: r276271 This reverts commit 9da8a1b05362bc96f2855fb32b5588b89407685d. llvm-svn: 276279
* Include unreferenced nested types in member list only for CodeViewAdrian McCarthy2016-07-212-3/+20
| | | | | | Unreferenced nested structs and classes were omitted from the debug info. In DWARF, this was intentional, to avoid bloat. But for CodeView, we want this information to be consistent with what Microsoft tools would produce and expect. llvm-svn: 276271
* Provide __GLIBCXX_TYPE_INT_N_0 and __GLIBCXX_BITSIZE_INT_N_0 when in C++ gnu ↵Yaron Keren2016-07-211-0/+5
| | | | | | | | | language extensions. These are used by libstdc++ <type_traits> for is_integral<__int128>. Addresses http://llvm.org/pr23156. llvm-svn: 276252
* [Sema,X86] Add explicit check to ensure that builtins that require x86-64 ↵Craig Topper2016-07-211-0/+50
| | | | | | | | | | target throw an error if used on 32-bit target. If these builtins are allowed to go through on a 32-bit target they will fire assertions in the backend. Fixes PR28635. llvm-svn: 276250
* [X86] Add missing __x86_64__ qualifiers on a bunch of intrinsics that assume ↵Craig Topper2016-07-216-7/+47
| | | | | | | | 64-bit GPRs are available. Usages of these intrinsics in a 32-bit build results in assertions in the backend. llvm-svn: 276249
* [CodeGen] Handle recursion in LLVMIRGeneration Timer.Davide Italiano2016-07-211-8/+23
| | | | | | | | | | | | This can happen when emitting a local decl, which triggers loading a decl imported from an AST file, which we then hand to the AST consumer. Timer is not allowed to recurse so an assertion fire. Keep a reference counter to avoid this problem. LGTM'd by Richard Smith on IRC. Differential Revision: https://reviews.llvm.org/D20748 llvm-svn: 276242
* [Sema] Fix PR28623.George Burgess IV2016-07-211-1/+5
| | | | | | | | | | | | | | | In atomic builtins, we assumed that the LValue conversion on the first argument would succeed. So, we would crash given code like: ``` void ovl(char); void ovl(int); __atomic_store_n(ovl, 0, 0); ``` This patch makes us not assume that said conversion is successful. :) llvm-svn: 276232
* [OpenMP] Sema and parsing for 'target simd' pragmaKelvin Li2016-07-2013-6/+241
| | | | | | | | This patch is to implement sema and parsing for 'target simd' pragma. Differential Revision: https://reviews.llvm.org/D22479 llvm-svn: 276203
* Fix memory leak introduced in r276159.Richard Smith2016-07-201-0/+3
| | | | llvm-svn: 276188
* When copying an array into a lambda, destroy temporaries fromJohn McCall2016-07-201-0/+35
| | | | | | | | | the copy-constructor immediately and enter a partial array cleanup for previously-copied elements. Fixes PR28595. llvm-svn: 276180
* [OpenMP] Allow negative lower bound in array sections based on pointersKelvin Li2016-07-201-10/+9
| | | | | | | | | | | | OpenMP 4.5 removed the restriction that array section lower bound must be non negative. This change is to allow negative values for array section based on pointers. For array section based on array type there is still a restriction: "The array section must be a subset of the original array." Patch by David S. Differential Revision: https://reviews.llvm.org/D22481 llvm-svn: 276177
* [OpenMP] Ignore parens in atomic captureKelvin Li2016-07-201-2/+2
| | | | | | | | | | | | | | | Clang misdiagnoses atomic captures cases that contains parens. i.e. int v, int *p; #pragma omp atomic capture { v = (*p); (*p)++; } Patch by David S. Differential Revision: https://reviews.llvm.org/D22487 llvm-svn: 276167
* [OpenCL] AMDGCN target will generate images in constant address spaceYaxun Liu2016-07-203-1/+15
| | | | | | | | | | | | | Allows AMDGCN target to generate images (such as %opencl.image2d_t) in constant address space. Images will still be generated in global address space by default. Added tests to existing opencl-types.cl in test\CodeGenOpenCL. Patch by Aaron En Ye Shi. Differential Revision: https://reviews.llvm.org/D22523 llvm-svn: 276161
* [modules] Don't emit initializers for VarDecls within a module eagerly wheneverRichard Smith2016-07-208-30/+143
| | | | | | | | | | | | we first touch any part of that module. Instead, defer them until the first time that module is (transitively) imported. The initializer step for a module then recursively initializes modules that its own headers imported. For example, this avoids running the <iostream> global initializer in programs that don't actually use iostreams, but do use other parts of the standard library. llvm-svn: 276159
* [MS] Improve VPtrInfo field names and doc commentsReid Kleckner2016-07-202-29/+29
| | | | | | | | | 'ReusingBase' was a terrible name. It might actually refer to the most derived class, which is not a base. 'BaseWithVPtr' was also bad, since again, it could refer to the most derived class. It was actually the first base to introduce the vptr, so now it is 'IntroducingObject'. llvm-svn: 276120
* [X86][SSE] Reimplement SSE fp2si conversion intrinsics instead of using ↵Simon Pilgrim2016-07-203-9/+8
| | | | | | | | | | | | | | | | generic IR D20859 and D20860 attempted to replace the SSE (V)CVTTPS2DQ and VCVTTPD2DQ truncating conversions with generic IR instead. It turns out that the behaviour of these intrinsics is different enough from generic IR that this will cause problems, INF/NAN/out of range values are guaranteed to result in a 0x80000000 value - which plays havoc with constant folding which converts them to either zero or UNDEF. This is also an issue with the scalar implementations (which were already generic IR and what I was trying to match). This patch changes both scalar and packed versions back to using x86-specific builtins. It also deals with the other scalar conversion cases that are runtime rounding mode dependent and can have similar issues with constant folding. Differential Revision: https://reviews.llvm.org/D22105 llvm-svn: 276102
* [Sema] Compute the nullability of a conditional expression based on theAkira Hatanaka2016-07-201-0/+53
| | | | | | | | | | | | | | nullabilities of its operands. This patch defines a function to compute the nullability of conditional expressions, which enables Sema to precisely detect implicit conversions of nullable conditional expressions to nonnull pointers. rdar://problem/25166556 Differential Revision: https://reviews.llvm.org/D22392 llvm-svn: 276076
* Revert r276069: MSVC bots not happyHubert Tong2016-07-209-48/+20
| | | | llvm-svn: 276074
* Fix r276069: use LLVM_CONSTEXPRHubert Tong2016-07-201-1/+1
| | | | llvm-svn: 276071
* Concepts: Create space for requires-clause in TemplateParameterList; NFCHubert Tong2016-07-209-20/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Space for storing the //constraint-expression// of the //requires-clause// associated with a `TemplateParameterList` is arranged by taking a bit out of the `NumParams` field for the purpose of determining whether there is a //requires-clause// or not, and by adding to the trailing objects tied to the `TemplateParameterList`. An accessor is provided. An appropriate argument is supplied to `TemplateParameterList::Create` at the various call sites. Serialization changes will addressed as the Concepts implementation becomes more solid. Drive-by fix: This change also replaces the custom `FixedSizeTemplateParameterListStorage` implementation with one that follows the interface provided by `llvm::TrailingObjects`. Reviewers: aaron.ballman, faisalv, rsmith Subscribers: cfe-commits, nwilson Differential Revision: https://reviews.llvm.org/D19322 llvm-svn: 276069
* [SemaObjC] Improve ObjCDictionaryLiteral and ObjCArryLiteral diagnosticsBruno Cardoso Lopes2016-07-191-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | Sema actions on ObjCDictionaryLiteral and ObjCArryLiteral are currently done as a side-effect of Sema upon parent expressions, which incurs of delayed typo corrections for such literals to be performed by TypoTransforms upon the ObjCDictionaryLiteral and ObjCArryLiteral themselves instead of its elements individually. This is specially bad because it was not designed to act on several elements; searching through all possible combinations of corrections for several elements is very expensive. Additionally, when one of the elements has no correction candidate, we still explore all options and at the end emit no typo corrections whatsoever. Do the proper sema actions by acting on each element alone during appropriate literal parsing time to get proper diagonistics and decent compile time behavior. Differential Revision: http://reviews.llvm.org/D22183 rdar://problem/21046678 llvm-svn: 276020
* [OpenCL] Fixes bug of missing OCL version metadata on the AMDGCN targetYaxun Liu2016-07-191-1/+12
| | | | | | | | | | | | Added the opencl.ocl.version metadata to be emitted with amdgcn. Created a static function emitOCLVerMD which is shared between triple spir and target amdgcn. Also added new testcases to existing test file, spir_version.cl inside test/CodeGenOpenCL. Patch by Aaron En Ye Shi. Differential Revision: https://reviews.llvm.org/D22424 llvm-svn: 276010
* Add support of the latest Ubuntu (Yakkety Yak - 16.10)Sylvestre Ledru2016-07-191-1/+3
| | | | llvm-svn: 275975
* Deprecated (legacy) string literal conversion to 'char *' causes strange ↵Dmitry Polukhin2016-07-191-2/+0
| | | | | | | | | | | | | | overloading resolution It's a patch for PR28050. Seems like overloading resolution wipes out the first standard conversion sequence (before user-defined conversion) in case of deprecated string literal conversion. Differential revision: https://reviews.llvm.org/D21228 Patch by Alexander Makarov llvm-svn: 275970
* [mips] Correct label prefixes for N32 and N64.Daniel Sanders2016-07-191-2/+2
| | | | | | | | | | | | | | | | | Summary: N32 and N64 follow the standard ELF conventions (.L) whereas O32 uses its own ($). This fixes the majority of object differences between -fintegrated-as and -fno-integrated-as. Reviewers: sdardis Subscribers: dsanders, sdardis, llvm-commits Differential Revision: https://reviews.llvm.org/D22412 llvm-svn: 275967
* [driver][mips] Support MIPS targets in modern Android NDKSimon Atanasyan2016-07-191-17/+81
| | | | | | Initial patch provided by Duane Sand. llvm-svn: 275949
* [OPENMP] Removed loop statement as its body executes at most once, NFC.Alexey Bataev2016-07-191-10/+4
| | | | | | | Removed not required loop statement, addressing comments from Richard Smith. llvm-svn: 275947
* [OPENMP] Improved processing of 'priority' clause, NFC.Alexey Bataev2016-07-191-3/+1
| | | | | | | Removed some old comments + improved handling of 'priority' clause value during codegen after comments from Richard Smith. llvm-svn: 275945
* Append clang system include path for offloading tool chains.Samuel Antao2016-07-191-1/+19
| | | | | | | | | | | | | | | Summary: This patch adds clang system include path when offloading tool chains, e.g. CUDA, are used in the current compilation. This fixes an issue detected by @rsmith in response to r275645. Reviewers: rsmith, tra Subscribers: rsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D22490 llvm-svn: 275931
* [OpenMP] Remove dead code in conditional of mappable expressions SEMA. Samuel Antao2016-07-181-4/+4
| | | | llvm-svn: 275930
* [OpenMP] Fix incorrect diagnostics in map clauseKelvin Li2016-07-181-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | Having the following code pattern will result in incorrect diagnostic int main() { int arr[10]; #pragma omp target data map(arr[:]) #pragma omp target map(arr) {} } t.cpp:4:24: error: original storage of expression in data environment is shared but data environment do not fully contain mapped expression storage #pragma omp target map(arr) ^~~ t.cpp:3:29: note: used here #pragma omp target data map(arr[:]) ^~~~~~ 1 error generated. Patch by David S. Differential Revision: https://reviews.llvm.org/D22075 llvm-svn: 275926
* Fix some minor issues found by Coverity.Richard Smith2016-07-182-1/+3
| | | | llvm-svn: 275925
* [Coverage] Remove '..' from filenames *after* getting an absolute pathVedant Kumar2016-07-181-1/+1
| | | | | | | | Failure to do this breaks relative paths which begin with '..'. This issue was caught by the (still nascent) coverage bot. llvm-svn: 275924
* [Coverage] Normalize '..' out of filename stringsVedant Kumar2016-07-181-8/+14
| | | | | | | | This fixes the issue of having duplicate entries for the same file in a coverage report s.t none of the entries actually displayed the correct coverage information. llvm-svn: 275913
* [Sema] Create a separate group for incompatible function pointer warningBruno Cardoso Lopes2016-07-181-4/+8
| | | | | | | | | | | | | Give incompatible function pointer warning its own diagnostic group but still leave it as a subgroup of incompatible-pointer-types. This is in preparation to promote -Wincompatible-function-pointer-types to error on darwin. Differential Revision: https://reviews.llvm.org/D22248 rdar://problem/12907612 llvm-svn: 275907
* Allow iOS and tvOS version numbers with 2-digit major version numbers.Bob Wilson2016-07-182-10/+21
| | | | | | rdar://problem/26921601 llvm-svn: 275905
OpenPOWER on IntegriCloud