[PATCH] D114460: [fir] Add fir reduction builder

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 30 06:28:09 PST 2021


awarzynski accepted this revision.
awarzynski added a comment.
This revision is now accepted and ready to land.

LGTM, thanks for all the updates! I've left a couple of comments, but these are non-blockers.



================
Comment at: flang/lib/Optimizer/Builder/Runtime/Reduction.cpp:722
+  auto eleTy = arrTy.cast<fir::SequenceType>().getEleTy();
+  auto dim = builder.createIntegerConstant(loc, builder.getIndexType(), 0);
+
----------------
What's the magic `0` here?


================
Comment at: flang/lib/Optimizer/Builder/Runtime/Reduction.cpp:871
+  mlir::FuncOp func;
+  auto ty = arrayBox.getType();
+  auto arrTy = fir::dyn_cast_ptrOrBoxEleTy(ty);
----------------
[nit] Not used (apart from the following line), so may just delete (it's not like `ty` suggests what this type is for)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114460/new/

https://reviews.llvm.org/D114460



More information about the llvm-commits mailing list