[all-commits] [llvm/llvm-project] 6d655a: [flang][codegen] Add a conversion for `fir.coordin...

Andrzej WarzyƄski via All-commits all-commits at lists.llvm.org
Fri Dec 17 02:35:52 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6d655ad0111e4fcdcbfba924c89da9053d484095
      https://github.com/llvm/llvm-project/commit/6d655ad0111e4fcdcbfba924c89da9053d484095
  Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
  Date:   2021-12-17 (Fri, 17 Dec 2021)

  Changed paths:
    M flang/lib/Optimizer/CodeGen/CodeGen.cpp
    A flang/test/Fir/Todo/cordinate_of_5.fir
    A flang/test/Fir/Todo/cordinate_of_6.fir
    M flang/test/Fir/convert-to-llvm-invalid.fir
    M flang/test/Fir/convert-to-llvm.fir
    M flang/test/Fir/invalid.fir

  Log Message:
  -----------
  [flang][codegen] Add a conversion for `fir.coordinate_of` - part 2

This patch extends the `FIRToLLVMLowering` pass in Flang by extending
the hook to transform `fir.coordinate_of` into a sequence of LLVM MLIR
instructions (i.e. `CoordinateOpConversion::doRewrite`). The following
case is added:
  3.1 the input object is inside `!fir.ref` (e.g. `!fir.ref<!fir.array>` or
      `!fir.ref<!fir.type>`).
  3.2 the input object is inside `!fir.ptr` (e.g. `!fir.ptr<!fir.array>` or
      `!fir.ptr<!fir.type>`).
>From the point of view of the conversion, 3.1 and 3.2 are currently identical.

This is part of the upstreaming effort from the `fir-dev` branch in [1].

[1] https://github.com/flang-compiler/f18-llvm-project

Originally written by:
Co-authored-by: Jean Perier <jperier at nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz at nvidia.com>
Co-authored-by: V Donaldson <vdonaldson at nvidia.com>

Depends on: D114159

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




More information about the All-commits mailing list