- Mar 21, 2016
-
-
Richard Smith authored
TYPE_TEMPLATE_SPECIALIZATION. This was fine in practice because both record kinds are only ever found by offset, but made the llvm-bcanalyzer -dump output very confusing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263989 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 03, 2016
-
-
Alexey Bataev authored
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262582 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
Like r262539, but for pointers_to_members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262552 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262539 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 02, 2016
-
-
Nico Weber authored
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262506 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
`#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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262493 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 11, 2016
-
-
Alexey Bataev authored
OMPCapturedExprDecl allows caopturing not only of fielddecls, but also other expressions. It also allows to simplify codegen for several clauses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260492 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 08, 2016
-
-
Alexey Bataev authored
OpenMP 4.5 introduces privatization of non-static data members of current class in non-static member functions. To correctly handle such kind of privatization a new (pseudo)declaration VarDecl-based node is added. It allows to reuse an existing code for capturing variables in Lambdas/Block/Captured blocks of code for correct privatization and codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260077 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 06, 2016
-
-
Richard Smith authored
[modules] Compress files embedded into a .pcm file, to reduce the disk usage of -fembed-all-files mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259976 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 04, 2016
-
-
Ben Langmuir authored
Per review feedback the name was wrong and it can be used outside Objective-C. Unfortunately, making the internal struct visible broke some ASTMatchers tests that assumed that the first record decl would be from user code, rather than a builtin type. I'm worried that this will also affect users' code. So this patch adds a typedef to wrap the internal struct and only makes the typedef visible to namelookup. This is sufficient to allow the ASTReader to merge the decls we need without making the struct itself visible. rdar://problem/24425801 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259734 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 03, 2016
-
-
Quentin Colombet authored
Original message: Make CF constant string decl visible to name lookup to fix module errors The return type of the __builtin___*StringMakeConstantString functions is a pointer to a struct, so we need that struct to be visible to name lookup so that we will correctly merge multiple declarations of that type if they come from different modules. Incidentally, to make this visible to name lookup we need to rename the type to __NSConstantString, since the real NSConstantString is an Objective-C interface type. This shouldn't affect anyone outside the compiler since users of the constant string builtins cast the result immediately to CFStringRef. Since this struct type is otherwise implicitly created by the AST context and cannot access namelookup, we make this a predefined type and initialize it in Sema. Note: this issue of builtins that refer to types not visible to name lookup technically also affects other builtins (e.g. objc_msgSendSuper), but in all other cases the builtin is a library builtin and the issue goes away if you include the library that defines the types it uses, unlike for these constant string builtins. rdar://problem/24425801 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259721 91177308-0d34-0410-b5e6-96231b3b80d8
-
Quentin Colombet authored
This breaks some internal bots in stage2: clang seg fault. Looking with Ben to see what is going on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259715 91177308-0d34-0410-b5e6-96231b3b80d8
-
Arpith Chacko Jacob authored
Summary: This patch adds parsing + sema for the target parallel for directive along with testcases. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D16759 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259654 91177308-0d34-0410-b5e6-96231b3b80d8
-
Ben Langmuir authored
The return type of the __builtin___*StringMakeConstantString functions is a pointer to a struct, so we need that struct to be visible to name lookup so that we will correctly merge multiple declarations of that type if they come from different modules. Incidentally, to make this visible to name lookup we need to rename the type to __NSConstantString, since the real NSConstantString is an Objective-C interface type. This shouldn't affect anyone outside the compiler since users of the constant string builtins cast the result immediately to CFStringRef. Since this struct type is otherwise implicitly created by the AST context and cannot access namelookup, we make this a predefined type and initialize it in Sema. Note: this issue of builtins that refer to types not visible to name lookup technically also affects other builtins (e.g. objc_msgSendSuper), but in all other cases the builtin is a library builtin and the issue goes away if you include the library that defines the types it uses, unlike for these constant string builtins. rdar://problem/24425801 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259624 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 26, 2016
-
-
Arpith Chacko Jacob authored
Summary: This patch adds parsing + sema for the target parallel directive and its clauses along with testcases. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D16553 Rebased to current trunk and updated test cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258832 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 19, 2016
-
-
Samuel Antao authored
Patch by Arpith Jacob. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258177 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
Patch by Arpith Jacob. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258165 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 09, 2016
-
-
Xiuli Pan authored
Summary: Support for OpenCL 2.0 pipe type. This is a bug-fix version for bader's patch reviews.llvm.org/D14441 Reviewers: pekka.jaaskelainen, Anastasia Subscribers: bader, Anastasia, cfe-commits Differential Revision: http://reviews.llvm.org/D15603 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257254 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 14, 2015
-
-
Carlo Bertolli authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255498 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 09, 2015
-
-
NAKAMURA Takumi authored
Revert r255001, "Add parse and sema for OpenMP distribute directive and all its clauses excluding dist_schedule." It causes memory leak. Some tests in test/OpenMP would fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255094 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 08, 2015
-
-
Carlo Bertolli authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255001 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 03, 2015
-
-
Alexey Bataev authored
OpenMP 4.5 adds directive 'taskloop simd'. Patch adds parsing/sema analysis for 'taskloop simd' directive and its clauses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254597 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 01, 2015
-
-
Alexey Bataev authored
Adds initial parsing and semantic analysis for 'taskloop' directive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254367 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 25, 2015
-
-
Alexey Bataev authored
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
-
- Nov 04, 2015
-
-
David Majnemer authored
This new builtin template allows for incredibly fast instantiations of templates like std::integer_sequence. Performance numbers follow: My work station has 64 GB of ram + 20 Xeon Cores at 2.8 GHz. __make_integer_seq<std::integer_sequence, int, 90000> takes 0.25 seconds. std::make_integer_sequence<int, 90000> takes unbound time, it is still running. Clang is consuming gigabytes of memory. Differential Revision: http://reviews.llvm.org/D13786 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@252036 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 03, 2015
-
-
Douglas Gregor authored
Introduce the notion of a module file extension, which introduces additional information into a module file at the time it is built that can then be queried when the module file is read. Module file extensions are identified by a block name (which must be unique to the extension) and can write any bitstream records into their own extension block within the module file. When a module file is loaded, any extension blocks are matched up with module file extension readers, that are per-module-file and are given access to the input bitstream. Note that module file extensions can only be introduced by programmatic clients that have access to the CompilerInvocation. There is only one such extension at the moment, which is used for testing the module file extension harness. As a future direction, one could imagine allowing the plugin mechanism to introduce new module file extensions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251955 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 17, 2015
-
-
Charles Davis authored
Summary: This change adds support for `__builtin_ms_va_list`, a GCC extension for variadic `ms_abi` functions. The existing `__builtin_va_list` support is inadequate for this because `va_list` is defined differently in the Win64 ABI vs. the System V/AMD64 ABI. Depends on D1622. Reviewers: rsmith, rnk, rjmccall CC: cfe-commits Differential Revision: http://reviews.llvm.org/D1623 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247941 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 15, 2015
-
-
Alexey Bader authored
Patch by Pedro Ferreira. Reviewers: pekka.jaaskelainen Differential Revision: http://reviews.llvm.org/D12855 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247676 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 08, 2015
-
-
Richard Smith authored
them directly to the control block. These are fairly large, and in a build with lots of modules / chained PCH, we don't need to read most of them. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247055 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 01, 2015
-
-
Richard Smith authored
r246546, with a workaround for an MSVC 2013 miscompile and an MSVC 2015 rejects-valid. Original commit message: [modules] Rework serialized DeclContext lookup table management. Instead of walking the loaded ModuleFiles looking for lookup tables for the context, store them all in one place, and merge them together if we find we have too many (currently, more than 4). If we do merge, include the merged form in our serialized lookup table, so that downstream readers never need to look at our imports' tables. This gives a huge performance improvement to builds with very large numbers of modules (in some cases, more than a 2x speedup was observed). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246582 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
Reverting r246497 (which requires also reverting r246524 and r246521 to avoid merge conflicts). It broke the build on MSVC 2015. It also broke an MSVC 2013 bot with testing issues. llvm\tools\clang\lib\serialization\MultiOnDiskHashTable.h(117): error C2065: 'Files': undeclared identifier http://bb.pgr.jp/builders/ninja-clang-i686-msc18-R/builds/2917 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246546 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246504 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
walking the loaded ModuleFiles looking for lookup tables for the context, store them all in one place, and merge them together if we find we have too many (currently, more than 4). If we do merge, include the merged form in our serialized lookup table, so that downstream readers never need to look at our imports' tables. This gives a huge performance improvement to builds with very large numbers of modules (in some cases, more than a 2x speedup was observed). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246497 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 27, 2015
-
-
Richard Smith authored
DeclarationName (because all ctor names are considered the same, and so on). Reflect this in the type used as the lookup table key. As a side-effect, remove one copy of the duplicated code used to compute the hash of the key. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246124 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 25, 2015
-
-
Alexey Bataev authored
Adds parsing/sema analysis/serialization/deserialization for array sections in OpenMP constructs (introduced in OpenMP 4.0). Currently it is allowed to use array sections only in OpenMP clauses that accepts list of expressions. Differential Revision: http://reviews.llvm.org/D10732 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245937 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 22, 2015
-
-
Richard Smith authored
Instead of eagerly deserializing a list of DeclIDs when we load a module file and doing a binary search to find the redeclarations of a decl, store a list of redeclarations of each chain before the first declaration and load it directly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245789 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 09, 2015
-
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244417 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 07, 2015
-
-
Richard Smith authored
DeclContext. These only ever come from the owning module file for the Decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244285 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 27, 2015
-
-
Richard Smith authored
chain and fix the cases where it fires. * Handle the __va_list_tag as a predefined decl. Previously we failed to merge sometimes it because it's not visible to name lookup. (In passing, remove redundant __va_list_tag typedefs that we were creating for some ABIs. These didn't affect the mangling or representation of the type.) * For Decls derived from Redeclarable that are not in fact redeclarable (implicit params, function params, ObjC type parameters), remove them from the list of expected redeclarable decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243259 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 22, 2015
-
-
Richard Smith authored
[modules] Stop performing PCM lookups for all identifiers when building with C++ modules. Instead, serialize a list of interesting identifiers and mark those ones out of date on module import. Avoiding the identifier lookups here gives a 20-30% speedup in builds with large numbers of modules. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242868 91177308-0d34-0410-b5e6-96231b3b80d8
-