Skip to content
Bryan Chan edited this page May 2, 2022 · 10 revisions

Flang and F18

Flang is a Fortran language front-end designed for integration with LLVM and the LLVM optimizer.

Flang+LLVM is a production-quality Fortran solution designed to be co-installed and is fully interoperable with Clang C++.

Flang single-core and OpenMP performance is now on par with GNU Fortran. Flang has implemented Fortran 2003 and has a near full implementation of OpenMP through version 4.5 targeting multicore CPUs.

Currently there are two active projects associated with Fortran and LLVM under the Flang umbrella:

In the short term, the current Flang is a production quality Fortran compiler supporting Fortran 2003, some features from Fortran 2008, and OpenMP.

We believe that starting in 2020, F18 will replace Flang as a complete implementation of Fortran 2018.

F18: The New Fortran Front-end

A new front-end for Fortran was announced at EuroLLVM April 17, 2018.

The [https://github.com/flang-compiler/f18](F18 front-end) is being written from scratch using modern C++. It will be closely aligned with LLVM best practices and written in the style of LLVM and clang.

F18 has been approved to become the standard Fortran compiler for LLVM and is in the process of being adopted into LLVM proper.

Current Flang: The Existing Fortran 2003/2008 Compiler

The released Flang compiler is based on the NVIDIA/PGI commercial Fortran compiler. Flang was announced in 2015. In 2017, the source code was released on GitHub.

Current Flang consists of 3 interrelated projects: