[flang-commits] [PATCH] D151247: [flang][hlfir] Generate temporary storage in Forall/Where [1/2]

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu May 25 04:47:55 PDT 2023


jeanPerier marked 5 inline comments as done.
jeanPerier added a comment.

Thanks for the review!
I fixed typos in the merge commit, but I merged before seeing @tblah review comment, sorry about that. I made a new patch to address your comments.



================
Comment at: flang/test/HLFIR/order_assignments/impure-where.fir:37
+// CHECK:           %[[VAL_12:.*]] = fir.call @impure() : () -> !fir.heap<!fir.array<10x!fir.logical<4>>>
+// CHECK:           %[[VAL_21:.*]] = fir.allocmem !fir.array<?x!fir.logical<4>>
+// CHECK:           %[[VAL_23:.*]]:2 = hlfir.declare %[[VAL_21]](%{{.*}}) {uniq_name = ".tmp.forall"}
----------------
tblah wrote:
> Why doesn't this need a size parameter to tell the allocation how many elements are needed?
I trimmed the expected IR a bit too much, well spotted, the generated fir.allocmem indeed has a size parameter. I updated the expected output to include it in https://reviews.llvm.org/D151428.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151247



More information about the flang-commits mailing list