[flang-commits] [PATCH] D141612: [flang] Lower elemental intrinsics to hlfir.elemental

Pete Steinfeld via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Jan 12 08:30:46 PST 2023


PeteSteinfeld added a comment.

Other than the nits in comments, all builds and tests correctly.  I don't understand this code very well, though, so @clementval should take a look and approve.



================
Comment at: flang/lib/Lower/ConvertCall.cpp:765
+    // Push a new local scope so that any temps made inside the elemental
+    // iterations is cleaned up inside the iterations.
+    callContext.stmtCtx.pushScope();
----------------
Should read "are cleaned up".


================
Comment at: flang/lib/Lower/ConvertCall.cpp:832
+    // If the actual argument does not need to be passed via an address,
+    // or will be pass in the address of a temporary copy, it can be loaded
+    // before the elemental loop nest.
----------------
Should read "will be passed"


================
Comment at: flang/lib/Lower/ConvertCall.cpp:865
+  bool canLoadActualArgumentBeforeLoop(int) const {
+    // Elemental intrinsic functions never needs the actual address
+    // of their arguments.
----------------
Should read "never need the actual addresses"


================
Comment at: flang/lib/Lower/ConvertExprToHLFIR.cpp:1258
+  // to an mlir value, dereference allocatable and pointers, and get rid
+  // of fir.box that are no needed or create a copy into contiguous memory.
+  return exv.match(
----------------
Should read "not needed"


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141612



More information about the flang-commits mailing list