[flang-commits] [PATCH] D142043: [flang][hlfir] Enable lowering and passing of allocatables and pointers.
Jean Perier via Phabricator via flang-commits
flang-commits at lists.llvm.org
Thu Jan 19 01:13:01 PST 2023
jeanPerier marked 4 inline comments as done.
jeanPerier added inline comments.
================
Comment at: flang/lib/Optimizer/Builder/HLFIRTools.cpp:74-78
+static void
+genExtentsAndLboundFromBox(mlir::Location loc, fir::FirOpBuilder &builder,
+ hlfir::Entity boxEntity,
+ llvm::SmallVectorImpl<mlir::Value> *lbounds,
+ llvm::SmallVectorImpl<mlir::Value> *extents) {
----------------
PeteSteinfeld wrote:
> This interface seems a little off to me. In the name "Extents" is plural, while "Lbound" is singular. Also, in every call, the "lbounds" argument is non-null, but the code allows for it to be null. Would it be better to assert that it's non-null?
Good points, I renamed it to genLboundsAndExtentsFromBox (so that the name reflects the argument order), and I made the first argument a reference.
================
Comment at: flang/lib/Optimizer/Builder/HLFIRTools.cpp:419
+ assert(variable.getType().isa<fir::BaseBoxType>() &&
+ "array variable with dynamic extent must be boxes");
+ mlir::Value dim =
----------------
PeteSteinfeld wrote:
> Is "boxes" supposed to be "boxed"?
Yes, thanks
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142043/new/
https://reviews.llvm.org/D142043
More information about the flang-commits
mailing list