Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang][hlfir] Array constructor lowering [part 1/4]
This is the first and biggest chunk that introduces support for array constructor to HLFIR. This patch: - adds a new ConvertArrayConstructor.cpp that centralizes the code dealing with array constructor lowering. - introduces a framework to lower array constructor according to different strategies: A common analysis of the array constructor is done, and based on that, a lowering startegy is selected and driven through the ac-values of the array constructor. See ConvertArrayConstructor.cpp comments for more details. - implements the first strategy that creates a temporary inlined and updates it with inlined code. This strategy can only be used if the temporary can be pre-allocated (i.e: the extents and length parameters can be pre-computed without evaluating any ac-values), and if all the ac-value expressions are scalars. For the sake of simplicity, characters and derived type will be enabled once all the strategies are added. Reviewed By: clementval, PeteSteinfeld Differential Revision: https://reviews.llvm.org/D144102
- Loading branch information