mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-24 12:34:19 +00:00

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@nvidia.com> Co-authored-by: Jean Perier <jperier@nvidia.com> Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>