[all-commits] [llvm/llvm-project] c2e3cb: [flang] hlfir.elemental codegen

jeanPerier via All-commits all-commits at lists.llvm.org
Fri Dec 16 00:20:36 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c2e3cb3e437b26d73f3392d34541a4c685ea9498
      https://github.com/llvm/llvm-project/commit/c2e3cb3e437b26d73f3392d34541a4c685ea9498
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

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

  Log Message:
  -----------
  [flang] hlfir.elemental codegen

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.

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




More information about the All-commits mailing list