| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Added basic parsing/sema support for device/kind context selector.
Reviewers: jdoerfert
Subscribers: rampitec, aheejin, fedor.sergeev, simoncook, guansong, s.egerton, hfinkel, kkwli0, caomhin, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70245
|
|
|
|
|
|
|
|
| |
directives.
If the default datasharing is set to none, the datasharing attributes
for variables in the condition of the if clause for the inner taskloop
directive must be verified.
|
|
|
|
|
|
| |
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 simd directive. If
condition in the if clause if false, the non-vectorized version of the
loop must be executed.
|
|
|
|
|
| |
If the code is emitted for distribute construct, the nonmonotonic
modifier should not be added.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
For the extended defaultmap, most of the work is inside sema.
The only difference for codegen is to set different initial
maptype for different implicit-behavior.
Reviewers: jdoerfert, ABataev
Reviewed By: ABataev
Subscribers: dreachem, sandoval, cfe-commits
Tags: #clang, #openmp
Differential Revision: https://reviews.llvm.org/D69204
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
reduction initializers.
Better to use copy constructor at the initialization of the declare
reduction construct rather than assignment operator.
|
|
|
|
|
|
|
|
| |
simd-based directives.
According to OpenMP 5.0 standard, ordered simd, atomic and simd
directives are allowed as nested directives in the simd-based
directives.
|
|
|
|
|
|
| |
If the context selector score was not specified, its value must be set
to 0. Simplify the processing of unspecified scores + save memory in
attribute representation.
|
|
|
|
| |
Improved diagnostics for better user experience.
|
|
|
|
| |
Added support for imperfectly nested loops introduced in OpenMP 5.0.
|
|
|
|
| |
Added full support for parallel master taskloop simd directive.
|
|
|
|
|
|
| |
Need to analyze inner target regions in case of implicit mapping of the
data members when target region is created in one of the class member
functions.
|
|
|
|
| |
If the variable is a constexpr variable, it should not be captured in the OpenMP region.
|
|
|
|
|
| |
Several of these other functions are probably also convergent, but
these two seem obviously convergent.
|
|
|
|
|
|
| |
Added trsing/semantics/codegen for combined construct master taskloop simd.
llvm-svn: 375255
|
|
|
|
|
|
|
| |
In OpenMP constructs all counters are initialized and we should not emit
warnings about uninitialized privatized loop control variables.
llvm-svn: 375167
|
|
|
|
|
|
|
|
| |
If we can determined, that the global tid parameter can be used in the
function, better to use it rather than calling __kmpc_global_thread_num
function.
llvm-svn: 375134
|
|
|
|
|
|
|
|
|
| |
regions.
The real global thread id must be passed to the outlined region instead
of the zero thread id.
llvm-svn: 375119
|
|
|
|
|
|
|
| |
The expression of the priority clause must be captured in the combined
task-based directives, like 'parallel master taskloop' directive.
llvm-svn: 375026
|
|
|
|
|
|
|
|
| |
When the parallel region is called directly in the sequential region,
the zeroed tid/bound id are used. But they must point to the different
memory locations as the parameters are marked as noalias.
llvm-svn: 375017
|
|
|
|
|
|
|
| |
The condition of the final clause must be captured in the combined
task-based directives, like 'parallel master taskloop' directive.
llvm-svn: 374942
|
|
|
|
|
|
|
|
|
|
| |
The final list of OpenMP offload targets becomes known only at the link time and since offload registration code depends on the targets list it makes sense to delay offload registration code generation to the link time instead of adding it to the host part of every fat object. This patch moves offload registration code generation from clang to the offload wrapper tool.
This is the last part of the OpenMP linker script elimination patch https://reviews.llvm.org/D64943
Differential Revision: https://reviews.llvm.org/D68746
llvm-svn: 374937
|
|
|
|
|
|
|
| |
The expression of the num_tasks clause must be captured in the combined
task-based directives, like 'parallel master taskloop' directive.
llvm-svn: 374819
|
|
|
|
|
|
|
| |
The expression of the grainsize clause must be captured in the combined
task-based directives, like 'parallel master taskloop' directive.
llvm-svn: 374810
|
|
|
|
|
|
|
|
|
| |
Added parsing/sema/codegen support for 'parallel master taskloop'
constructs. Some of the clauses, like 'grainsize', 'num_tasks', 'final'
and 'priority' are not supported in full, only constant expressions can
be used currently in these clauses.
llvm-svn: 374791
|
|
|
|
|
|
|
|
|
|
|
| |
constructs.
If OpenMP construct includes several capturing regions and the variable
is declared as private, the length of the inner variable length array is
not captured in outer captured regions, only in the innermost region.
Patch fixes this bug.
llvm-svn: 374787
|
|
|
|
|
|
| |
Added full support for master taskloop directive.
llvm-svn: 374437
|
|
|
|
|
|
|
| |
NVPTX does not support global aliases. Instead, we have to copy the full
body of the variant function for the original function.
llvm-svn: 374387
|
|
|
|
|
|
|
| |
No need to store multiple copies of the same vendor names in the context
selector, keep only single copy.
llvm-svn: 374363
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CUDA/HIP program may be compiled with -fopenmp. In this case, -fopenmp is only passed to host compilation
to take advantages of multi-threads computation.
CUDA/HIP and OpenMP both use Sema::DeviceCallGraph to store functions to be analyzed and remove them
once they decide the function is sure to be emitted. CUDA/HIP and OpenMP have different functions to determine
if a function is sure to be emitted.
To check host/device correctly for CUDA/HIP when -fopenmp is enabled, there needs a unified logic to determine
whether a function is to be emitted. The logic needs to be aware of both CUDA and OpenMP logic.
Differential Revision: https://reviews.llvm.org/D67837
llvm-svn: 374263
|
|
|
|
|
|
|
| |
The context selector with user provided score must have higher score
than the context selector without user provided score.
llvm-svn: 374224
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and of vendors, not or.
If several vendors are provided in the same vendor context trait, the
context shall match only if all vendors are matching, not one of them.
This is per OpenMP 5.0, 2.3.3 Matching and Scoring Context Selectors,
all selectors in the construct, device, and implementation sets of the
context selector appear in the corresponding trait set of the OpenMP
context.
llvm-svn: 374107
|
|
|
|
|
|
|
|
|
|
| |
selector.
According to OpenMP 5.0, 2.3.2 Context Selectors, Restrictions, each
trait-selector-name can only be specified once. Added check for this
restriction.
llvm-svn: 374093
|
|
|
|
|
|
|
|
| |
According to OpenMP 5.0, 2.3.2 Context Selectors, Restrictions, each
trait-set-selector-name can only be specified once. Added check to
implement this restriction.
llvm-svn: 374072
|
|
|
|
|
|
|
|
|
|
| |
C linkage.
After some discussion with OpenMP developers, it was decided that the
functions with the different C linkage can be used in declare variant
directive.
llvm-svn: 374057
|
|
|
|
|
|
|
| |
According to OpenMP 5.0, range-based for is also considered as a
canonical form of loops.
llvm-svn: 373939
|
|
|
|
|
|
|
|
|
| |
selector.
According to OpenMP 5.0, multiple vendors could be specified in the
vendor context selector via ',' as a separator.
llvm-svn: 373756
|
|
|
|
| |
llvm-svn: 373672
|
|
|
|
|
|
|
|
| |
If the context selector has associated score and several contexts
selectors matches current context, the function with the highest score
must be selected.
llvm-svn: 373661
|
|
|
|
|
|
|
| |
Declare target variables must be emitted in device mode, target triples
can be empty in this case.
llvm-svn: 373624
|
|
|
|
|
|
|
| |
We can point to the target region + emit parent functions names/real var
names if they were not found in host module during device codegen.
llvm-svn: 373620
|
|
|
|
|
|
|
|
| |
Context selectors may include optional score clause in format
`score(<expr>):`, where `<expr>` must be a constant integer expression.
Added parsing/sema analysis only.
llvm-svn: 373502
|
|
|
|
|
|
|
| |
Initial implementation of global aliases emission for the declare
variant pragma with implementation vendor context selector set.
llvm-svn: 373387
|
|
|
|
|
|
| |
Fixed calculation the size of the array sections.
llvm-svn: 373374
|
|
|
|
|
|
|
|
|
| |
loop.
Missed check if the condition is also dependent when building final
expressions for the collapsed loop directives.
llvm-svn: 373348
|
|
|
|
|
|
| |
Attribute must be inherited by the redeclarations.
llvm-svn: 373257
|
|
|
|
|
|
|
|
|
| |
defined body.
If the function is currently defined, we should not emit a warning that
it might be emitted already because it was not really emitted.
llvm-svn: 373243
|
|
|
|
|
|
|
|
|
|
|
|
| |
table with a help of a linker
Linker automatically provides __start_<section name> and __stop_<section name> symbols to satisfy unresolved references if <section name> is representable as a C identifier (see https://sourceware.org/binutils/docs/ld/Input-Section-Example.html for details). These symbols indicate the start address and end address of the output section respectively. Therefore, renaming OpenMP offload entries section name from ".omp.offloading_entries" to "omp_offloading_entries" to use this feature.
This is the first part of the patch for eliminating OpenMP linker script (please see https://reviews.llvm.org/D64943).
Differential Revision: https://reviews.llvm.org/D68070
llvm-svn: 373118
|