summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP
Commit message (Collapse)AuthorAgeFilesLines
...
* [OPENMP] Remove more empty SourceLocations() from the code.Alexey Bataev2018-01-234-0/+7
| | | | | | | Removed more empty SourceLocations() from the OpenMP code and replaced with the correct locations for better debug info emission. llvm-svn: 323232
* Change memcpy/memove/memset to have dest and source alignment attributes ↵Daniel Neilson2018-01-1953-325/+325
| | | | | | | | | | | | | | | | | | | | | | | | | | | (Step 1). Summary: Upstream LLVM is changing the the prototypes of the @llvm.memcpy/memmove/memset intrinsics. This change updates the Clang tests for this change. The @llvm.memcpy/memmove/memset intrinsics currently have an explicit argument which is required to be a constant integer. It represents the alignment of the dest (and source), and so must be the minimum of the actual alignment of the two. This change removes the alignment argument in favour of placing the alignment attribute on the source and destination pointers of the memory intrinsic call. For example, code which used to read: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dest, i8* %src, i32 100, i32 4, i1 false) will now read call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %dest, i8* align 4 %src, i32 100, i1 false) At this time the source and destination alignments must be the same (Step 1). Step 2 of the change, to be landed shortly, will relax that contraint and allow the source and destination to have different alignments. llvm-svn: 322964
* [OpenMP] Correct generation of offloading entriesJonas Hahnfeld2018-01-181-24/+24
| | | | | | | | | | | Firstly, each offloading entry must have a unique name or the linker will complain if there are multiple files with target regions. Secondly, the compiler must not introduce padding so mark the struct with a PackedAttr. Differential Revision: https://reviews.llvm.org/D42168 llvm-svn: 322858
* Update for llvm change.Rafael Espindola2018-01-189-9/+9
| | | | llvm-svn: 322808
* [OPENMP] Add support for `depend` clauses on `target teams distributeAlexey Bataev2018-01-161-0/+261
| | | | | | | | | parallel for simd` directives. Added codegen for `depend` clauses on `#pragma omp target teams distribute parallel for simd` directives. llvm-svn: 322587
* [OPENMP] Add support for `depend` on `target teams distribute parallelAlexey Bataev2018-01-161-0/+261
| | | | | | | | | for` directives. Added codegen for `depend` clauses on `#pragma omp target teams distribute parallel for` directives. llvm-svn: 322585
* [OPENMP] Add support for `depend` clauses on `target parallel for simd`Alexey Bataev2018-01-161-0/+261
| | | | | | | | | directives. Added codegen for `depend` clauses on `#pragma omp target parallel for simd` directives. llvm-svn: 322578
* [OPENMP] Add support for `depend` clauses on `target parallel for`Alexey Bataev2018-01-161-0/+261
| | | | | | | | | directives. Added codegen for `depend` clause on `#pragma omp target parallel for` directives. llvm-svn: 322577
* [OPENMP] Add support for `depend` clauses on `target teams distributeAlexey Bataev2018-01-161-0/+261
| | | | | | | | | simd` directives. Added codegen for `depend` clauses on `#pragma omp target teams distribute simd` directives. llvm-svn: 322575
* [OPENMP] Add support for `depend` clause on `target teams distribute`.Alexey Bataev2018-01-161-0/+261
| | | | | | | Added codegen for `depend` clauses on `#pragma omp target teams distribute` directives. llvm-svn: 322571
* [OPENMP] Add support for `depend` clauses on `target parallel` directive.Alexey Bataev2018-01-161-0/+261
| | | | | | | Added codegen for `depend` clauses on `#pragma omp target parallel` directives. llvm-svn: 322570
* [OPENMP] Add support for `depend` clauses on `target teams`.Alexey Bataev2018-01-161-0/+261
| | | | | | | Added codegen for `depend` clause on `#pragma omp target teams` directives. llvm-svn: 322569
* [OPENMP] Add support for `depend` clauses on `target simd`.Alexey Bataev2018-01-161-0/+261
| | | | | | | Added codegen for `depend` clauses on `#pragma omp target simd` directives. llvm-svn: 322559
* [OPENMP] Initial codegen for `target teams distribute parallel forAlexey Bataev2018-01-1512-0/+3491
| | | | | | | | | simd`. Added host codegen + codegen for devices with default codegen for `#pragma omp target teams distribute parallel for simd` directive. llvm-svn: 322515
* [OPENMP] Add codegen for `depend` clauses on `target` directive.Alexey Bataev2018-01-159-50/+315
| | | | | | | Added basic support for codegen of `depend` clauses on `target` directive. llvm-svn: 322501
* [OPENMP] Replace calls of getAssociatedStmt().Alexey Bataev2018-01-129-72/+23
| | | | | | | | | | | | | getAssociatedStmt() returns the outermost captured statement for the OpenMP directive. It may return incorrect region in case of combined constructs. Reworked the code to reduce the number of calls of getAssociatedStmt() and used getInnermostCapturedStmt() and getCapturedStmt() functions instead. In case of firstprivate variables it may lead to an extra allocas generation for private copies even if the variable is passed by value into outlined function and could be used directly as private copy. llvm-svn: 322393
* Make internal/private GVs implicitly dso_local.Rafael Espindola2018-01-118-8/+8
| | | | | | | | | | | | | | | | While updating clang tests for having clang set dso_local I noticed that: - There are *a lot* of tests to update. - Many of the updates are redundant. They are redundant because a GV is "obviously dso_local". This patch starts formalizing that a bit by requiring that internal and private GVs be dso_local too. Since they all are, we don't have to print dso_local to the textual representation, making it a bit more compact and easier to read. llvm-svn: 322318
* [OpenMP] Fix handling of clause on wrong directive, by Joel. E. DennyAlexey Bataev2018-01-096-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: First, this patch fixes an assert failure when, for example, "omp for" has num_teams. Second, this patch prevents duplicate diagnostics when, for example, "omp for" has uniform. This patch makes the general assumption (even where it doesn't necessarily fix an existing bug) that it is worthless to perform sema for a clause that appears on a directive on which OpenMP does not permit that clause. However, due to this assumption, this patch suppresses some diagnostics that were expected in the test suite. I assert that those diagnostics were likely just distracting to the user. Reviewers: ABataev Reviewed By: ABataev Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D41841 llvm-svn: 322107
* [OPENMP] Fix debug info for outlined functions in NVPTX + add more tests.Alexey Bataev2018-01-086-68/+110
| | | | | | | Fixed name of emitted outlined functions in NVPTX target + extra tests for the debug info. llvm-svn: 322022
* [OPENMP] Fix capturing of expressions in clauses.Alexey Bataev2018-01-041-36/+47
| | | | | | | | Patch fixes incorrect capturing of the expressions in clauses with expressions that must be captured for the combined constructs. Incorrect capturing may lead to compiler crash during codegen phase. llvm-svn: 321820
* [OPENMP] Fix casting in NVPTX support library.Alexey Bataev2018-01-042-35/+16
| | | | | | | | If the reduction required shuffle in the NVPTX codegen, we may need to cast the reduced value to the integer type. This casting was implemented incorrectly and may cause compiler crash. Patch fixes this problem. llvm-svn: 321818
* [OPENMP] Add debug info for generated functions.Alexey Bataev2018-01-041-3/+3
| | | | | | | Most of the generated functions for the OpenMP were generated with disabled debug info. Patch fixes this for better user experience. llvm-svn: 321816
* [OpenMP] Initial implementation of code generation for pragma 'target teams ↵Carlo Bertolli2018-01-0310-0/+2928
| | | | | | | | | | distribute parallel for' on host https://reviews.llvm.org/D41709 This patch includes code generation and testing for offloading when target device is host. llvm-svn: 321759
* [WinEH] Allow for multiple terminatepadsReid Kleckner2018-01-021-10/+16
| | | | | | | | | Fixes verifier errors with Windows EH and OpenMP, which injects a terminate scope around parallel blocks. Fixes PR35778 llvm-svn: 321676
* [OPENMP] Support for -fopenmp-simd option with compilation of simd loopsAlexey Bataev2017-12-29762-997/+5020
| | | | | | | | | only. Added support for -fopenmp-simd option that allows compilation of simd-based constructs without emission of OpenMP runtime calls. llvm-svn: 321560
* [OPENMP] Initial support for `-fopenmp-simd` option.Alexey Bataev2017-12-293-0/+24
| | | | | | Added basic support for `-fopenmp-simd` options. llvm-svn: 321558
* [OPENMP] Support for `depend` clauses on `target enter|exit data`.Alexey Bataev2017-12-272-0/+756
| | | | | | Added codegen for `depend` clauses on `target enter|exit data` directives. llvm-svn: 321495
* [OPENMP] Support for `depend` clauses on `target data update`.Alexey Bataev2017-12-271-0/+378
| | | | | | Added codegen for `depend` clauses on `target data update` directives. llvm-svn: 321493
* [OpenMP] Further adjustments of nvptx runtime functionsJonas Hahnfeld2017-12-272-4/+4
| | | | | | | | Pass in default value of 1, similar to previous commit r318836. Differential Revision: https://reviews.llvm.org/D41012 llvm-svn: 321486
* [OPENMP] Fix the tests for 32bits targets, NFC.Alexey Bataev2017-12-242-6/+6
| | | | llvm-svn: 321427
* [OPENMP] Captured arguments of the capturable clauses by value.Alexey Bataev2017-12-223-11/+13
| | | | | | | | If the clause is applied to the combined construct and has captured expression, try to capture this expression by value rather than by reference. llvm-svn: 321386
* Re-commit r321223, which adds a printing policy to the ASTDumper.Aaron Ballman2017-12-211-68/+68
| | | | | | | | This allows you to dump C++ code that spells bool instead of _Bool, leaves off the elaborated type specifiers when printing struct or class names, and other C-isms. Fixes the -Wreorder issue and fixes the ast-dump-color.cpp test. llvm-svn: 321310
* Reverting r321223 and its follow-up commit because of failing bots due to ↵Aaron Ballman2017-12-201-68/+68
| | | | | | Misc/ast-dump-color.cpp. llvm-svn: 321229
* Add a printing policy to the ASTDumper.Aaron Ballman2017-12-201-68/+68
| | | | | | This allows you to dump C++ code that spells bool instead of _Bool, leaves off the elaborated type specifiers when printing struct or class names, and other C-isms. llvm-svn: 321223
* [OPENMP] Codegen `declare simd` for function declarations.Alexey Bataev2017-12-151-0/+29
| | | | | | | Previously the attributes were emitted only for function definitions. Patch adds emission of the attributes for function declarations. llvm-svn: 320826
* [OPENMP] Add codegen for target data constructs with `nowait` clause.Alexey Bataev2017-12-143-6/+6
| | | | | | Added codegen for the `nowait` clause in target data constructs. llvm-svn: 320717
* [OPENMP] Add codegen for `nowait` clause in target directives.Alexey Bataev2017-12-138-16/+16
| | | | | | Added basic codegen for `nowait` clauses in target-based directives. llvm-svn: 320613
* [OPENMP] Initial codegen for `target teams distribute simd` directive.Alexey Bataev2017-12-139-0/+2842
| | | | | | | Host + generic device codegen for `target teams distribute simd` directive. llvm-svn: 320608
* [OPENMP] Support `reduction` clause on target-based directives.Alexey Bataev2017-12-133-44/+508
| | | | | | | OpenMP 5.0 added support for `reduction` clause in target-based directives. Patch adds this support to clang. llvm-svn: 320596
* [OPENMP] Fix handling of clauses in clause parsing mode.Alexey Bataev2017-12-137-204/+157
| | | | | | | The compiler may generate incorrect code if we try to capture the variable in clause parsing mode. llvm-svn: 320590
* [OpenMP] Add function attribute for triggering data sharing.Gheorghe-Teodor Bercea2017-12-121-3/+8
| | | | | | | | | | | | | | | | Summary: The backend should only emit data sharing code for the cases where it is needed. A new function attribute is used by Clang to enable data sharing only for the cases where OpenMP semantics require it and there are variables that need to be shared. Reviewers: hfinkel, Hahnfeld, ABataev, carlo.bertolli, caomhin Reviewed By: ABataev Subscribers: cfe-commits, jholewinski Differential Revision: https://reviews.llvm.org/D41123 llvm-svn: 320527
* [OpenMP] Diagnose function name on the link clauseKelvin Li2017-12-122-6/+5
| | | | | | | | | | | This patch is to add diagnose when a function name is specified on the link clause. According to the OpenMP spec, only the list items that exclude the function name are allowed on the link clause. Differential Revision: https://reviews.llvm.org/D40968 llvm-svn: 320521
* Switch to gnu++14 as the default dialect.Tim Northover2017-12-092-2/+2
| | | | | | This is C++14 with conforming GNU extensions. llvm-svn: 320250
* [OPENMP] Simplify codegen for loop iteration variables in loop preamble.Alexey Bataev2017-12-086-2/+12
| | | | | | | Initial patch could cause trouble in the optimized code because of the incorrectly generated lifetime intrinsics. llvm-svn: 320191
* [OPENMP] Initial codegen for `target teams distribute` directive.Alexey Bataev2017-12-0810-14/+2846
| | | | | | Host + default devices codegen for `target teams distribute` directive. llvm-svn: 320149
* [OPENMP] Do not capture private variables in the target regions.Alexey Bataev2017-12-075-26/+24
| | | | | | | | Private variables are completely redefined in the outlined regions, so we don't need to capture them. Patch adds this behavior to the target-based regions. llvm-svn: 320078
* Fix PR35542: Correct adjusting of private reduction variableJonas Hahnfeld2017-12-062-18/+25
| | | | | | | | | | | | 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] Improve error message for mapping union members.Alexey Bataev2017-12-062-2/+2
| | | | llvm-svn: 319897
* [OPENMP] Initial codegen for `teams distribute simd` directive.Alexey Bataev2017-12-067-0/+1754
| | | | | | Host + default devices codegen for `teams distribute simd` directive. llvm-svn: 319896
* [OPENMP] Fix implicit mapping analysis.Alexey Bataev2017-12-051-1/+9
| | | | | | | Fixed processing of implicitly mapped objects in target-based executable directives. llvm-svn: 319814
OpenPOWER on IntegriCloud