[all-commits] [llvm/llvm-project] 6ffd67: [flang][hlfir] Propagate acc.declare from hlfir.de...
Slava Zakharin via All-commits
all-commits at lists.llvm.org
Thu Aug 10 21:09:23 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6ffd67ad56141a7cb6a5a8571091d2f70e94cfa7
https://github.com/llvm/llvm-project/commit/6ffd67ad56141a7cb6a5a8571091d2f70e94cfa7
Author: Slava Zakharin <szakharin at nvidia.com>
Date: 2023-08-10 (Thu, 10 Aug 2023)
Changed paths:
M flang/lib/Optimizer/HLFIR/Transforms/ConvertToFIR.cpp
A flang/test/Lower/OpenACC/HLFIR/acc-declare.f90
Log Message:
-----------
[flang][hlfir] Propagate acc.declare from hlfir.declare to fir.declare.
The declare enter operations are failing verification after HLFIR to FIR
conversion, because we drop acc.declare attribute when converting
hlfir.declare to fir.declare. This patch just propagates all attributes
during the conversion. This may need to be changed in future, if some
attributes are invalid for fir.declare or they need to be mapped
into other attributes.
The added LIT test is a copy of Lower/OpenACC/acc-declare.f90
with the updated checks. It tests HLFIR after lowering and FIR
after HLFIR-to-FIR conversion.
The Lower/OpenACC/acc-declare.f90 is being actively changed, so
it may be better to put the new RUN commands and the new checks
into the original file. For example, when you add more testing
for OpenACC declare in Lower/OpenACC/acc-declare.f90, you
add checks just for FIR-lowering path. I will be able to add
HLFIR checks later for those pieces. When you change something
for the existing OpenACC declare, you will have to update
the checks for all three pipelines. Alternatively, we can keep
it in a separate file, but this will complicate the migration
a little bit. Please let me know what you would prefer.
Reviewed By: razvanlupusoru, clementval
Differential Revision: https://reviews.llvm.org/D157560
More information about the All-commits
mailing list