Commit Graph

12 Commits

Author SHA1 Message Date
Mike Rice f7e11f2036 [OPENMP] Create non-const ident_t objects.
Currently ident_t objects are created const when debug info is not
enabled, but the libittnotify libray in the OpenMP runtime writes to
the reserved_2 field (See __kmp_itt_region_forking in
openmp/runtime/src/kmp_itt.inl).  Now create ident_t objects non-const.

Differential Revision: https://reviews.llvm.org/D51331


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340934 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-29 15:45:11 +00:00
Alexey Bataev 68d230359a [OPENMP] Support for -fopenmp-simd option with compilation of simd loops
only.

Added support for -fopenmp-simd option that allows compilation of
simd-based constructs without emission of OpenMP runtime calls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321560 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-29 18:07:07 +00:00
Alexey Bataev fd1985cea5 [OPENMP] Simplify codegen for loop iteration variables in loop preamble.
Initial patch could cause trouble in the optimized code because of the
incorrectly generated lifetime intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320191 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-08 20:18:58 +00:00
Alexey Bataev d80ab9d1a5 [OPENMP] Fix PR35486: crash when collapsing loops with dependent iteration spaces.
Though it is incorrect from point of view of OpenMP standard to have
dependent iteration space in OpenMP loops, compiler should not crash.
Patch fixes this problem.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319700 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-04 21:30:42 +00:00
Alexey Bataev 5b6371013b [OPENMP] Fix for PR28581: OpenMP linear clause - wrong results.
If worksharing construct has at least one linear item, an implicit
synchronization point must be emitted to avoid possible conflict with
the loading/storing values to the original variables. Added implicit
barrier if the linear item is found before actual start of the
worksharing construct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311013 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-16 15:58:46 +00:00
Reid Kleckner 343e2302c8 Remove unnecessary x86 backend requirements from OpenMP tests
Clang can generate LLVM IR for x86 without a registered x86 backend.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284836 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-21 16:09:20 +00:00
Alexey Bataev b8ec8af977 [OPENMP 4.5] Codegen for data members in 'linear' clause
OpenMP 4.5 allows privatization of non-static data members in OpenMP
constructs. Patch adds proper codegen support for data members in
'linear' clause

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263003 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-09 09:49:09 +00:00
Alexey Bataev dfff1f2666 [OPENMP] Emit __kmpc_cancel_barrier() and code for 'cancellation point' only if 'cancel' is found.
Patch improves codegen for OpenMP constructs. If the OpenMP region does not have internal 'cancel' construct, a call to 'void __kmpc_barrier()' runtime function is generated for all implicit/explicit barriers. If the region has inner 'cancel' directive, then
```
if (__kmpc_cancel_barrier())
  exit from outer construct;
```
code is generated.
Also, the code for 'canellation point' directive is not generated if parent directive does not have 'cancel' directive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247681 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-15 12:52:43 +00:00
Alexey Bataev d83cd0531d [OPENMP] Outlined function for parallel and other regions with list of captured variables.
Currently all variables used in OpenMP regions are captured into a record and passed to outlined functions in this record. It may result in some poor performance because of too complex analysis later in optimization passes. Patch makes to emit outlined functions for parallel-based regions with a list of captured variables. It reduces code for 2*n GEPs, stores and loads at least.
Codegen for task-based regions remains unchanged because runtime requires that all captured variables are passed in captured record.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247251 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-10 08:12:02 +00:00
Alexey Bataev 2b35206250 [OPENMP] Fix for http://llvm.org/PR24674: assertion failed and and abort trap
Fix processing of shared variables with reference types in OpenMP constructs. Previously, if the variable was not marked in one of the private clauses, the reference to this variable was emitted incorrectly and caused an assertion later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246846 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 11:26:21 +00:00
Alexey Bataev 8e92d549be [OPENMP 4.1] Allow variables with reference types in private clauses.
OpenMP 4.1 allows to use variables with reference types in all private clauses (private, firstprivate, lastprivate, linear etc.). Patch allows to use such variables and fixes codegen for linear variables with reference types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245268 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-18 06:47:21 +00:00
Alexey Bataev e77f872c9e [OPENMP 4.1] Support for 'linear' clause in loop directives.
OpenMP 4.1 allows 'linear' clause in loop directives. Patch adds support for it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243969 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-04 11:18:19 +00:00