Alexey Bataev
b205978100
[OPENMP] Codegen for 'num_threads' clause in 'parallel' directive.
...
This patch generates call to "kmpc_push_num_threads(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_threads);" library function before calling "kmpc_fork_call" each time there is an associated "num_threads" clause in the "omp parallel" directive.
Differential Revision: http://reviews.llvm.org/D5145
llvm-svn: 219599
2014-10-13 08:23:51 +00:00
Benjamin Kramer
ad8e079c61
Reduce double set lookups. NFC.
...
llvm-svn: 219504
2014-10-10 15:32:48 +00:00
Alexey Bataev
13314bf526
[OPENMP] 'omp teams' directive basic support.
...
Includes parsing and semantic analysis for 'omp teams' directive support from OpenMP 4.0. Adds additional analysis to 'omp target' directive with 'omp teams' directive.
llvm-svn: 219385
2014-10-09 04:18:56 +00:00
Alexey Bataev
4a5bb772c3
[OPENMP] Codegen for 'firstprivate' clause.
...
This patch generates some helper variables that used as private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by copy using values of the original variables (with the copy constructor, if any). For arrays, initializator is generated for single element and in the codegen procedure this initial value is automatically propagated between all elements of the private copy.
In outlined function, references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables an implicit barier is generated by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables.
Differential Revision: http://reviews.llvm.org/D5140
llvm-svn: 219306
2014-10-08 14:01:46 +00:00
Alexey Bataev
8068b643c4
Revert commit r219297.
...
Still troubles with OpenMP/parallel_firstprivate_codegen.cpp (now in ARM buildbots).
llvm-svn: 219298
2014-10-08 12:00:22 +00:00
Alexey Bataev
3854f63aaf
[OPENMP] Codegen for 'firstprivate' clause.
...
This patch generates some helper variables that used as private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by copy using values of the original variables (with the copy constructor, if any). For arrays, initializator is generated for single element and in the codegen procedure this initial value is automatically propagated between all elements of the private copy.
In outlined function, references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables an implicit barier is generated by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables.
Differential Revision: http://reviews.llvm.org/D5140
llvm-svn: 219297
2014-10-08 11:35:04 +00:00
Alexey Bataev
bdef50e1ad
Revert back r219295.
...
To fix issues with test OpenMP/parallel_firstprivate_codegen.cpp
llvm-svn: 219296
2014-10-08 11:12:35 +00:00
Alexey Bataev
e7a5517a58
[OPENMP] Codegen for 'firstprivate' clause.
...
This patch generates some helper variables that used as private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by copy using values of the original variables (with the copy constructor, if any). For arrays, initializator is generated for single element and in the codegen procedure this initial value is automatically propagated between all elements of the private copy.
In outlined function, references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables an implicit barier is generated by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables.
Differential Revision: http://reviews.llvm.org/D5140
llvm-svn: 219295
2014-10-08 10:42:55 +00:00
Renato Golin
9804fa5d48
Revert "[OPENMP] 'omp teams' directive basic support. Includes parsing and semantic analysis for 'omp teams' directive support from OpenMP 4.0. Adds additional analysis to 'omp target' directive with 'omp teams' directive."
...
This reverts commit r219197 because it broke ARM self-hosting buildbots with
segmentation fault errors in many tests.
llvm-svn: 219289
2014-10-08 09:06:45 +00:00
Alexey Bataev
941bbec6f4
[OPENMP] 'omp teams' directive basic support.
...
Includes parsing and semantic analysis for 'omp teams' directive support from OpenMP 4.0. Adds additional analysis to 'omp target' directive with 'omp teams' directive.
llvm-svn: 219197
2014-10-07 10:13:33 +00:00
Alexander Musman
174b3ca682
[OPENMP] Limit the loop counters to 64 bits for the worksharing loops
...
llvm-svn: 219113
2014-10-06 11:16:29 +00:00
Alexander Musman
a5f070aec0
[OPENMP] Loop collapsing and codegen for 'omp simd' directive.
...
This patch implements collapsing of the loops (in particular, in
presense of clause 'collapse'). It calculates number of iterations N
and expressions nesessary to calculate the nested loops counters
values based on new iteration variable (that goes from 0 to N-1)
in Sema. It also adds Codegen for 'omp simd', which uses
(and tests) this feature.
Differential Revision: http://reviews.llvm.org/D5184
llvm-svn: 218743
2014-10-01 06:03:56 +00:00
Alexander Musman
09184fedc0
[OPENMP] Codegen of the ‘aligned’ clause for the ‘omp simd’ directive.
...
Differential Revision: http://reviews.llvm.org/D5499
llvm-svn: 218660
2014-09-30 05:29:28 +00:00
Alexander Musman
e4e893bb36
[OPENMP] Parsing/Sema of directive omp parallel for simd
...
llvm-svn: 218299
2014-09-23 09:33:00 +00:00
Alexey Bataev
0bd520b767
[OPENMP] Initial parsing/sema analysis of 'target' directive.
...
llvm-svn: 218110
2014-09-19 08:19:49 +00:00
Alexander Musman
f82886e502
Parsing/Sema of directive omp for simd
...
llvm-svn: 218029
2014-09-18 05:12:34 +00:00
Alexey Bataev
caf09b01fc
[OPENMP] Improved DSA processing of the loop control variables for loop directives.
...
llvm-svn: 213925
2014-07-25 06:27:47 +00:00
Alexey Bataev
82bad8b026
[OPENMP] Initial parsing and sema analysis for clause 'seq_cst' of 'atomic' directive.
...
llvm-svn: 213846
2014-07-24 08:55:34 +00:00
Alexey Bataev
459dec0ca2
[OPENMP] Initial parsing and sema analysis for clause 'capture' in 'atomic' directive.
...
llvm-svn: 213842
2014-07-24 06:46:57 +00:00
Alexey Bataev
8b9cb9833f
[OPENMP] Fixed DSA detecting for function parameters: by default they must be private.
...
llvm-svn: 213835
2014-07-24 02:33:58 +00:00
Alexey Bataev
67a4f22f12
[OPENMP] Initial parsing and sema analysis for 'update' clause of 'atomic' directive.
...
llvm-svn: 213735
2014-07-23 10:25:33 +00:00
Alexey Bataev
dea4761c06
[OPENMP] Initial parsing an sema analysis for 'write' clause of 'atomic' directive.
...
llvm-svn: 213728
2014-07-23 07:46:59 +00:00
Alexey Bataev
f98b00c33e
[OPENMP] Initial parsing and sema analysis for 'read' clause in 'atomic' directive.
...
llvm-svn: 213717
2014-07-23 02:27:21 +00:00
Alexey Bataev
0162e459ef
[OPENMP] Initial parsing and sema analysis for 'atomic' directive.
...
llvm-svn: 213639
2014-07-22 10:10:35 +00:00
Alexey Bataev
9fb6e647e7
[OPENMP] Initial parsing and sema analysis for 'ordered' directive.
...
llvm-svn: 213616
2014-07-22 06:45:04 +00:00
Alexey Bataev
6125da9258
[OPENMP] Initial parsing and sema analysis for 'flush' directive.
...
llvm-svn: 213512
2014-07-21 11:26:11 +00:00
Alexander Musman
d9ed09f7a5
[OPENMP] Parsing/Sema of the OpenMP directive 'critical'.
...
llvm-svn: 213510
2014-07-21 09:42:05 +00:00
Alexey Bataev
2df347ad96
[OPENMP] Initial parsing and sema analysis for 'taskwait' directive.
...
llvm-svn: 213363
2014-07-18 10:17:07 +00:00
Alexey Bataev
4d1dfeabc9
[OPENMP] Initial parsing and sema analysis for 'barrier' directive.
...
llvm-svn: 213360
2014-07-18 09:11:51 +00:00
Alexey Bataev
68446b7253
[OPENMP] Initial parsing and sema analysis of 'taskyield' directive.
...
llvm-svn: 213355
2014-07-18 07:47:19 +00:00
Alexey Bataev
74ba3a5880
[OPENMP] Initial parsing and sema analysis of 'mergeable' clause.
...
llvm-svn: 213262
2014-07-17 12:47:03 +00:00
Alexey Bataev
7aea99a310
[OPENMP] Initial support for parsing and sema analysis of 'untied' clause.
...
llvm-svn: 213257
2014-07-17 12:19:31 +00:00
Alexander Musman
80c2289a03
[OPENMP] Parsing/Sema analysis of directive 'master'
...
llvm-svn: 213237
2014-07-17 08:54:58 +00:00
Alexey Bataev
3778b60176
[OPENMP] Initial parsing and sema analysis for 'final' clause.
...
llvm-svn: 213232
2014-07-17 07:32:53 +00:00
Alexey Bataev
74a05c9445
[OPENMP] Several cosmetic fixes in comments, tests and the code for '#pragma omp single'.
...
llvm-svn: 213040
2014-07-15 02:55:09 +00:00
Alexey Bataev
9c2e8ee72f
[OPENMP] Parsing and sema analysis for 'omp task' directive.
...
llvm-svn: 212804
2014-07-11 11:25:16 +00:00
Alexey Bataev
84d0b3efee
[OPENMP] Parsing and sema analysis for 'omp parallel sections' directive.
...
llvm-svn: 212516
2014-07-08 08:12:03 +00:00
Alexey Bataev
4acb859fbd
[OPENMP] Added initial support for 'omp parallel for'.
...
llvm-svn: 212453
2014-07-07 13:01:15 +00:00
Alexey Bataev
41b9732f68
[OPENMP] Fixed error message reporting for nesting of regions
...
llvm-svn: 212156
2014-07-02 03:04:53 +00:00
Alexey Bataev
18eb25e85b
[OPENMP] Added table with allowed nesting info for OpenMP regions (per request from Samuel F Antao).
...
llvm-svn: 212034
2014-06-30 10:22:46 +00:00
Alexey Bataev
bae9a793fd
[OPENMP] Parsing and sema analysis for 'copyprivate' clause.
...
llvm-svn: 211886
2014-06-27 10:37:06 +00:00
Alexey Bataev
d1e40fbfe1
[OPENMP] Initial parsing and sema analysis for 'single' directive.
...
llvm-svn: 211774
2014-06-26 12:05:45 +00:00
Alexey Bataev
1e0498a92d
[OPENMP] Initial parsing and sema analysis for 'section' directive.
...
llvm-svn: 211767
2014-06-26 08:21:58 +00:00
Alexey Bataev
d3f8dd2d15
[OPENMP] Initial support for 'sections' directive.
...
llvm-svn: 211685
2014-06-25 11:44:49 +00:00
Alexey Bataev
abfc069d6c
[OPENMP] OMPSimdDirective and OMPForDirective: added initialization for CollapsedNum member.
...
llvm-svn: 211672
2014-06-25 06:52:00 +00:00
Alexey Bataev
df9b15905f
[OPENMP] Improved code and replaced struct by lambda.
...
llvm-svn: 211660
2014-06-25 04:09:13 +00:00
Alexey Bataev
e2f07d47fe
[OPENMP] Additional checking for 'collapse' clause.
...
llvm-svn: 211589
2014-06-24 12:55:56 +00:00
Alexey Bataev
549210e783
[OPENMP] Added initial checking of nesting of OpenMP regions.
...
llvm-svn: 211566
2014-06-24 04:39:47 +00:00
Alexey Bataev
cefffaeeca
[OPENMP] Reformatting and code improvement.
...
llvm-svn: 211489
2014-06-23 08:21:53 +00:00
Alexey Bataev
236070f20d
[OPENMP] Initial support for 'nowait' clause.
...
llvm-svn: 211352
2014-06-20 11:19:47 +00:00
Alexey Bataev
142e1fc9ea
[OPENMP] Initial support for 'ordered' clause.
...
llvm-svn: 211347
2014-06-20 09:44:06 +00:00
Alexey Bataev
56dafe87c2
[OPENMP] Initial support for 'schedule' clause.
...
llvm-svn: 211342
2014-06-20 07:16:17 +00:00
Alexey Bataev
7ff5524f7e
[OPENMP] Improved diagnostic messages for vars with the predetermined data sharing attributes and reformatting
...
llvm-svn: 211262
2014-06-19 09:13:45 +00:00
Alexey Bataev
23b6942634
[OPENMP] Reformatting and code improvement.
...
llvm-svn: 211147
2014-06-18 07:08:49 +00:00
Alexey Bataev
f29276edb7
[OPENMP] Initial support for '#pragma omp for' (fixed incompatibility with MSVC).
...
llvm-svn: 211140
2014-06-18 04:14:57 +00:00
Rafael Espindola
a566efbec9
Revert "[OPENMP] Initial support for '#pragma omp for'."
...
This reverts commit r211096. Looks like it broke the msvc build:
SemaOpenMP.cpp(140) : error C4519: default template arguments are only allowed on a class template
llvm-svn: 211113
2014-06-17 17:20:53 +00:00
Alexey Bataev
c77dd5257a
[OPENMP] Initial support for '#pragma omp for'.
...
llvm-svn: 211096
2014-06-17 11:49:22 +00:00
Alexey Bataev
c5e025831b
[OPENMP] Initial support of 'reduction' clause
...
llvm-svn: 211007
2014-06-16 07:08:35 +00:00
Craig Topper
4b56692e30
[C++11] Use 'nullptr'.
...
llvm-svn: 210448
2014-06-09 02:04:02 +00:00
Alp Toker
15e62a37f0
Fix typos
...
llvm-svn: 210328
2014-06-06 12:02:07 +00:00
Alexander Musman
1bb328cca5
[OPENMP] Parsing/Sema for OMPLasprivateClause.
...
Parsing this clause, allowing it on directive ‘omp simd’ and semantic checks.
llvm-svn: 210184
2014-06-04 13:06:39 +00:00
Alexander Musman
64d33f1d46
[OPENMP] Small comment and reformatting fixes.
...
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
2014-06-04 07:53:32 +00:00
Alexander Musman
a8e9d2eccc
[OPENMP] Loop canonical form analysis (Sema)
...
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
2014-06-03 10:16:47 +00:00
Alexander Musman
f0d76e7dc3
Parsing/Sema for OMPAlignedClause.
...
llvm-svn: 209816
2014-05-29 14:36:25 +00:00
Nikola Smiljanic
03ff2596cb
Refactoring. Remove Owned method from Sema.
...
llvm-svn: 209812
2014-05-29 14:05:12 +00:00
Nikola Smiljanic
01a7598561
Refactoring. Remove release and take methods from ActionResult. Rename takeAs to getAs.
...
llvm-svn: 209800
2014-05-29 10:55:11 +00:00
Alexey Bataev
18b92eeacb
[OPENMP] Additional checking for local vars in initial values for threadprivate vars
...
llvm-svn: 209716
2014-05-28 07:40:25 +00:00
Alexey Bataev
ed09d24078
[OPENMP][C++11] Formatting and make more C++11 compliant of OpenMP sema.
...
llvm-svn: 209713
2014-05-28 05:53:51 +00:00
Alexander Musman
8bd31e69a4
Parsing/Sema for OMPCollapseClause.
...
Actual usage in Sema for collapsing loops will in some future patch.
llvm-svn: 209660
2014-05-27 15:12:19 +00:00
Alexander Musman
cb7f9c40f8
C++11 - Use nullptr in lib/Sema/SemaOpenMP.cpp and some reformatting (no functional changes).
...
llvm-svn: 208879
2014-05-15 13:04:49 +00:00
Alexey Bataev
4ca40eda36
[OPENMP] Removed unnecessary enums from OpenMP constructs
...
llvm-svn: 208516
2014-05-12 04:23:46 +00:00
Alexey Bataev
9959db5fa9
[OPENMP] Initial codegen for '#pragma omp parallel'
...
llvm-svn: 208077
2014-05-06 10:08:46 +00:00
Alexey Bataev
bcbadb65ab
[OPENMP] 'proc_bind' clause support - Parsing and sema analysis for OpenMP clause 'proc_bind'
...
llvm-svn: 208060
2014-05-06 06:04:14 +00:00
Alp Toker
b6cc592ea3
Fix a bunch of mislayered clang/Lex includes from Sema
...
llvm-svn: 207896
2014-05-03 03:45:55 +00:00
John Thompson
2255f2ce90
Initial implementation of -modules-earch-all option, for searching for symbols in non-imported modules.
...
llvm-svn: 206977
2014-04-23 12:57:01 +00:00
Alexander Musman
8dba66412b
[OPENMP] parsing 'linear' clause (for directive 'omp simd')
...
Differential Revision: http://reviews.llvm.org/D3272
llvm-svn: 206891
2014-04-22 13:09:42 +00:00
Fraser Cormack
111023cdc6
Test commit: minor formatting
...
llvm-svn: 206264
2014-04-15 08:59:09 +00:00
Alexey Bataev
d48bcd8a46
[OPENMP] Implemented 'copyin' clause
...
llvm-svn: 205164
2014-03-31 03:36:38 +00:00
Ted Kremenek
725a09732e
Placate -Wunreachable-code by removing unnecessary logic to handle NUM_OPENMP_DEFAULT_KINDS <= 1.
...
llvm-svn: 204487
2014-03-21 17:34:28 +00:00
Alexey Bataev
62c87d2509
[OPENMP] parsing of clause 'safelen' (for directive 'omp simd')
...
llvm-svn: 204428
2014-03-21 04:51:18 +00:00
Alexey Bataev
750a58bcd9
[OPENMP] DSA fix
...
llvm-svn: 204143
2014-03-18 12:19:12 +00:00
Alexey Bataev
a590b08308
[OPENMP] Simplified data-sharing attributes analysis.
...
llvm-svn: 204135
2014-03-18 10:23:46 +00:00
Craig Topper
e14c0f8e73
[C++11] Add 'override' keyword to virtual methods that override their base class.
...
llvm-svn: 203640
2014-03-12 04:55:44 +00:00
Alexey Bataev
d178ad4943
[OPENMP] Small update in threadprivate variables processing to fix template instantiation.
...
llvm-svn: 203214
2014-03-07 08:03:37 +00:00
Alexey Bataev
d4dbdf5438
[OPENMP] Updated comments and _OPENMP macro value for OpenMP 4.0 (for 'omp simd' support)
...
llvm-svn: 203114
2014-03-06 12:27:56 +00:00
Alexey Bataev
568a833f68
[OPENMP] Clause 'num_threads'
...
llvm-svn: 203087
2014-03-06 06:15:19 +00:00
Benjamin Kramer
167e999be9
[C++11] Replace llvm::next and llvm::prior with std::next and std::prev.
...
llvm-svn: 202635
2014-03-02 12:20:24 +00:00
Alexey Bataev
1b59ab5683
[OPENMP] First changes for Parsing and Sema for 'omp simd' directive support
...
llvm-svn: 202360
2014-02-27 08:29:12 +00:00
Alexey Bataev
aadd52e5cc
[OPENMP] 'if' clause support (no CodeGen support)
...
llvm-svn: 201297
2014-02-13 05:29:23 +00:00
Alexey Bataev
ec3da87f82
[OPENMP] Bug fixes in threadprivate declaration and data sharing attributes processing. ( http://llvm-reviews.chandlerc.com/D2451 )
...
llvm-svn: 200513
2014-01-31 05:15:34 +00:00
Chandler Carruth
5553d0d4ca
Sort all the #include lines with LLVM's utils/sort_includes.py which
...
encodes the canonical rules for LLVM's style. I noticed this had drifted
quite a bit when cleaning up LLVM, so wanted to clean up Clang as well.
llvm-svn: 198686
2014-01-07 11:51:46 +00:00
Ted Kremenek
c37877d7a4
Convert anachronistic use of 'void *' to 'DeclContext *' in Scope that was a holdover from the long-dead Action interface.
...
llvm-svn: 192203
2013-10-08 17:08:03 +00:00
Alexey Bataev
d5af8e472d
[OpenMP] Added parsing and semantic analysis for firstprivate clause
...
llvm-svn: 191730
2013-10-01 05:32:34 +00:00
Alexey Bataev
7d2960bd2a
[OPENMP] Improved variable lookup procedure for threadprivate variables.
...
llvm-svn: 191416
2013-09-26 03:24:06 +00:00
Alexey Bataev
756c196f14
[OPENMP] Bug fixes and improvements.
...
1. Fixed constructor of shared clause.
2. Some macros for clauses processing are replaced by private template methods.
3. Additional checks in sema analysis of OpenMP clauses.
llvm-svn: 191265
2013-09-24 03:17:45 +00:00
Aaron Ballman
1f2bc24d9b
Silencing an MSVC warning about an empty control statement (it dislikes ; but is fine with {}).
...
llvm-svn: 190305
2013-09-09 13:29:38 +00:00
Alexey Bataev
758e55ee58
OpenMP: Data-sharing attributes analysis and clause 'shared' (fixed test threadprivate_messages.cpp)
...
llvm-svn: 190183
2013-09-06 18:03:48 +00:00
Rafael Espindola
e892ccec0d
Revert "OpenMP: Data-sharing attributes analysis and clause 'shared'"
...
This reverts commit r189795.
threadprivate_messages.cpp is faling on windows.
llvm-svn: 189811
2013-09-03 14:33:09 +00:00
Alexey Bataev
d4183dabd7
OpenMP: Data-sharing attributes analysis and clause 'shared'
...
llvm-svn: 189795
2013-09-03 12:55:52 +00:00
Richard Smith
f9b1510576
Refactor all diagnosing of TypoCorrections through a common function, in
...
preparation for teaching this function how to diagnose a correction that
includes importing a module.
llvm-svn: 188602
2013-08-17 00:46:16 +00:00
Alexey Bataev
5ec3eb11fc
OpenMP: basic support for #pragma omp parallel
...
llvm-svn: 186647
2013-07-19 03:13:43 +00:00
Alexey Bataev
6f6f3b4baf
OpenMP threadprivate with qualified names.
...
llvm-svn: 181683
2013-05-13 04:18:18 +00:00
Richard Smith
fd3834f7a1
Annotate flavor of TLS variable (statically or dynamically initialized) onto the AST.
...
llvm-svn: 179447
2013-04-13 02:43:54 +00:00
Alexey Bataev
a769e07232
OpenMP threadprivate directive parsing and semantic analysis
...
llvm-svn: 177705
2013-03-22 06:34:35 +00:00