summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/for_reduction_codegen_UDR.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP]Add assignment operator in UDR test, NFC.Alexey Bataev2019-11-141-0/+1
| | | | | | Add assignment operator in the test to check that even if the operator was declare explicitly, the constructor is called in the user-defined reduction initializer anyway.
* [OPENMP]Use copy constructors instead of assignment operators in declareAlexey Bataev2019-11-121-4/+32
| | | | | | | reduction initializers. Better to use copy constructor at the initialization of the declare reduction construct rather than assignment operator.
* IR: print value numbers for unnamed function argumentsTim Northover2019-08-031-12/+12
| | | | | | | | | | For consistency with normal instructions and clarity when reading IR, it's best to print the %0, %1, ... names of function arguments in definitions. Also modifies the parser to accept IR in that form for obvious reasons. llvm-svn: 367755
* [OPENMP]Simplify codegen for the outlined regions.Alexey Bataev2019-05-231-0/+4
| | | | | | | Simplified codegen for the outlined regions, excluding duplication code for handling variables with the reference types. llvm-svn: 361529
* [OPENMP][NVPTX]Mark more functions as always_inline for betterAlexey Bataev2019-05-211-57/+98
| | | | | | | | | | | performance. Internally generated functions must be marked as always_inlines in most cases. Patch marks some extra reduction function + outlined parallel functions as always_inline for better performance, but only if the optimization is requested. llvm-svn: 361269
* [OPENMP] Sync __kmpc_alloc/_kmpc_free function with the runtime.Alexey Bataev2019-04-081-12/+14
| | | | | | | Functions __kmpc_alloc/__kmpc_free are updated with the new interfaces. Patch synchronizes the compiler with the runtime. llvm-svn: 357933
* [OPENMP]Add codegen for reduction vars with allocate clause, NFC.Alexey Bataev2019-04-031-3/+15
| | | | | | Added test for the reduction variables with the allocate clause. llvm-svn: 357629
* Revert "[CodeGenCXX] Treat 'this' as noalias in constructors"Sean Fertile2018-10-151-2/+2
| | | | | | | This reverts commit https://reviews.llvm.org/rL344150 which causes MachineOutliner related failures on the ppc64le multistage buildbot. llvm-svn: 344526
* [CodeGenCXX] Treat 'this' as noalias in constructorsAnton Bikineev2018-10-101-2/+2
| | | | | | | | | This is currently a clang extension and a resolution of the defect report in the C++ Standard. Differential Revision: https://reviews.llvm.org/D46441 llvm-svn: 344150
* [OPENMP] Create non-const ident_t objects.Mike Rice2018-08-291-3/+3
| | | | | | | | | | | 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 llvm-svn: 340934
* [FileCheck] Add -allow-deprecated-dag-overlap to failing clang testsJoel E. Denny2018-07-111-4/+4
| | | | | | | | | | See https://reviews.llvm.org/D47106 for details. Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D47172 llvm-svn: 336844
* [OPENMP] Support for -fopenmp-simd option with compilation of simd loopsAlexey Bataev2017-12-291-0/+5
| | | | | | | | | only. Added support for -fopenmp-simd option that allows compilation of simd-based constructs without emission of OpenMP runtime calls. llvm-svn: 321560
* Fix PR35542: Correct adjusting of private reduction variableJonas Hahnfeld2017-12-061-5/+8
| | | | | | | | | | | | The adjustment is calculated with CreatePtrDiff() which returns the difference in (base) elements. This is passed to CreateGEP() so make sure that the GEP base has the correct pointer type: It needs to be a pointer to the base type, not a pointer to a constant sized array. Differential Revision: https://reviews.llvm.org/D40911 llvm-svn: 319931
* [OPENMP] Fix PR35486: crash when collapsing loops with dependent iteration ↵Alexey Bataev2017-12-041-0/+1
| | | | | | | | | | 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. llvm-svn: 319700
* [OPENMP] Fix PR35013: Fix passing VLAs captures to outlined functions.Alexey Bataev2017-10-241-2/+2
| | | | | | | Fixed passing of VLAs and variably-modified types to outlined functions. Synchronized passing with the types codegen. llvm-svn: 316488
* [OpenMP] Avoid VLAs for some reductions on array sectionsJonas Hahnfeld2017-10-231-54/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases the compiler can deduce the length of an array section as constants. With this information, VLAs can be avoided in place of a constant sized array or even a scalar value if the length is 1. Example: int a[4], b[2]; pragma omp parallel reduction(+: a[1:2], b[1:1]) { } For chained array sections, this optimization is restricted to cases where all array sections except the last have a constant length 1. This trivially guarantees that there are no holes in the memory region that needs to be privatized. Example: int c[3][4]; pragma omp parallel reduction(+: c[1:1][1:2]) { } This relands commit r316229 that I reverted in r316235 because it failed on some bots. During investigation I found that this was because Clang and GCC evaluate the two arguments to emplace_back() in ReductionCodeGen::emitSharedLValue() in a different order, hence leading to a different order of generated instructions in the final LLVM IR. Fix this by passing in the arguments from temporary variables that are evaluated in a defined order. Differential Revision: https://reviews.llvm.org/D39136 llvm-svn: 316362
* Revert "[OpenMP] Avoid VLAs for some reductions on array sections"Jonas Hahnfeld2017-10-201-79/+54
| | | | | | | | | | This breaks at least two buildbots: http://lab.llvm.org:8011/builders/clang-cmake-x86_64-avx2-linux/builds/1175 http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/10478 This reverts commit r316229 during local investigation. llvm-svn: 316235
* [OpenMP] Avoid VLAs for some reductions on array sectionsJonas Hahnfeld2017-10-201-54/+79
| | | | | | | | | | | | | | | | | | | | | | | In some cases the compiler can deduce the length of an array section as constants. With this information, VLAs can be avoided in place of a constant sized array or even a scalar value if the length is 1. Example: int a[4], b[2]; pragma omp parallel reduction(+: a[1:2], b[1:1]) { } For chained array sections, this optimization is restricted to cases where all array sections except the last have a constant length 1. This trivially guarantees that there are no holes in the memory region that needs to be privatized. Example: int c[3][4]; pragma omp parallel reduction(+: c[1:1][1:2]) { } Differential Revision: https://reviews.llvm.org/D39136 llvm-svn: 316229
* [OPENMP] Codegen for reduction clauses in 'taskloop' directives.Alexey Bataev2017-07-171-1/+1
| | | | | | Adds codegen for taskloop-based directives. llvm-svn: 308174
* [OPENMP] Fix reduction tests, NFC.Alexey Bataev2017-07-131-5/+1
| | | | llvm-svn: 307916
* [OPENMP] Fix reduction tests, NFC.Alexey Bataev2017-07-131-1/+0
| | | | llvm-svn: 307915
* [OPENMP] Further reduction test fix, NFC.Alexey Bataev2017-07-131-9/+1
| | | | llvm-svn: 307914
* [OPENMP] Fix reduction tests, NFC.Alexey Bataev2017-07-131-6/+2
| | | | llvm-svn: 307912
* [OPENMP] Fix reduction tests, NFC.Alexey Bataev2017-07-131-4/+5
| | | | llvm-svn: 307911
* [OPENMP] Generalization of codegen for reduction clauses.Alexey Bataev2017-07-131-7/+8
| | | | | | | Reworked codegen for reduction clauses for future support of reductions in task-based directives. llvm-svn: 307910
* Remove unnecessary x86 backend requirements from OpenMP testsReid Kleckner2016-10-211-1/+0
| | | | | | Clang can generate LLVM IR for x86 without a registered x86 backend. llvm-svn: 284836
* Fix for PR30639: CGDebugInfo Null dereference with OpenMP arrayAlexey Bataev2016-10-131-2/+2
| | | | | | | | | | | | | access, by Erich Keane OpenMP creates a variable array type with a a null size-expr. The Debug generation failed to due to this. This patch corrects the openmp implementation, updates the tests, and adds a new one for this condition. Differential Revision: https://reviews.llvm.org/D25373 llvm-svn: 284110
* [OPENMP] Fix for codegen of captured variables in inlined directives.Alexey Bataev2016-04-271-0/+4
| | | | | | | | Currently there is a problem with codegen of inlined directives inside lambdas, it may cause a crash during codegen because of incorrect capturing of variables. Patch fixes this problem. llvm-svn: 267677
* [OPENMP 4.0] Use 'declare reduction' constructs in 'reduction' clauses.Alexey Bataev2016-03-171-0/+980
OpenMP 4.0 allows to define custom reduction operations using '#pragma omp declare reduction' construct. Patch allows to use this custom defined reduction operations in 'reduction' clauses. llvm-svn: 263701
OpenPOWER on IntegriCloud