[flang-commits] [PATCH] D140093: [flang] hlfir.elemental codegen

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Dec 15 04:43:03 PST 2022


jeanPerier created this revision.
jeanPerier added a reviewer: clementval.
jeanPerier added a project: Flang.
Herald added subscribers: mehdi_amini, jdoerfert.
Herald added a reviewer: sscalpone.
Herald added a project: All.
jeanPerier requested review of this revision.

Without any optimization or when it cannot be optimized before
bufferization, an hlfir.elemental lowers to an array temporary.
Its codegen consists in:

- allocating a temp given the type, shape, and length parameter arguments.
- generating a loop nest given the elemental shape
- inlining the body of the elemental inside the loops, and replacing the yield_element by an assignment to an element of the temp.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140093

Files:
  flang/include/flang/Optimizer/Builder/FIRBuilder.h
  flang/include/flang/Optimizer/Builder/HLFIRTools.h
  flang/lib/Optimizer/Builder/FIRBuilder.cpp
  flang/lib/Optimizer/Builder/HLFIRTools.cpp
  flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp
  flang/test/HLFIR/elemental-codegen.fir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140093.483126.patch
Type: text/x-patch
Size: 24241 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20221215/b649c8ff/attachment-0001.bin>


More information about the flang-commits mailing list