[flang-commits] [PATCH] D142475: [flang][hlfir] Add hlfir.copy_in and hlfir.copy_out codegen to FIR.

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed Jan 25 01:08:30 PST 2023


jeanPerier added inline comments.


================
Comment at: flang/lib/Optimizer/HLFIR/Transforms/ConvertToFIR.cpp:159
+                  genHeapTempFromSourceBox(loc, builder, inputVariable);
+              // Get rid of allocatable flag in the fir.box.
+              temp = builder.create<fir::ReboxOp>(loc, resultAddrType, temp,
----------------
vzakhari wrote:
> nit: maybe rename `genHeapTempFromSourceBox` to `genAllocatableTempFromSourceBox` so that it is clear that it returns a box with the allocatable flag set (and we need to reset it afterwards).  I think `Allocatable` always implies `Heap`, so such naming should be more telling.
Thanks, that is clearer.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142475



More information about the flang-commits mailing list