summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [OpenMP] Code generation for teams - kernel launchingSamuel Antao2016-03-033-8/+427
| | | | | | | | | | | | | | | Summary: This patch implements the launching of a target region in the presence of a nested teams region, i.e calls tgt_target_teams with the required arguments gathered from the enclosed teams directive. The actual codegen of the region enclosed by the teams construct will be contributed in a separate patch. Reviewers: hfinkel, arpith-jacob, kkwli0, carlo.bertolli, ABataev Subscribers: cfe-commits, caomhin, fraggamuffin Differential Revision: http://reviews.llvm.org/D17019 llvm-svn: 262625
* [ARM] Add Clang targeting for ARMv8-M Baseline/MainlineBradley Smith2016-03-036-10/+82
| | | | llvm-svn: 262619
* [CLANG][AVX512][BUILTIN] movddup{128|256|512}Michael Zuckerman2016-03-035-0/+106
| | | | | | Differential Revision: http://reviews.llvm.org/D17826 llvm-svn: 262617
* [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0Anastasia Stulova2016-03-038-46/+133
| | | | | | | | | | | | | | Applying the following restrictions for block types in OpenCL (v2.0 s6.12.5): - __block storage class is disallowed - every block declaration must be const qualified and initialized - a block can't be used as a return type of a function - a blocks can't be used to declare a structure or union field - extern speficier is disallowed Corrected image and sampler types diagnostics with struct and unions. Review: http://reviews.llvm.org/D16928 llvm-svn: 262616
* Fixing a checkfile error in avx512vlbw-builtins.cMichael Zuckerman2016-03-031-8/+8
| | | | | | Differential Revision: http://reviews.llvm.org/D17814 llvm-svn: 262611
* [CLANG][AVX512][BUILTIN] movdqu{qi|hi} {128|256|512}Michael Zuckerman2016-03-035-0/+184
| | | | | | Differential Revision: http://reviews.llvm.org/D17814 llvm-svn: 262609
* Tweak CMakeLists not for libclang to depend on the variable ↵NAKAMURA Takumi2016-03-032-2/+4
| | | | | | CLANG_TOOL_EXTRA_BUILD. llvm-svn: 262606
* [docs] Add missing fileAlexander Kornienko2016-03-031-0/+15
| | | | llvm-svn: 262604
* [docs] Updated doxygen files to work well with doxygen 1.8.11Alexander Kornienko2016-03-032-28/+1
| | | | | | Doxygen 1.8.11 doesn't seem to like files with ".intro" extension by default. llvm-svn: 262603
* [CLANG][AVX512][BUILTIN] movdqa{32|64}{load|store|}{128|256|512}Michael Zuckerman2016-03-035-0/+307
| | | | | | Differential Revision: http://reviews.llvm.org/D17812 llvm-svn: 262598
* [libclang] Link clang-tidy plugin into libclang if present.Benjamin Kramer2016-03-032-0/+12
| | | | | | | | | | | | This is a sad workaround for the lack of plugin support in libclang. Depends on D17807, a tools-extra change that also contains the test case. This is designed to be easy to remove again if libclang ever grows proper plugin support. Differential Revision: http://reviews.llvm.org/D17808 llvm-svn: 262596
* [Clang][AVX512][BUILTIN] Adding PSRL{W|WI}{128|256|512}Michael Zuckerman2016-03-034-0/+161
| | | | | | Differential Revision: http://reviews.llvm.org/D17754 llvm-svn: 262593
* Semantic analysis for the swiftcall calling convention.John McCall2016-03-0319-18/+614
| | | | | | | I've tried to keep the infrastructure behind parameter ABI treatments fairly general. llvm-svn: 262587
* [index] Report references of ObjC super class/protocols in interfaces and ↵Argyrios Kyrtzidis2016-03-032-6/+51
| | | | | | protocols. llvm-svn: 262584
* [test] Re-enable asan on the test, stack usage should be lower.Argyrios Kyrtzidis2016-03-031-2/+2
| | | | llvm-svn: 262583
* [OPENMP 4.0] Initial support for 'omp declare reduction' construct.Alexey Bataev2016-03-0341-26/+1150
| | | | | | | | | | | | | | | | | Add parsing, sema analysis and serialization/deserialization for 'declare reduction' construct. User-defined reductions are defined as #pragma omp declare reduction( reduction-identifier : typename-list : combiner ) [initializer ( initializer-expr )] These custom reductions may be used in 'reduction' clauses of OpenMP constructs. The combiner specifies how partial results can be combined into a single value. The combiner can use the special variable identifiers omp_in and omp_out that are of the type of the variables being reduced with this reduction-identifier. Each of them will denote one of the values to be combined before executing the combiner. It is assumed that the special omp_out identifier will refer to the storage that holds the resulting combined value after executing the combiner. As the initializer-expr value of a user-defined reduction is not known a priori the initializer-clause can be used to specify one. Then the contents of the initializer-clause will be used as the initializer for private copies of reduction list items where the omp_priv identifier will refer to the storage to be initialized. The special identifier omp_orig can also appear in the initializer-clause and it will refer to the storage of the original variable to be reduced. Differential Revision: http://reviews.llvm.org/D11182 llvm-svn: 262582
* [OPENMP 4.5] Initial support for data members in 'linear' clause.Alexey Bataev2016-03-039-76/+92
| | | | | | | | OpenMP 4.5 allows to privatize data members of current class in member functions. Patch adds initial support for privatization of data members in 'linear' clause, no codegen support. llvm-svn: 262578
* Caught and fixed a typo in r262572.Sean Callanan2016-03-031-1/+1
| | | | | | | | | | I should have checked and imported D's in-class initializer. Instead I accidentally used ToField's in-class initializer, which is always NULL so ToField will never get one. <rdar://problem/24943405> llvm-svn: 262576
* Fixed a problem where the ASTImporter mishandled in-class initializers.Sean Callanan2016-03-031-2/+7
| | | | | | | | | | | | | | Previously, the ASTImporter, when copying a FieldDecl, would make the new FieldDecl use the exact same in-class initializer as the original FieldDecl, which is a problem since the initializer is in the wrong AST. The initializer must be imported, just like all the other parts of the field. Doug Gregor reviewed this fix. <rdar://problem/24943405> llvm-svn: 262572
* This patch adds doxygen comments for all the intrinsincs in the header file ↵Ekaterina Romanova2016-03-031-0/+552
| | | | | | | | | | tmmintrin.h. The doxygen comments are automatically generated based on Sony's intrinsics document. I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream. llvm-svn: 262565
* Serialize `pragma pointers_to_members` state.Nico Weber2016-03-036-1/+70
| | | | | | Like r262539, but for pointers_to_members. llvm-svn: 262552
* Improve some infrastructure for extended parameter infos andJohn McCall2016-03-0310-35/+129
| | | | | | | fix a bug with the instantiation of ns_consumed parameter attributes in ARC. llvm-svn: 262551
* clang-cl pch test: Instead of copying the input, use /Fp to not write into ↵Nico Weber2016-03-022-3/+2
| | | | | | | | | the test directory. Also fix a bug with /Fp and absolute paths uncovered by this. Follow-up to r262487. llvm-svn: 262541
* Serialize `pragma ms_struct` state.Nico Weber2016-03-029-15/+83
| | | | | | | | | | | pragma ms_struct has an effect on struct decls, and the effect is serialized correctly already. But the "is ms_struct currently on" state wasn't before this change. This uses the same approach as `pragma clang optimize`: When writing a module, the state isn't serialized, only when writing a pch file. llvm-svn: 262539
* clang-format: [JS] Optionally re-quote string literals.Daniel Jasper2016-03-025-12/+146
| | | | | | | | | | | | | | | | | | | | | Turns "foo" into 'foo' (or vice versa, depending on configuration). This makes it more convenient to follow the Google JavaScript style guide: https://google.github.io/styleguide/javascriptguide.xml?showone=Strings#Strings This functionality is behind the option "JavaScriptQuotes", which can be: * "leave" (no re-quoting) * "single" (change to single quotes) * "double" (change to double quotes) This also changes single quoted JavaScript string literals to be treated as tok::string_literal, not tok::char_literal, which fixes two unrelated tests. Patch by Martin Probst. Thank you. llvm-svn: 262534
* [analyzer] Move ObjCSuperDeallocChecker out of the alpha package.Devin Coughlin2016-03-022-5/+5
| | | | | | | | It will now be on by default on Darwin. rdar://problem/6953275 llvm-svn: 262526
* [analyzer] Move ObjCDeallocChecker out of the alpha package.Devin Coughlin2016-03-025-11/+11
| | | | | | | | It will now be on by default on Darwin. rdar://problem/6927496 llvm-svn: 262524
* [analyzer] Fix capitalization in ObjCSuperDeallocChecker diagnostic.Devin Coughlin2016-03-022-11/+11
| | | | llvm-svn: 262520
* Fixed test failure platforms with name mangling different from Linux.Artem Belevich2016-03-021-3/+4
| | | | | | | | * Run cc with -triple x86_64-linux-gnu to make symbol mangling predictable. * Use temporary file as a fake GPU input so its content does not interfere with pattern matching. llvm-svn: 262516
* [PGO] Change profile use cc1 option to handle IR level profilesRong Xu2016-03-0224-50/+103
| | | | | | | | | | | | | | | | | | This patch changes cc1 option for PGO profile use from -fprofile-instr-use=<path> to -fprofile-instrument-use-path=<path>. -fprofile-instr-use=<path> is now a driver only option. In addition to decouple the cc1 option from the driver level option, this patch also enables IR level profile use. cc1 option handling now reads the profile header and sets CodeGenOpt ProfileUse (valid values are {None, Clang, LLVM} -- this is a common enum for -fprofile-instrument={}, for the profile instrumentation), and invoke the pipeline to enable the respective PGO use pass. Reviewers: silvas, davidxl Differential Revision: http://reviews.llvm.org/D17737 llvm-svn: 262515
* fix test from r262506Nico Weber2016-03-021-1/+0
| | | | llvm-svn: 262508
* Serialize `#pragma detect_mismatch`.Nico Weber2016-03-0224-32/+155
| | | | | | | This is like r262493, but for pragma detect_mismatch instead of pragma comment. The two pragmas have similar behavior, so use the same approach for both. llvm-svn: 262506
* [libFuzzer] allow -fsanitize-coverage=0 (disables all coverage)Kostya Serebryany2016-03-022-2/+6
| | | | llvm-svn: 262503
* [CUDA] Do not generate unnecessary runtime init code.Artem Belevich2016-03-022-1/+34
| | | | | | Differential Revision: http://reviews.llvm.org/D17780 llvm-svn: 262499
* [CUDA] Emit host-side 'shadows' for device-side global variablesArtem Belevich2016-03-025-34/+157
| | | | | | | | | | | | | ... and register them with CUDA runtime. This is needed for commonly used cudaMemcpy*() APIs that use address of host-side shadow to access their counterparts on device side. Fixes PR26340 Differential Revision: http://reviews.llvm.org/D17779 llvm-svn: 262498
* Serialize `#pragma comment`.Nico Weber2016-03-0225-80/+211
| | | | | | | | | | | | | | `#pragma comment` was handled by Sema calling a function on ASTConsumer, and CodeGen then implementing this function and writing things to its output. Instead, introduce a PragmaCommentDecl AST node and hang one off the TranslationUnitDecl for every `#pragma comment` line, and then use the regular serialization machinery. (Since PragmaCommentDecl has codegen relevance, it's eagerly deserialized.) http://reviews.llvm.org/D17799 llvm-svn: 262493
* test/Driver/cl-pch-errorhandling.cpp: Copy input file to a temporaryDaniel Jasper2016-03-021-1/+2
| | | | | | | location as we cannot assume the location of the input file to be writable. llvm-svn: 262487
* [CLANG] [AVX512] [BUILTIN] Adding PSRA{W|WI}{128|256|512}.Michael Zuckerman2016-03-024-0/+160
| | | | | | Differential Revision: http://reviews.llvm.org/D17706 llvm-svn: 262481
* [CLANG] [AVX512] [BUILTIN] Adding PSRAVMichael Zuckerman2016-03-026-0/+273
| | | | | | Differential Revision: http://reviews.llvm.org/D17699 llvm-svn: 262471
* [Sema] PR26444 fix crash when alignment value is >= 2**16David Majnemer2016-03-022-1/+4
| | | | | | | | | | | Sema allows max values up to 2**28, use unsigned instead of unsiged short to hold values that large. Differential Revision: http://reviews.llvm.org/D17248 Patch by Don Hinton! llvm-svn: 262466
* [modules] addHeaderInclude() can't fail.Davide Italiano2016-03-021-21/+12
| | | | | | Differential Revision: http://reviews.llvm.org/D17794 llvm-svn: 262463
* [OPENMP 4.5] Codegen for data members in 'reduction' clause.Alexey Bataev2016-03-0213-28/+315
| | | | | | | | OpenMP 4.5 allows to privatize non-static data members of current class in non-static member functions. Patch supports codegen for non-static data members in 'reduction' clauses. llvm-svn: 262460
* Add a few dllimport/dllexport tests. NFCReid Kleckner2016-03-022-0/+30
| | | | | | | | | | | | | | | | | | | | Summary: This change just adds tests for some corner cases of dllimport/dllexport, primarily for some static methods. We plan to enable dllimport/dllexport support for the PS4, and these additional tests are for points we previously were testing internally. -Warren Ristow SN Systems - Sony Computer Entertainment Group Reviewers: rnk Subscribers: silvas Differential Revision: http://reviews.llvm.org/D17775 llvm-svn: 262442
* [CMake] Add convenience target clang-test-depends to build test dependencies.Chris Bieneman2016-03-021-0/+2
| | | | | | This is useful when paired with the distribution targets to build prerequisites for running tests. llvm-svn: 262429
* clang-cl: Implement initial limited support for precompiled headers.Nico Weber2016-03-0119-14/+674
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the gcc precompiled header model, one explicitly runs clang with `-x c++-header` on a .h file to produce a gch file, and then includes the header with `-include foo.h` and if a .gch file exists for that header it gets used. This is documented at http://clang.llvm.org/docs/UsersManual.html#precompiled-headers cl.exe's model is fairly different, and controlled by the two flags /Yc and /Yu. A pch file is generated as a side effect of a regular compilation when /Ycheader.h is passed. While the compilation is running, the compiler keeps track of #include lines in the main translation unit and writes everything up to an `#include "header.h"` line into a pch file. Conversely, /Yuheader.h tells the compiler to skip all code in the main TU up to and including `#include "header.h"` and instead load header.pch. (It's also possible to use /Yc and /Yu without an argument, in that case a `#pragma hrdstop` takes the role of controlling the point where pch ends and real code begins.) This patch implements limited support for this in that it requires the pch header to be passed as a /FI force include flag – with this restriction, it can be implemented almost completely in the driver with fairly small amounts of code. For /Yu, this is trivial, and for /Yc a separate pch action is added that runs before the actual compilation. After r261774, the first failing command makes a compilation stop – this means if the pch fails to build the main compilation won't run, which is what we want. However, in /fallback builds we need to run the main compilation even if the pch build fails so that the main compilation's fallback can run. To achieve this, add a ForceSuccessCommand that pretends that the pch build always succeeded in /fallback builds (the main compilation will then fail to open the pch and run the fallback cl.exe invocation). If /Yc /Yu are used in a setup that clang-cl doesn't implement yet, clang-cl will now emit a "not implemented yet; flag ignored" warning that can be disabled using -Wno-clang-cl-pch. Since clang-cl doesn't yet serialize some important things (most notably `pragma comment(lib, ...)`, this feature is disabled by default and only enabled by an internal driver flag. Once it's more stable, this internal flag will disappear. (The default stdafx.h setup passes stdafx.h as explicit argument to /Yc but not as /FI – instead every single TU has to `#include <stdafx.h>` as first thing it does. Implementing support for this should be possible with the approach in this patch with minimal frontend changes by passing a --stop-at / --start-at flag from the driver to the frontend. This is left for a follow-up. I don't think we ever want to support `#pragma hdrstop`, and supporting it with this approach isn't easy: This approach relies on the driver knowing the pch filename in advance, and `#pragma hdrstop(out.pch)` can set the output filename, so the driver can't know about it in advance.) clang-cl now also honors /Fp and puts pch files in the same spot that cl.exe would put them, but the pch file format is of course incompatible. This has ramifications on /fallback, so /Yc /Yu aren't passed through to cl.exe in /fallback builds. http://reviews.llvm.org/D17695 llvm-svn: 262420
* Updated SSE41 builtin tests to more closely match the llvm fast-isel ↵Simon Pilgrim2016-03-011-40/+50
| | | | | | equivalent tests llvm-svn: 262418
* Mangle extended qualifiers in the proper order and mangle theJohn McCall2016-03-015-34/+120
| | | | | | | | | | | | | | | | | | | | | | ARC ownership-convention function type modifications. According to the Itanium ABI, vendor extended qualifiers are supposed to be mangled in reverse-alphabetical order before any CVR qualifiers. The ARC function type conventions are plausibly order-significant (they are associated with the function type), which permits us to ignore the need to correctly inter-order them with any other vendor qualifiers on the parameter and return types. Implementing these rules correctly is technically an ABI break. Apple is comfortable with the risk of incompatibility here for the ARC features, and I believe that address-space qualification is still uncommon enough to allow us to adopt the conforming rule without serious risk. Still, targets which make heavy use of address space qualification may want to revert to the non-conforming order. llvm-svn: 262414
* Explicitly select IAS on one more RUN line in new embed-bitcode.c test.Daniel Sanders2016-03-011-1/+1
| | | | | | | This should fix clang-cmake-mips builder since MIPS does not have IAS enabled by default (yet). llvm-svn: 262409
* [clang-format] Detect constructor initializers preceded by `noexcept`.Daniel Jasper2016-03-012-1/+4
| | | | | | Patch by Erik Kessler, thank you. llvm-svn: 262402
* This patch adds doxygen comments for the intrinsincs in the header file ↵Ekaterina Romanova2016-03-011-0/+40
| | | | | | | | | | popcntintrin.h. The doxygen comments are automatically generated based on Sony's intrinsics documentation. Differential Revision: http://reviews.llvm.org/D17550 llvm-svn: 262385
OpenPOWER on IntegriCloud