[flang-commits] [PATCH] D137781: [flang] Add hlfir.declare operation
Jean Perier via Phabricator via flang-commits
flang-commits at lists.llvm.org
Thu Nov 10 04:59:02 PST 2022
jeanPerier created this revision.
jeanPerier added reviewers: clementval, PeteSteinfeld.
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.
Herald added a reviewer: nicolasvasilache.
This operation will be used to declare named variables in HLFIR.
See the added description in HLFIROpBase.td for more info about it.
The motivation behind this operation is described in https://reviews.llvm.org/D137634.
The FortranVariableInterface verifier is changed a bit. It used to
operate using the result type to verify the provided shape and length
parameters. This is a bit incorrect because what matters to verify the
information is the input address (This worked OK with fir.declare where
the input memref type is the same as the output result). Also, not all
operation defining variables will have an input memref with the same
meaning (hlfir.designate and hlfir.associate for instance).
Hence, this verifier is now optional and must be provided a memref to
operate.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137781
Files:
flang/include/flang/Optimizer/Dialect/FIROps.td
flang/include/flang/Optimizer/Dialect/FIRType.h
flang/include/flang/Optimizer/Dialect/FortranVariableInterface.td
flang/include/flang/Optimizer/HLFIR/CMakeLists.txt
flang/include/flang/Optimizer/HLFIR/HLFIRDialect.h
flang/include/flang/Optimizer/HLFIR/HLFIROpBase.td
flang/include/flang/Optimizer/HLFIR/HLFIROps.h
flang/include/flang/Optimizer/HLFIR/HLFIROps.td
flang/lib/Optimizer/Dialect/FIROps.cpp
flang/lib/Optimizer/Dialect/FortranVariableInterface.cpp
flang/lib/Optimizer/HLFIR/IR/CMakeLists.txt
flang/lib/Optimizer/HLFIR/IR/HLFIRDialect.cpp
flang/lib/Optimizer/HLFIR/IR/HLFIROps.cpp
flang/test/HLFIR/declare.fir
flang/test/HLFIR/invalid.fir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137781.474512.patch
Type: text/x-patch
Size: 32832 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20221110/96f7861f/attachment-0001.bin>
More information about the flang-commits
mailing list