[all-commits] [llvm/llvm-project] a9a5af: [flang][openacc] Support early return in acc.loop ...
Valentin Clement (バレンタイン クレメン) via All-commits
all-commits at lists.llvm.org
Thu Nov 30 14:25:20 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a9a5af82704d772509ccef87991384f47b65884d
https://github.com/llvm/llvm-project/commit/a9a5af82704d772509ccef87991384f47b65884d
Author: Valentin Clement (バレンタイン クレメン) <clementval at gmail.com>
Date: 2023-11-30 (Thu, 30 Nov 2023)
Changed paths:
M flang/include/flang/Lower/OpenACC.h
M flang/lib/Lower/Bridge.cpp
M flang/lib/Lower/OpenACC.cpp
A flang/test/Lower/OpenACC/acc-loop-exit.f90
Log Message:
-----------
[flang][openacc] Support early return in acc.loop (#73841)
Early return is accepted in OpenACC loop not directly nested in a
compute construct. Since acc.loop operation has a region, the
`func.return` operation cannot be directly used inside the region.
An early return is materialized by an `acc.yield` operation returning a
`true` value. The standard end of the `acc.loop` region yield a `false`
value in this case.
A conditional branch operation on the `acc.loop` result will branch to
the `finalBlock` or just to the continue block whether an early exit was
produce in the acc.loop.
More information about the All-commits
mailing list