[all-commits] [llvm/llvm-project] ae37bb: [Flang] Add support for lowering the goto statement

kiranchandramohan via All-commits all-commits at lists.llvm.org
Wed Feb 9 01:48:43 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ae37bb9804c7b6ee7e6d1c070889c30f74be1001
      https://github.com/llvm/llvm-project/commit/ae37bb9804c7b6ee7e6d1c070889c30f74be1001
  Author: Kiran Chandramohan <kiran.chandramohan at arm.com>
  Date:   2022-02-09 (Wed, 09 Feb 2022)

  Changed paths:
    M flang/lib/Lower/Bridge.cpp
    A flang/test/Lower/goto-statement.f90

  Log Message:
  -----------
  [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: V Donaldson <vdonaldson at nvidia.com>
Co-authored-by: Jean Perier <jperier at nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz at nvidia.com>




More information about the All-commits mailing list