Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information