History log of /llvm-project/flang/lib/Common/OpenMP-utils.cpp (Results 1 – 2 of 2)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# 8fe11a26 14-Jan-2025 Sergio Afonso <safonsof@amd.com>

[Flang][OpenMP] Lowering of host-evaluated clauses (#116219)

This patch adds support for lowering OpenMP clauses and expressions
attached to constructs nested inside of a target region that need to

[Flang][OpenMP] Lowering of host-evaluated clauses (#116219)

This patch adds support for lowering OpenMP clauses and expressions
attached to constructs nested inside of a target region that need to be
evaluated in the host device. This is done through the use of the
`OpenMP_HostEvalClause` `omp.target` set of operands and entry block
arguments.

When lowering clauses for a target construct, a more involved
`processHostEvalClauses()` function is called, which looks at the
current and potentially other nested constructs in order to find and
lower clauses that need to be processed outside of the `omp.target`
operation under construction. This populates an instance of a global
structure with the resulting MLIR values.

The resulting list of host-evaluated values is used to initialize the
`host_eval` operands when constructing the `omp.target` operation, and
then replaced with the corresponding block arguments after creating that
operation's region.

Afterwards, while lowering nested operations, those that might
potentially be evaluated on the host (i.e. `num_teams`, `thread_limit`,
`num_threads` and `collapse`) check first whether there is an active
global host-evaluated information structure and whether it holds values
referring to these clauses. If that is the case, the stored values
(`omp.target` entry block arguments at that stage) are used instead of
lowering these clauses again.

show more ...


Revision tags: llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5
# 81f544d4 28-Nov-2024 Kareem Ergawy <kareem.ergawy@amd.com>

[flang][OpenMP] Rewrite `omp.loop` to semantically equivalent ops (#115443)

Introduces a new conversion pass that rewrites `omp.loop` ops to their
semantically equivalent op nests bases on the surr

[flang][OpenMP] Rewrite `omp.loop` to semantically equivalent ops (#115443)

Introduces a new conversion pass that rewrites `omp.loop` ops to their
semantically equivalent op nests bases on the surrounding/binding
context of the `loop` op. Not all forms of `omp.loop` are supported yet.
See `isLoopConversionSupported` for more info on which forms are
supported.

show more ...