Skip to content
Commit 6d655ad0 authored by Andrzej Warzynski's avatar Andrzej Warzynski
Browse files

[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: default avatarJean Perier <jperier@nvidia.com>
Co-authored-by: default avatarEric Schweitz <eschweitz@nvidia.com>
Co-authored-by: default avatarV Donaldson <vdonaldson@nvidia.com>

Depends on: D114159

Differential Revision: https://reviews.llvm.org/D115333
parent 5675b611
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment