llvm-project
1af0424f - [flang][OpenACC] simplify copy and combiner recipe generation (#164988)

Commit
68 days ago
[flang][OpenACC] simplify copy and combiner recipe generation (#164988) OpenACC copy and combiner recipe generation had non-trivial ad-hoc handling of the FIR types, and ended-up generating hlfir.assign that become runtime calls for arrays because of the lack of aliasing guarantees given to FIR for the region arguments. This code was started before HFLIR, and with HLFIR tools, most of the type specific handling can just be removed to use hlfir generic helper and assign (-230 lines in OpenACC.cpp). To avoid ending up with runtime calls in recipes: - use hlfir.assign temporary_lhs in copies to indicate that the copy cannot alias with the rhs. - add a new genNoAliasAssignment hlfir helper that takes its logic from the HLFIRInlineIntrinsic pass and allows applying a scalar combiner before generating the scalar assignments. This allows generating loops directly for the reduction and avoid having to find a clever way to signal HLFIR that the arguments do not alias (an other option would have been to introduce a dummy_scope and declares, but that would not be enough for POINTERs, and I am not sure we should start using this as a noalias operation).
Author
Parents
Loading