summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP]Do not emit special virtual function for NVPTX target.Alexey Bataev2020-01-141-0/+34
| | | | | | There are no special virtual function handlers (like __cxa_pure_virtual) defined for NVPTX target, so just emit such functions as null pointers to prevent issues with linking and unresolved references.
* [OPENMP]Improve handling of possibly incorrectly mapped types.Alexey Bataev2020-01-141-10/+23
| | | | | Need to analayze the type of the expression for mapping, not the type of the declaration.
* [ItaniumCXXABI] Make tls wrappers properly comdatMartin Storsjö2020-01-131-3/+3
| | | | | | | | | | | | Just marking a symbol as weak_odr/linkonce_odr isn't enough for actually tolerating multiple copies of it at linking on windows, it has to be made a proper comdat; make it comdat for all platforms for consistency. This should hopefully fix https://bugzilla.mozilla.org/show_bug.cgi?id=1566288. Differential Revision: https://reviews.llvm.org/D71572
* [OPENMP]Allow comma in combiner expression.Alexey Bataev2020-01-081-2/+12
| | | | | Use ParseExpression() instead of ParseAssignmentExpression() to allow commas in combiner expressions.
* [OPENMP]Allow using of members in standalone declaration pragmas.Alexey Bataev2020-01-073-2/+17
| | | | | | | | | If standalone OpenMP declaration pragma, like declare mapper or declare reduction, is declared in the class context, it may reference a member (data or function) in its internal expressions/statements. So, the parsing of such pragmas must be dalayed just like the parsing of the member initializers/definitions before the completion of the class declaration.
* [OPENMP]Do not diagnose references to non-integral types for ref inAlexey Bataev2020-01-071-1/+2
| | | | | | declare simd. According to the standard, a list-item that appears in a linear clause without the ref modifier must be of integral or pointer type, or must be a reference to an integral or pointer type. Added check that this restriction is applied only to non-ref items.
* [OPENMP50]Support lastprivate conditional updates in inc/dec unary ops.Alexey Bataev2020-01-062-20/+60
| | | | | Added support for checking of updates of variables used in unary pre(pos) inc/dec expressions.
* [OPENMP]Fix crash on error message for declare reduction.Alexey Bataev2020-01-031-2/+2
| | | | | If the qualified reduction name is specified and not found, the compiler may crash because of not specified parameter.
* [OpenMP] diagnose zero-length array section in the depend clauseKelvin Li2020-01-0314-20/+17
| | | | | | | The OpenMP specification disallows having zero-length array sections in the depend clause (OpenMP 5.0 2.17.11). Differential Revision: https://reviews.llvm.org/D71969
* [OPENMP50]Codegen for lastprivate conditional list items.Alexey Bataev2020-01-022-15/+86
| | | | | | | | | | | | | | | | | | | | | | | | | Added codegen support for lastprivate conditional. According to the standard, if when the conditional modifier appears on the clause, if an assignment to a list item is encountered in the construct then the original list item is assigned the value that is assigned to the new list item in the sequentially last iteration or lexically last section in which such an assignment is encountered. We look for the assignment operations and check if the left side references lastprivate conditional variable. Then the next code is emitted: if (last_iv_a <= iv) { last_iv_a = iv; last_a = lp_a; } At the end the implicit barrier is generated to wait for the end of all threads and then in the check for the last iteration the private copy is assigned the last value. if (last_iter) { lp_a = last_a; // <--- new code a = lp_a; // <--- store of private value to the original variable. }
* [OPENMP] Restore allowing of braced initializers in the declare reductionAlexey Bataev2020-01-021-0/+2
| | | | | | init. Braced initializers were not accepted after the last fix in the initialier.Restored previous functionality.
* [OpenMP] Fix formatting of OpenMP error message, by Wang Tianqing.Alexey Bataev2020-01-0210-0/+35
| | | | | | | | | | | | | | Summary: `getListOfPossibleValues()` formatted incorrectly when there is only one value, emitting something like `expected 'conditional' or in OpenMP clause 'lastprivate'`. Reviewers: jdoerfert, ABataev Reviewed By: jdoerfert Subscribers: guansong, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71884
* [OPENMP]Emit artificial threprivate vars as threadlocal, if possible.Alexey Bataev2019-12-316-24/+19
| | | | It may improve performance for declare reduction constructs.
* [OpenMP][FIX] Generalize a test check lineJohannes Doerfert2019-12-301-2/+2
| | | | | | | The new check line is compatible with the clang code generation check line as it allows a 64 and 32 bit value. I hope this makes the llvm-clang-win-x-armv7l buildbot happy.
* [OpenMP] Use the OpenMPIRBuilder for `omp parallel`Johannes Doerfert2019-12-302-94/+142
| | | | | | | | | | | | This allows to use the OpenMPIRBuilder for parallel regions. Code was extracted from D61953 and adapted to work with the new version (D70109). All but one feature should be supported. An update of this patch will provide test coverage and privatization other than shared. Reviewed By: fghanim Differential Revision: https://reviews.llvm.org/D70290
* [OPENMP50]Basic support for conditional lastprivate.Alexey Bataev2019-12-2434-85/+244
| | | | Added parsing/sema checks for conditional lastprivates.
* [OPENMP50]Codegen for nontemporal clause.Alexey Bataev2019-12-238-92/+164
| | | | | | | | | | | | | | | | Summary: Basic codegen for the declarations marked as nontemporal. Also, if the base declaration in the member expression is marked as nontemporal, lvalue for member decl access inherits nonteporal flag from the base lvalue. Reviewers: rjmccall, hfinkel, jdoerfert Subscribers: guansong, arphaman, caomhin, kkwli0, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71708
* [OPENMP50]Add parsing/sema analysis for nontemporal clause.Alexey Bataev2019-12-1727-57/+1310
| | | | | Add basic support for parsing/sema analysis of the nontemporal clause in simd-based directives.
* [OPENMP50]Add if clause in target teams idistribute simd directive.Alexey Bataev2019-12-163-113/+201
| | | | | | According to OpenMP 5.0, if clause can be used in for simd directive. If condition in the if clause if false, the non-vectorized version of the loop must be executed.
* [OPENMP50]Add if clause in target teams distribute parallel for simd directive.Alexey Bataev2019-12-162-11/+29
| | | | | | According to OpenMP 5.0, if clause can be used in for simd directive. If condition in the if clause if false, the non-vectorized version of the loop must be executed.
* [OPENMP]Fix skipping of functions body.Alexey Bataev2019-12-132-10/+30
| | | | | | When parsing the code with OpenMP and the function's body must be skipped, need to skip also OpenMP annotation tokens. Otherwise the counters for braces/parens are unbalanced and parsing fails.
* [OPENMP50]Fix possible conflict when emitting an alias for the functionsAlexey Bataev2019-12-121-0/+49
| | | | | | | in declare variant. If the types of the fnction are not equal, but match, at the codegen thei may have different types. This may lead to compiler crash.
* [OPENMP50]Improve checks for declare variant functions compatibility.Alexey Bataev2019-12-122-8/+17
| | | | | Added check for functions compatibility in C and removed restriction for functions with no prototypes in declare variant constrcut.
* [OpenMP][Test] Add check for aux-triple predefined macrosAlexey Bader2019-12-121-0/+5
| | | | | | | | | | | | | | Summary: Make sure that auxiliary target specific macros are defined in OpenMP mode. Reviewers: ABataev, jdoerfert Subscribers: guansong, ebevhan, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71413
* [OpenMP] Use the OpenMP-IR-BuilderJohannes Doerfert2019-12-112-2/+21
| | | | | | | | | | | | | | | This is a follow up patch to use the OpenMP-IR-Builder, as discussed on the mailing list ([1] and later) and at the US Dev Meeting'19. [1] http://lists.flang-compiler.org/pipermail/flang-dev_lists.flang-compiler.org/2019-May/000197.html Reviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim Subscribers: ppenzin, penzn, llvm-commits, cfe-commits, jfb, guansong, bollu, hiraditya, mgorny Tags: #clang Differential Revision: https://reviews.llvm.org/D69922
* [OPENMP50]Add if clause in teams distribute parallel for simd directive.Alexey Bataev2019-12-113-16/+39
| | | | | | According to OpenMP 5.0, if clause can be used in for simd directive. If condition in the if clause if false, the non-vectorized version of the loop must be executed.
* [OPENMP50]Fix capturing of if condition in target parallel for simdAlexey Bataev2019-12-111-4/+6
| | | | | | | | directive. Fixed capturing of the if condition if no modifer was specified in this condition. Previously could capture it only in outer region and it could lead to a compiler crash.
* [OPENMP50]Add if clause in teams distribute simd directive.Alexey Bataev2019-12-113-20/+176
| | | | | | According to OpenMP 5.0, if clause can be used in for simd directive. If condition in the if clause if false, the non-vectorized version of the loop must be executed.
* [OPENMP50]Do not mark the function as used if referenced only in declareAlexey Bataev2019-12-101-0/+11
| | | | | | | | | variant directive. If the function is used only in declare variant directive as a variant function, it should not be marked as used to prevent emission of the target-specific functions. Build the reference in the unevaluated context.
* [OPENMP50]Add if clause in target simd directive.Alexey Bataev2019-12-103-109/+203
| | | | | | According to OpenMP 5.0, if clause can be used in for simd directive. If condition in the if clause if false, the non-vectorized version of the loop must be executed.
* [OPENMP]Remove extra space from error message.Alexey Bataev2019-12-105-16/+16
| | | | Fixed emission of 2 consecutive whitespaces in the error message.
* [OPENMP50]Add if clause in target parallel for simd directive.Alexey Bataev2019-12-103-46/+151
| | | | | | According to OpenMP 5.0, if clause can be used in for simd directive. If condition in the if clause is false, the non-vectorized version of the loop must be executed.
* [Frontend] Allow OpenMP offloading to aarch64Bryan Chan2019-12-081-1/+2
| | | | | | | | | | | | | | | | | | | | | Summary: D30644 added OpenMP offloading to AArch64 targets, then D32035 changed the frontend to throw an error when offloading is requested for an unsupported target architecture. However the latter did not include AArch64 in the list of supported architectures, causing the following unit tests to fail: libomptarget :: api/omp_get_num_devices.c libomptarget :: mapping/pr38704.c libomptarget :: offloading/offloading_success.c libomptarget :: offloading/offloading_success.cpp Reviewers: pawosm01, gtbercea, jdoerfert, ABataev Subscribers: kristof.beyls, guansong, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70804
* [OpenMP] Require trivially copyable type for mappingJonas Hahnfeld2019-12-0729-159/+159
| | | | | | | | | | | | | A trivially copyable type provides a trivial copy constructor and a trivial copy assignment operator. This is enough for the runtime to memcpy the data to the device. Additionally there must be no virtual functions or virtual base classes and the destructor is guaranteed to be trivial, ie performs no action. The runtime does not require trivial default constructors because on alloc the memory is undefined. Thus, weaken the warning to be only issued if the mapped type is not trivially copyable. Differential Revision: https://reviews.llvm.org/D71134
* [OPENMP50]Add if clause in distribute simd directive.Alexey Bataev2019-12-063-17/+212
| | | | | | According to OpenMP 5.0, if clause can be used in for simd directive. If condition in the if clause if false, the non-vectorized version of the loop must be executed.
* [OPENMP]Reorganize OpenMP warning groups.Alexey Bataev2019-12-064-38/+44
| | | | | openmp-mapping group is a subgroup of openmp-target warning group. Also, added global openmp group to control all other OpenMP warning groups.
* [OPENMP]Moved warning fo mapping non-trivially copiable types into aAlexey Bataev2019-12-0676-548/+548
| | | | | | | separate group. Need to move this warning into a separate group to make easier to disable this warning, if required.
* [OpenMP50] Add parallel master constructcchen2019-12-0513-0/+2709
| | | | | | | | | | | | Reviewers: ABataev, jdoerfert Reviewed By: ABataev Subscribers: rnk, jholewinski, guansong, arphaman, jfb, cfe-commits, sandoval, dreachem Tags: #clang Differential Revision: https://reviews.llvm.org/D70726
* [OPENMP50]Add support for if clause for simd part in distribute parallel for ↵Alexey Bataev2019-12-052-8/+31
| | | | | | | simd directive. According to OpenMP 5.0, the if clause can be applied to simd subdirective in the combined directives.
* [OPENMP50]Add support for if clause for simd part in parallel master ↵Alexey Bataev2019-12-052-12/+35
| | | | | | | taskloop simd directive. According to OpenMP 5.0, the if clause can be applied to simd subdirective in the combined directives.
* [OPENMP50]Add support for if clause for simd part in master taskloop simd ↵Alexey Bataev2019-12-052-17/+42
| | | | | | | directive. According to OpenMP 5.0, the if clause can be applied to simd subdirective in the combined directives.
* Revert "[OpenMP50] Add parallel master construct, by Chi Chun Chen."Reid Kleckner2019-12-0413-2709/+0
| | | | | | This reverts commit 713dab21e27c987b9114547ce7136bac2e775de9. Tests do not pass on Windows.
* [OPENMP50]Add support for if clause for simd part in taskloop simdAlexey Bataev2019-12-042-13/+33
| | | | | | | directive. According to OpenMP 5.0, the `if` clause can be applied to simd subdirective in the combined directive.
* [OpenMP50] Add parallel master construct, by Chi Chun Chen.cchen2019-12-0413-0/+2709
| | | | | | | | | | | | Reviewers: ABataev, jdoerfert Reviewed By: ABataev Subscribers: jholewinski, guansong, arphaman, jfb, cfe-commits, sandoval, dreachem Tags: #clang Differential Revision: https://reviews.llvm.org/D70726
* [OPENMP]Fix PR44133: Emit definitions of used constructors/functions.Alexey Bataev2019-12-021-5/+7
| | | | | Need to fully rebuild the initializer/combiner when instatiating the declare reduction constrcut to properly emit used functions.
* [OpenMP][test] Fix test on MIPS-based buildbotsMiloš Stojanović2019-11-281-1/+1
| | | | | | On MIPS `zeroext` or `signext` can appear in the output. Differential Revision: https://reviews.llvm.org/D70820
* [OPENMP50]Add if clause in parallel for simd directive.Alexey Bataev2019-11-271-43/+124
| | | | | According to OpenMP 5.0, if clause can be used in parallel for simd directive. If condition in the if clause if false, the non-vectorized version of the loop must be executed.
* [OPENMP]Fix PR44133: crash on lambda reductions in templates.Alexey Bataev2019-11-261-0/+43
| | | | | | Need to perform the instantiation of the combiner/initializer even if the resulting type is not dependent, if the construct is defined in templates in some cases.
* [OPENMP]Fix PR41826: symbols visibility in device code.Alexey Bataev2019-11-255-27/+27
| | | | | | | | | | | | | | | | | | Summary: Currently, we ignore all locality attributes/info when building for the device and thus all symblos are externally visible and can be preemted at the runtime. It may lead to incorrect results. We need to follow the same logic, compiler uses for static/pie builds. But in some cases changing of dso locality may lead to problems with codegen, so instead mark external symbols as hidden instead in the device code. Reviewers: jdoerfert Subscribers: guansong, caomhin, kkwli0, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70549
* [OPENMP]Fix behaviour of defaultmap for OpenMP 4.5.Alexey Bataev2019-11-221-7/+7
| | | | | | In OpenMP 4.5 pointers also must be considered as scalar types and defaultmap(tofrom:scalar) clause must affect mapping of the pointers too.
OpenPOWER on IntegriCloud