| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Bitfield RefersToEnclosingLocal of Stmt::DeclRefExprBitfields renamed to RefersToCapturedVariable to reflect latest changes introduced in commit 224323. Also renamed method Expr::refersToEnclosingLocal() to Expr::refersToCapturedVariable() and comments for constant arguments.
No functional changes.
llvm-svn: 224329
|
|
|
|
|
|
|
|
| |
Currently, if global variable is marked as a private OpenMP variable, the compiler crashes in debug version or generates incorrect code in release version. It happens because in the OpenMP region the original global variable is used instead of the generated private copy. It happens because currently globals variables are not captured in the OpenMP region.
This patch adds capturing of global variables iff private copy of the global variable must be used in the OpenMP region.
Differential Revision: http://reviews.llvm.org/D6259
llvm-svn: 224323
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the simplest case, which is used when no chunk_size is specified in
the schedule(static) or no 'schedule' clause is specified - the
iteration space is divided by the library into chunks that are
approximately equal in size, and at most one chunk is distributed
to each thread. In this case, we do not need an outer loop in each
thread - each thread requests once which iterations range it should
handle (using __kmpc_for_static_init runtime call) and then runs the
inner loop on this range.
Differential Revision: http://reviews.llvm.org/D5865
llvm-svn: 224233
|
|
|
|
|
|
| |
According to OpenMP standard, Section 2.12.6, atomic Construct, '#pragma omp atomic write' is allowed to be used only for expression statements of form 'x = expr;', where x is a lvalue expression and expr is an expression with scalar type. Patch adds checks for it.
llvm-svn: 222913
|
|
|
|
|
|
| |
No functional changes, just code improvement.
llvm-svn: 222523
|
|
|
|
|
|
| |
According to OpenMP standard, Section 2.12.6, atomic Construct, '#pragma omp atomic read' is allowed to be used only for expression statements of form 'v = x;', where x and v (as applicable) are both l-value expressions with scalar type. Patch adds checks for it.
llvm-svn: 222231
|
|
|
|
|
|
| |
Currently there is a bug in processing of global variables used as loop control variables in 'omp for/simd' constructs: these globals must be captured as private variables, but currently they are nor. This is a temporary bug fix for this problem until the correct solution is prepared. If a global var used as lcv without explicit mark as a private/linear/lastprivate the error message is emitted.
llvm-svn: 221970
|
|
|
|
|
|
|
|
|
| |
For all threadprivate variables which have constructor/destructor emit call to void __kmpc_threadprivate_register(ident_t * <Current Location>, void *<Original Global Addr>, kmpc_ctor <Constructor>, kmpc_cctor NULL, kmpc_dtor <Destructor>);
In expressions all references to such variables are replaced by calls to void *__kmpc_threadprivate_cached(ident_t *<Current Location>, kmp_int32 <Current Thread Id>, void *<Original Global Addr>, size_t <Size of Data>, void ***<Pointer to autogenerated cache – array of private copies of threadprivate variable>);
Test test/OpenMP/threadprivate_codegen.cpp checks that codegen is correct. Also it checks that codegen is correct after serialization/deserialization and one of passes verifies debug info.
Differential Revision: http://reviews.llvm.org/D4002
llvm-svn: 221663
|
|
|
|
|
|
| |
TypoCorrectionConsumer can keep the callback around as long as needed.
llvm-svn: 220693
|
|
|
|
|
|
|
| |
This patch generates some helper variables which used as a private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by default (with the default constructor, if any). 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 and implicit barier is set 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/D4752
llvm-svn: 220262
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 219504
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Still troubles with OpenMP/parallel_firstprivate_codegen.cpp (now in ARM buildbots).
llvm-svn: 219298
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
To fix issues with test OpenMP/parallel_firstprivate_codegen.cpp
llvm-svn: 219296
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 219113
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D5499
llvm-svn: 218660
|
|
|
|
| |
llvm-svn: 218299
|
|
|
|
| |
llvm-svn: 218110
|
|
|
|
| |
llvm-svn: 218029
|
|
|
|
|
|
| |
directives.
llvm-svn: 213925
|
|
|
|
|
|
| |
directive.
llvm-svn: 213846
|
|
|
|
|
|
| |
directive.
llvm-svn: 213842
|
|
|
|
|
|
| |
be private.
llvm-svn: 213835
|
|
|
|
|
|
| |
directive.
llvm-svn: 213735
|
|
|
|
|
|
| |
directive.
llvm-svn: 213728
|
|
|
|
|
|
| |
directive.
llvm-svn: 213717
|
|
|
|
| |
llvm-svn: 213639
|
|
|
|
| |
llvm-svn: 213616
|
|
|
|
| |
llvm-svn: 213512
|
|
|
|
| |
llvm-svn: 213510
|
|
|
|
| |
llvm-svn: 213363
|
|
|
|
| |
llvm-svn: 213360
|
|
|
|
| |
llvm-svn: 213355
|
|
|
|
| |
llvm-svn: 213262
|
|
|
|
| |
llvm-svn: 213257
|
|
|
|
| |
llvm-svn: 213237
|
|
|
|
| |
llvm-svn: 213232
|
|
|
|
|
|
| |
omp single'.
llvm-svn: 213040
|
|
|
|
| |
llvm-svn: 212804
|
|
|
|
| |
llvm-svn: 212516
|
|
|
|
| |
llvm-svn: 212453
|
|
|
|
| |
llvm-svn: 212156
|
|
|
|
|
|
| |
request from Samuel F Antao).
llvm-svn: 212034
|