- Nov 23, 2016
-
-
Philippe Virouleau authored
-
"affinity('depend | numa | core', 'expr1'[, 'expr2'])" 'expr1' is the affinity requested. 'expr2' defines if the affinity is "strict" (0 by default, anything but 0 means strict). Using 'depend' will set the affinity of the task to the numa node where 'expr1' is located (therefore, a pointer is expected).
-
-
This specifies an algorithm for the initial ready tasks in the parallel section.
-
Example : one can use "#pragma omp task affinity(3)" to tell the runtime this task has an affinity with NUMA node 3.
-
- Nov 15, 2016
-
-
Alexey Bataev authored
r283223 | davidsh | 2016-10-04 10:41:36 -0400 (Tue, 04 Oct 2016) | 1 line [OpenMP] fix segfault when a variable referenced in reduction clause is a reference parameter Differential Revision: http://reviews.llvm.org/D24524 git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_39@286972 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 15, 2016
-
-
Kelvin Li authored
This patch adds the check for specifying both simdlen and safelen clauses on the 'distribute simd' or 'distribute parallel for simd' constructs. Differential Revision: https://reviews.llvm.org/D22384 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275529 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 14, 2016
-
-
Kelvin Li authored
This patch is to implement sema and parsing for 'target parallel for simd' pragma. Differential Revision: http://reviews.llvm.org/D22096 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275365 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 13, 2016
-
-
Kelvin Li authored
This patch is to remove duplicate code in ActOnOpenMPRegionStart. (NFC) Differential Revision: http://reviews.llvm.org/D22177 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275323 91177308-0d34-0410-b5e6-96231b3b80d8
-
Carlo Bertolli authored
http://reviews.llvm.org/D22070 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275282 91177308-0d34-0410-b5e6-96231b3b80d8
-
Carlo Bertolli authored
http://reviews.llvm.org/D21904 This patch is similar to the implementation of 'private' clause: it adds a list of private pointers to be used within the target data region to store the device pointers returned by the runtime. Please refer to the following document for a full description of what the runtime witll return in this case (page 10 and 11): https://github.com/clang-omp/OffloadingDesign I am happy to answer any question related to the runtime interface to help reviewing this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275271 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 07, 2016
-
-
Alexey Bataev authored
OpenMP relies on some helper expressions generated during semantic analysis. But they are required only for codegen and not required in dependent contexts. Patch removes generation of some of helper expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274745 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 06, 2016
-
-
Kelvin Li authored
Summary: This patch is an implementation of sema and parsing for the OpenMP composite pragma 'distribute simd'. Differential Revision: http://reviews.llvm.org/D22007 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274604 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 05, 2016
-
-
Kelvin Li authored
Summary: This patch is an implementation of sema and parsing for the OpenMP composite pragma 'distribute parallel for simd'. Differential Revision: http://reviews.llvm.org/D21977 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274530 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 01, 2016
-
-
Kelvin Li authored
construct git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274352 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 27, 2016
-
-
Kelvin Li authored
Clang fails to diagnose cases such as #pragma omp target while(0) { #pragma omp teams {} } A patch by David Sheinkman. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273908 91177308-0d34-0410-b5e6-96231b3b80d8
-
http://reviews.llvm.org/D21564Carlo Bertolli authored
[OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for' This patch is an initial implementation for #distribute parallel for. The main differences that affect other pragmas are: The implementation of 'distribute parallel for' requires blocking of the associated loop, where blocks are "distributed" to different teams and iterations within each block are scheduled to parallel threads within each team. To implement blocking, sema creates two additional worksharing directive fields that are used to pass the team assigned block lower and upper bounds through the outlined function resulting from 'parallel'. In this way, scheduling for 'for' to threads can use those bounds. As a consequence of blocking, the stride of 'distribute' is not 1 but it is equal to the blocking size. This is returned by the runtime and sema prepares a DistIncrExpr variable to hold that value. As a consequence of blocking, the global upper bound (EnsureUpperBound) expression of the 'for' is not the original loop upper bound (e.g. in for(i = 0 ; i < N; i++) this is 'N') but it is the team-assigned block upper bound. Sema creates a new expression holding the calculation of the actual upper bound for 'for' as UB = min(UB, PrevUB), where UB is the loop upper bound, and PrevUB is the team-assigned block upper bound. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273884 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 24, 2016
-
-
Carlo Bertolli authored
[OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273709 91177308-0d34-0410-b5e6-96231b3b80d8
-
Carlo Bertolli authored
http://reviews.llvm.org/D21564 This patch is an initial implementation for #distribute parallel for. The main differences that affect other pragmas are: The implementation of 'distribute parallel for' requires blocking of the associated loop, where blocks are "distributed" to different teams and iterations within each block are scheduled to parallel threads within each team. To implement blocking, sema creates two additional worksharing directive fields that are used to pass the team assigned block lower and upper bounds through the outlined function resulting from 'parallel'. In this way, scheduling for 'for' to threads can use those bounds. As a consequence of blocking, the stride of 'distribute' is not 1 but it is equal to the blocking size. This is returned by the runtime and sema prepares a DistIncrExpr variable to hold that value. As a consequence of blocking, the global upper bound (EnsureUpperBound) expression of the 'for' is not the original loop upper bound (e.g. in for(i = 0 ; i < N; i++) this is 'N') but it is the team-assigned block upper bound. Sema creates a new expression holding the calculation of the actual upper bound for 'for' as UB = min(UB, PrevUB), where UB is the loop upper bound, and PrevUB is the team-assigned block upper bound. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273705 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 23, 2016
-
-
Richard Smith authored
-Wfor-loop-analysis warnings for a for-loop with a condition variable. In such a case, the loop condition variable is modified on each iteration of the loop by definition. Original commit message: Rearrange condition handling so that semantic checks on a condition variable are performed before the other substatements of the construct are parsed, rather than deferring them until the end. This allows better error recovery from semantic errors in the condition, improves diagnostic order, and is a prerequisite for C++17 constexpr if. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273600 91177308-0d34-0410-b5e6-96231b3b80d8
-
Peter Collingbourne authored
as it caused a regression in -Wfor-loop-analysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273589 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
are performed before the other substatements of the construct are parsed, rather than deferring them until the end. This allows better error recovery from semantic errors in the condition, improves diagnostic order, and is a prerequisite for C++17 constexpr if. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273548 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 21, 2016
-
-
Tim Shen authored
Since D21243 fixes relative clang-tidy tests. This reverts commit a71d9fbd. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273312 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 15, 2016
-
-
Alexey Bataev authored
instantiation. Added checks for non-dependent context when trygin to capture non-constant schedule chunk expression for proper codegen of outlined functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272775 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 09, 2016
-
-
Tim Shen authored
This reverts r272296, since there are clang-tidy failures that appear to be caused by this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272310 91177308-0d34-0410-b5e6-96231b3b80d8
-
Tim Shen authored
These ExprWithCleanups are added for holding a RunCleanupsScope not for destructor calls; rather, they are for lifetime marks. This requires ExprWithCleanups to keep a bit to indicate whether it have cleanups with side effects (e.g. dtor calls). Differential Revision: http://reviews.llvm.org/D20498 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272296 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 27, 2016
-
-
Samuel Antao authored
Summary: Target regions require globals to be captured. This patch fixes a bug exposed when that happens in a template function. Reviewers: hfinkel, arpith-jacob, kkwli0, carlo.bertolli, ABataev Subscribers: guansong, ABataev, cfe-commits, caomhin, fraggamuffin Differential Revision: http://reviews.llvm.org/D18110 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271001 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 26, 2016
-
-
Samuel Antao authored
Summary: The patch contains the parsing and sema support for the `from` clause. Patch based on the original post by Kelvin Li. Reviewers: hfinkel, carlo.bertolli, kkwli0, arpith-jacob, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D18488 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270882 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
Summary: The patch contains the parsing and sema support for the `to` clause. Patch based on the original post by Kelvin Li. Reviewers: carlo.bertolli, hfinkel, kkwli0, arpith-jacob, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D18597 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270880 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
Summary: This patch is to add parsing and sema support for `target update` directive. Support for the `to` and `from` clauses will be added by a different patch. This patch also adds support for other clauses that are already implemented upstream and apply to `target update`, e.g. `device` and `if`. This patch is based on the original post by Kelvin Li. Reviewers: hfinkel, carlo.bertolli, kkwli0, arpith-jacob, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D15944 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270878 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 25, 2016
-
-
Alexey Bataev authored
OpenMP 4.5 adds support for doacross loop synchronization. Patch implements codegen for this construct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270690 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 17, 2016
-
-
Alexey Bataev authored
For better performance and to unify code with offloading part we pass scalar firstprivate values by value, instead of by reference. It will remove some extra copying operations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269751 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 09, 2016
-
-
Dmitry Polukhin authored
Support OpenMP version 4.5 syntax for #pragma omp declare target. Syntax: #pragma omp declare target (extended-list) new-line or #pragma omp declare target clause[ [,] clause ... ] new-line Where clause is one of the following: to(extended-list) link(list) Differential Revision: http://reviews.llvm.org/D20011 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268925 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 29, 2016
-
-
Alexey Bataev authored
Fixes a bug with analysis of data-sharing attributes in templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268020 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 28, 2016
-
-
Alexey Bataev authored
OpenMP 4.5 defines 'taskloop simd' directive, which is combined directive for 'taskloop' and 'simd' directives. Patch adds initial codegen support for this directive and its 2 basic clauses 'safelen' and 'simdlen'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267872 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
Summary: Implement codegen for the map clause. All the new list items in 4.5 specification are supported. Fix bug in the generation of array sections that was exposed by some of the map clause tests: for pointer types the offsets have to be calculated from the pointee not the pointer. Reviewers: hfinkel, kkwli0, carlo.bertolli, arpith-jacob, ABataev Subscribers: ABataev, cfe-commits, caomhin, fraggamuffin Differential Revision: http://reviews.llvm.org/D16749 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267808 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 26, 2016
-
-
Samuel Antao authored
Summary: This patch adds logic to save the components of mappable expressions in the clause that uses it, so that they don't have to be recomputed during codegen. Given that the mappable components are (will be) used in several clauses a new geneneric implementation `OMPMappableExprListClause` is used that extends the existing `OMPVarListClause`. This patch does not add new tests. The goal is to preserve the existing functionality while storing more info in the clauses. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: cfe-commits, caomhin Differential Revision: http://reviews.llvm.org/D19382 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267560 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 25, 2016
-
-
Alexey Bataev authored
The taskloop construct specifies that the iterations of one or more associated loops will be executed in parallel using OpenMP tasks. The iterations are distributed across tasks created by the construct and scheduled to be executed. The next code will be generated for the taskloop directive: #pragma omp taskloop num_tasks(N) lastprivate(j) for( i=0; i<N*GRAIN*STRIDE-1; i+=STRIDE ) { int th = omp_get_thread_num(); #pragma omp atomic counter++; #pragma omp atomic th_counter[th]++; j = i; } Generated code: task = __kmpc_omp_task_alloc(NULL,gtid,1,sizeof(struct task),sizeof(struct shar),&task_entry); psh = task->shareds; psh->pth_counter = &th_counter; psh->pcounter = &counter; psh->pj = &j; task->lb = 0; task->ub = N*GRAIN*STRIDE-2; task->st = STRIDE; __kmpc_taskloop( NULL, // location gtid, // gtid task, // task structure 1, // if clause value &task->lb, // lower bound &task->ub, // upper bound STRIDE, // loop increment 0, // 1 if nogroup specified 2, // schedule type: 0-none, 1-grainsize, 2-num_tasks N, // schedule value (ignored for type 0) (void*)&__task_dup_entry // tasks duplication routine ); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267395 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 22, 2016
-
-
Alexey Bataev authored
If loop control variable for simd-based directives is explicitly marked as linear/lastprivate in clauses, codegen for such construct would crash. Patch fixes this problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267101 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 20, 2016
-
-
Alexey Bataev authored
If the untied clause is present on a task construct, any thread in the team can resume the task region after a suspension. Patch adds proper codegen for untied tasks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266853 91177308-0d34-0410-b5e6-96231b3b80d8
-