summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP
Commit message (Collapse)AuthorAgeFilesLines
* More OpenMP test case compatibility fixesUlrich Weigand2014-10-132-3/+3
| | | | | | | Allow "signext" in a couple of more places in recently added test cases to fix failures on SystemZ. llvm-svn: 219615
* Fix incompatibility issue in /OpenMP/parallel_num_threads_codegen.cppAlexey Bataev2014-10-131-4/+4
| | | | llvm-svn: 219601
* [OPENMP] Codegen for 'num_threads' clause in 'parallel' directive.Alexey Bataev2014-10-131-0/+84
| | | | | | | 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
* Fix test OpenMP/parallel_if_codegen.cpp.Alexey Bataev2014-10-131-2/+2
| | | | llvm-svn: 219598
* [OPENMP] Codegen for 'if' clause in 'parallel' directive.Alexey Bataev2014-10-131-0/+124
| | | | | | | | | | | | | | | | | | | | | Adds codegen for 'if' clause. Currently only for 'if' clause used with the 'parallel' directive. If condition evaluates to true, the code executes parallel version of the code by calling __kmpc_fork_call(loc, 1, microtask, captured_struct/*context*/), where loc - debug location, 1 - number of additional parameters after "microtask" argument, microtask - is outlined finction for the code associated with the 'parallel' directive, captured_struct - list of variables captured in this outlined function. If condition evaluates to false, the code executes serial version of the code by executing the following code: global_thread_id.addr = alloca i32 store i32 global_thread_id, global_thread_id.addr zero.addr = alloca i32 store i32 0, zero.addr kmpc_serialized_parallel(loc, global_thread_id); microtask(global_thread_id.addr, zero.addr, captured_struct/*context*/); kmpc_end_serialized_parallel(loc, global_thread_id); Where loc - debug location, global_thread_id - global thread id, returned by __kmpc_global_thread_num() call or passed as a first parameter in microtask() call, global_thread_id.addr - address of the variable, where stored global_thread_id value, zero.addr - implicit bound thread id (should be set to 0 for serial call), microtask() and captured_struct are the same as in parallel call. Also this patch checks if the condition is constant and if it is constant it evaluates its value and then generates either parallel version of the code (if the condition evaluates to true), or the serial version of the code (if the condition evaluates to false). Differential Revision: http://reviews.llvm.org/D4716 llvm-svn: 219597
* Code reformatting and improvement for OpenMP.Alexey Bataev2014-10-101-2/+6
| | | | | | Moved CGOpenMPRegionInfo from CGOpenMPRuntime.h to CGOpenMPRuntime.cpp file and reworked the code for this change. Also added processing of ThreadID variable passed as an argument in outlined functions in parallel and task directives. llvm-svn: 219490
* Fix for OpenMP/parallel_firstprivate_codegen.cppAlexey Bataev2014-10-101-2/+2
| | | | | | Fix compatibility issues of the test with SystemZ target. llvm-svn: 219465
* [OPENMP] 'omp teams' directive basic support.Alexey Bataev2014-10-098-0/+1316
| | | | | | 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
* Fixed OpenMP/parallel_firstprivate_codegen.cppAlexey Bataev2014-10-081-20/+20
| | | | | | Fixed compatibility issues on ARM. llvm-svn: 219315
* Fix test OpenMP/parallel_firstprivate_codegen.cppAlexey Bataev2014-10-081-3/+3
| | | | | | Fixed compatibility issues with MSVC mode and ARM target. llvm-svn: 219309
* [OPENMP] Codegen for 'firstprivate' clause.Alexey Bataev2014-10-0812-146/+328
| | | | | | | | 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
* Revert commit r219297.Alexey Bataev2014-10-0812-326/+146
| | | | | | Still troubles with OpenMP/parallel_firstprivate_codegen.cpp (now in ARM buildbots). llvm-svn: 219298
* [OPENMP] Codegen for 'firstprivate' clause.Alexey Bataev2014-10-0812-146/+326
| | | | | | | | 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
* Revert back r219295.Alexey Bataev2014-10-0812-326/+146
| | | | | | To fix issues with test OpenMP/parallel_firstprivate_codegen.cpp llvm-svn: 219296
* [OPENMP] Codegen for 'firstprivate' clause.Alexey Bataev2014-10-0812-146/+326
| | | | | | | | 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
* Revert "[OPENMP] 'omp teams' directive basic support. Includes parsing and ↵Renato Golin2014-10-088-1314/+0
| | | | | | | | | 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
* [OPENMP] 'omp teams' directive basic support.Alexey Bataev2014-10-078-0/+1314
| | | | | | 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
* [OPENMP] Fix target triple of a test, which uses __int128 typeAlexander Musman2014-10-061-1/+1
| | | | llvm-svn: 219114
* [OPENMP] Limit the loop counters to 64 bits for the worksharing loopsAlexander Musman2014-10-061-0/+6
| | | | llvm-svn: 219113
* Add getOpenMPSimdDefaultAlignment for PowerPCHal Finkel2014-10-031-0/+1
| | | | | | | | | | | | When the aligned clause of an OpenMP simd pragma is not provided with an explicit alignment, a target-dependent default must be used. This adds such a default of PPC targets. This will become slightly more complicated when BG/Q support is added (because then it will depend on the type). For now, 16 is a correct value for all systems, and covers Altivec and VSX vectors. llvm-svn: 218994
* [OPENMP] Loop collapsing and codegen for 'omp simd' directive.Alexander Musman2014-10-016-1/+501
| | | | | | | | | | | | | 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
* [OPENMP] Codegen of the ‘aligned’ clause for the ‘omp simd’ directive.Alexander Musman2014-09-304-6/+21
| | | | | | Differential Revision: http://reviews.llvm.org/D5499 llvm-svn: 218660
* [OPENMP] Parsing/Sema of directive omp parallel for simdAlexander Musman2014-09-2319-0/+3863
| | | | llvm-svn: 218299
* [OPENMP] Codegen for 'omp critical' directive.Alexey Bataev2014-09-221-0/+38
| | | | | | | | | | | This patch adds codegen for constructs: #pragma omp critical [name] <body> It generates global variable ".gomp_critical_user_[name].var" of type int32[8]. Then it generates library call "kmpc_critical(loc, gtid, .gomp_critical_user_[name].var)", code for <body> statement and final call "kmpc_end_critical(loc, gtid, .gomp_critical_user_[name].var)". Differential Revision: http://reviews.llvm.org/D5202 llvm-svn: 218239
* [OPENMP] Initial parsing/sema analysis of 'target' directive.Alexey Bataev2014-09-194-36/+524
| | | | llvm-svn: 218110
* Parsing/Sema of directive omp for simdAlexander Musman2014-09-1813-0/+3634
| | | | llvm-svn: 218029
* [OPENMP] Improved DSA processing of the loop control variables for loop ↵Alexey Bataev2014-07-253-457/+603
| | | | | | directives. llvm-svn: 213925
* [OPENMP] Initial parsing and sema analysis for clause 'seq_cst' of 'atomic' ↵Alexey Bataev2014-07-242-0/+110
| | | | | | directive. llvm-svn: 213846
* [OPENMP] Initial parsing and sema analysis for clause 'capture' in 'atomic' ↵Alexey Bataev2014-07-242-11/+89
| | | | | | directive. llvm-svn: 213842
* [OPENMP] Fixed DSA detecting for function parameters: by default they must ↵Alexey Bataev2014-07-241-0/+20
| | | | | | be private. llvm-svn: 213835
* [OPENMP] Initial parsing and sema analysis for 'update' clause of 'atomic' ↵Alexey Bataev2014-07-233-0/+89
| | | | | | directive. llvm-svn: 213735
* [OPENMP] Initial parsing an sema analysis for 'write' clause of 'atomic' ↵Alexey Bataev2014-07-232-9/+75
| | | | | | directive. llvm-svn: 213728
* [OPENMP] Initial parsing and sema analysis for 'read' clause in 'atomic' ↵Alexey Bataev2014-07-232-5/+42
| | | | | | directive. llvm-svn: 213717
* [OPENMP] Tests for nesting of regions for 'atomic' directive.Alexey Bataev2014-07-221-4/+340
| | | | llvm-svn: 213648
* [OPENMP] Initial parsing and sema analysis for 'atomic' directive.Alexey Bataev2014-07-222-0/+54
| | | | llvm-svn: 213639
* [OPENMP] Initial parsing and sema analysis for 'ordered' directive.Alexey Bataev2014-07-223-0/+352
| | | | llvm-svn: 213616
* [OPENMP] Initial parsing and sema analysis for 'flush' directive.Alexey Bataev2014-07-213-0/+274
| | | | llvm-svn: 213512
* [OPENMP] Parsing/Sema of the OpenMP directive 'critical'.Alexander Musman2014-07-213-1/+455
| | | | llvm-svn: 213510
* [OPENMP] Added several test cases for clauses 'ordered' and 'nowait': if ↵Alexey Bataev2014-07-215-42/+82
| | | | | | there are more than one 'nowait' or 'ordered' clause an error message is expected. llvm-svn: 213496
* [OPENMP] Initial parsing and sema analysis for 'taskwait' directive.Alexey Bataev2014-07-183-0/+244
| | | | llvm-svn: 213363
* [OPENMP] Initial parsing and sema analysis for 'barrier' directive.Alexey Bataev2014-07-183-1/+245
| | | | llvm-svn: 213360
* [OPENMP] Initial parsing and sema analysis of 'taskyield' directive.Alexey Bataev2014-07-183-1/+245
| | | | llvm-svn: 213355
* [OPENMP] Initial parsing and sema analysis of 'mergeable' clause.Alexey Bataev2014-07-172-6/+12
| | | | llvm-svn: 213262
* [OPENMP] Initial support for parsing and sema analysis of 'untied' clause.Alexey Bataev2014-07-172-6/+12
| | | | llvm-svn: 213257
* [OPENMP] Parsing/Sema analysis of directive 'master'Alexander Musman2014-07-173-0/+353
| | | | llvm-svn: 213237
* [OPENMP] Initial parsing and sema analysis for 'final' clause.Alexey Bataev2014-07-172-6/+52
| | | | llvm-svn: 213232
* [OPENMP] Several cosmetic fixes in comments, tests and the code for '#pragma ↵Alexey Bataev2014-07-151-8/+0
| | | | | | omp single'. llvm-svn: 213040
* [OPENMP] Parsing and sema analysis for 'omp task' directive.Alexey Bataev2014-07-119-2/+1077
| | | | llvm-svn: 212804
* [OPENMP] Allow ‘reduction’ clause on ‘omp simd’ directive.Alexander Musman2014-07-082-0/+377
| | | | llvm-svn: 212525
* [OPENMP] Parsing and sema analysis for 'omp parallel sections' directive.Alexey Bataev2014-07-0814-0/+2298
| | | | llvm-svn: 212516
OpenPOWER on IntegriCloud