[all-commits] [llvm/llvm-project] 9ac452: [flang][NFC] Move Array constructor inlined temp m...

jeanPerier via All-commits all-commits at lists.llvm.org
Tue May 23 08:01:24 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9ac452b2864e2a4c5dbcba3c6c8ad66cb28476ec
      https://github.com/llvm/llvm-project/commit/9ac452b2864e2a4c5dbcba3c6c8ad66cb28476ec
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2023-05-23 (Tue, 23 May 2023)

  Changed paths:
    M flang/include/flang/Optimizer/Builder/HLFIRTools.h
    A flang/include/flang/Optimizer/Builder/TemporaryStorage.h
    M flang/lib/Lower/ConvertArrayConstructor.cpp
    M flang/lib/Optimizer/Builder/CMakeLists.txt
    A flang/lib/Optimizer/Builder/TemporaryStorage.cpp
    M flang/test/Lower/HLFIR/array-ctor-as-inlined-temp.f90
    M flang/test/Lower/HLFIR/array-ctor-character.f90

  Log Message:
  -----------
  [flang][NFC] Move Array constructor inlined temp management into a utility

This patch moves the counter and storage management part of the array
constructor inlined temporary strategy into its own utility so that it
can be reused for the simple cases of temporary creations inside WHERE
and FORALL.

It actually fixes a bug where the counter first value  used for addressing
was "2" leading to read/write after the allocated storage... It seems
I ran the tests end-to-end without the HLFIR flag when previously testing
this. So this may clear some segfaults.

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




More information about the All-commits mailing list