[flang-commits] [PATCH] D153759: [flang][hlfir] Add codegen for vector subscripted LHS

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Jun 26 05:06:54 PDT 2023


jeanPerier created this revision.
jeanPerier added reviewers: tblah, vzakhari, clementval, PeteSteinfeld.
jeanPerier added a project: Flang.
Herald added subscribers: sunshaoce, mehdi_amini, jdoerfert.
Herald added a project: All.
jeanPerier requested review of this revision.

This patch adds support for vector subscripted assignment left-hand
side. It does not yet add support for the cases where the LHS must be
saved because its evaluation could be impacted by the assignment.

The implementation adds an hlfir::ElelemntalOpInterface to share the
elemental inlining utility and some other tools between
hlfir::ElementalOp and hlfir::ElelemntalAddrOp.

It adds generateLhsValueAndYield() to allow retrieving the LHS value
in lowering, whether or not it is vector subscripted. If it is vector
subscripted, this utility creates a loop nest iterating over the
elements and returns the address of an element.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153759

Files:
  flang/include/flang/Optimizer/Builder/HLFIRTools.h
  flang/include/flang/Optimizer/HLFIR/HLFIROps.td
  flang/lib/Optimizer/Builder/HLFIRTools.cpp
  flang/lib/Optimizer/HLFIR/IR/HLFIROps.cpp
  flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIROrderedAssignments.cpp
  flang/lib/Optimizer/HLFIR/Transforms/ScheduleOrderedAssignments.cpp
  flang/test/HLFIR/order_assignments/vector-subscripts-codegen.fir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153759.534508.patch
Type: text/x-patch
Size: 37708 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230626/21c056f8/attachment-0001.bin>


More information about the flang-commits mailing list