[all-commits] [llvm/llvm-project] 88ac74: [flang][hlfir] Fix hlfir.set_length codegen

jeanPerier via All-commits all-commits at lists.llvm.org
Sun Apr 16 22:47:18 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 88ac7414d50b52b202a547e04a9f8bac4c797fa3
      https://github.com/llvm/llvm-project/commit/88ac7414d50b52b202a547e04a9f8bac4c797fa3
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2023-04-17 (Mon, 17 Apr 2023)

  Changed paths:
    M flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp
    M flang/test/HLFIR/set_length-codegen.fir

  Log Message:
  -----------
  [flang][hlfir] Fix hlfir.set_length codegen

The bufferization pass was propagating the raw alloca storage
(which may not allow to later retrieve the length) instead of
the hlfir variable value (which is guaranteed to hold the
character length).

Fix this and makes packageBufferizedExpr "storage" argument and
getBufferizedExprStorage return an hlfir::Entity to avoid similar
error in the future (the caller of packageBufferizedExpr will have
to think a bit when adding the explicit hlfir::Entity{} cast).

Differential Revision: https://reviews.llvm.org/D148307




More information about the All-commits mailing list