Lower multi-dimensional arrays reduction for add and mul operator.
Depends on D153448
Paths
| Differential D153455
[flang][openacc] Add lowering support for multi-dimensional arrays reduction ClosedPublic Authored by clementval on Jun 21 2023, 12:00 PM.
Details
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 21 2023, 12:00 PM This revision is now accepted and ready to land.Jun 21 2023, 9:24 PM Closed by commit rGd5a50ed9bd39: [flang][openacc] Add lowering support for multi-dimensional arrays reduction (authored by clementval). · Explain WhyJun 22 2023, 1:11 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 533750 flang/lib/Lower/OpenACC.cpp
flang/test/Lower/OpenACC/acc-reduction.f90
|
Probably not a correctness issue, but the loop nest is reversed from a memory access point of view (Fortran is column major).
If you want, HLFIR provides a tool to generate loop nest according to the list of extents:
https://github.com/llvm/llvm-project/blob/74adc3e0ebfb42a48f02d8d7094d6848a37a21f5/flang/include/flang/Optimizer/Builder/HLFIRTools.h#L382 (however, this is a one based loop nest, so not exactly what you have here).