-
Notifications
You must be signed in to change notification settings - Fork 138
Home
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:
- the currently released https://github.com/flang-compiler/flang compiler, a.k.a. Classic Flang;
- the completely new https://github.com/llvm/llvm-project/tree/main/flang compiler, f.k.a. F18, which is part of LLVM and will replace the current Flang.
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.
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.
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:
- https://github.com/flang-compiler/flang is the source for the front-end and middle-end of the compiler, which produce LLVM IR.
- https://github.com/flang-compiler/classic-flang-llvm-project is a branch of Clang/LLVM with enhancements related to Fortran (e.g. driver, debug metadata support). Some of these changes are being upstreamed into LLVM.