Skip to content
Commit ae37bb98 authored by Kiran Chandramohan's avatar Kiran Chandramohan
Browse files

[Flang] Add support for lowering the goto statement

This patch adds support for lowering the Fortran goto statement from
parse-tree to MLIR. The goto statement in Fortran is a form of
unstructured control flow. The statement transfers control to the
code starting at the label specified in the statement. This can be
faithfully represented in MLIR by a branch instruction.

To assist the lowering of code with unstructured control flow, blocks
are created in advance and associated with the relevant pre-fir tree
evaluations.

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

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

Reviewed By: clementval, vdonaldson, schweitz, awarzynski

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



Co-authored-by: default avatarV Donaldson <vdonaldson@nvidia.com>
Co-authored-by: default avatarJean Perier <jperier@nvidia.com>
Co-authored-by: default avatarEric Schweitz <eschweitz@nvidia.com>
parent a1862d78
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment