| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Need to analayze the type of the expression for mapping, not the type of
the declaration.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Use ParseExpression() instead of ParseAssignmentExpression() to allow
commas in combiner expressions.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Added support for checking of updates of variables used in unary
pre(pos) inc/dec expressions.
|
|
|
|
|
| |
If the qualified reduction name is specified and not found, the compiler
may crash because of not specified parameter.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
}
|
|
|
|
|
|
| |
init.
Braced initializers were not accepted after the last fix in the initialier.Restored previous functionality.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
It may improve performance for declare reduction constructs.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Added parsing/sema checks for conditional lastprivates.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Add basic support for parsing/sema analysis of the nontemporal clause in
simd-based directives.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Added check for functions compatibility in C and removed restriction
for functions with no prototypes in declare variant constrcut.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Fixed emission of 2 consecutive whitespaces in the error message.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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-mapping group is a subgroup of openmp-target warning group. Also,
added global openmp group to control all other OpenMP warning groups.
|
|
|
|
|
|
|
| |
separate group.
Need to move this warning into a separate group to make easier to
disable this warning, if required.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
simd directive.
According to OpenMP 5.0, the if clause can be applied to simd
subdirective in the combined directives.
|
|
|
|
|
|
|
| |
taskloop simd directive.
According to OpenMP 5.0, the if clause can be applied to simd
subdirective in the combined directives.
|
|
|
|
|
|
|
| |
directive.
According to OpenMP 5.0, the if clause can be applied to simd
subdirective in the combined directives.
|
|
|
|
|
|
| |
This reverts commit 713dab21e27c987b9114547ce7136bac2e775de9.
Tests do not pass on Windows.
|
|
|
|
|
|
|
| |
directive.
According to OpenMP 5.0, the `if` clause can be applied to simd
subdirective in the combined directive.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: ABataev, jdoerfert
Reviewed By: ABataev
Subscribers: jholewinski, guansong, arphaman, jfb, cfe-commits, sandoval, dreachem
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70726
|
|
|
|
|
| |
Need to fully rebuild the initializer/combiner when instatiating the
declare reduction constrcut to properly emit used functions.
|
|
|
|
|
|
| |
On MIPS `zeroext` or `signext` can appear in the output.
Differential Revision: https://reviews.llvm.org/D70820
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
In OpenMP 4.5 pointers also must be considered as scalar types and
defaultmap(tofrom:scalar) clause must affect mapping of the pointers
too.
|