[flang] Lower IO input with vector subscripts
authorValentin Clement <clementval@gmail.com>
Wed, 16 Mar 2022 16:10:31 +0000 (17:10 +0100)
committerValentin Clement <clementval@gmail.com>
Wed, 16 Mar 2022 16:13:23 +0000 (17:13 +0100)
commit9aeb7f035bdde83501e5eddd9e6ad175b8ed697f
tree9639fc917e0ee3d7411c40d05efd9d1fb918078c
parent6a23d2764467bd45c2e02828f6175a0b9f9a1005
[flang] Lower IO input with vector subscripts

This patch adds lowering for IO input with vector subscripts.
It defines a VectorSubscriptBox class that allow representing and working
with a lowered Designator containing vector subscripts while ensuring
all the subscripts expression are only lowered once.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D121806

Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
15 files changed:
flang/include/flang/Lower/AbstractConverter.h
flang/include/flang/Lower/Support/Utils.h
flang/include/flang/Lower/VectorSubscripts.h [new file with mode: 0644]
flang/include/flang/Optimizer/Transforms/Passes.h
flang/include/flang/Optimizer/Transforms/Passes.td
flang/include/flang/Tools/CLOptions.inc
flang/lib/Lower/Bridge.cpp
flang/lib/Lower/CMakeLists.txt
flang/lib/Lower/ConvertType.cpp
flang/lib/Lower/IO.cpp
flang/lib/Lower/VectorSubscripts.cpp [new file with mode: 0644]
flang/lib/Optimizer/Transforms/CMakeLists.txt
flang/lib/Optimizer/Transforms/RewriteLoop.cpp
flang/lib/Optimizer/Transforms/SimplifyRegionLite.cpp [new file with mode: 0644]
flang/test/Lower/vector-subscript-io.f90 [new file with mode: 0644]