[Flang-announce] Flang Fortran front-end for LLVM

Stephen Scalpone sscalpone at nvidia.com
Tue Aug 22 23:59:33 EDT 2017


Hi Everyone --

For those of you interested in a Fortran front-end for LLVM, source code for the Flang front-end derived from the PGI Fortran compiler is now available at github.com/flang-compiler.  We've come a long ways in the last year.  In terms of highlights:

   * Flang source code is licensed under an Apache open source license; we will migrate to the latest LLVM source code license as soon as it is completed/approved by the LLVM community

   * Flang has been built and tested on Linux/x86-64, Linux/ARM, and Linux/OpenPOWER, and is a fully-functioning Fortran compiler on those platforms

   * Flang is structured as two binary executables invoked in sequence by a Flang driver based on the Clang driver; the latter is currently a Clang fork

   * Flang emits LLVM IR in text files, then invokes opt/llc for final code generation

   * Currently targets LLVM 5.0, 4.0, and 3.9

   * Fortran language feature parity with the commercial PGI Fortran compiler (F03 plus a few minor F08 features, many legacy extensions)

   * Near-full support for OpenMP 4.5 on multicore CPUs, targeting the LLVM OpenMP runtime library

   * Flang passes most of the tests we run on the commercial PGI Fortran compilers; we continue to add more tests

   * Flang generates DWARF via LLVM debug metadata, so far targeting only the metadata defined for C++ (no extensions for Fortran)

   * Flang performance is generally competitive with gfortran, though there are some bmks where each of the compilers significantly outperforms the other

   * Flang relies on the vectorizer in opt to generate SIMD code

This will be an ongoing effort, and much work remains including:

   * The end-user and code documentation still needs a lot of work

   * The source meets LLVM coding guidelines and compiles w/Clang without warnings, but is all C;  TBD when/whether we selectively migrate to C++; we value community input on the priority and desirability of migrating to C++

   * We have a long ways to go to reach Fortran 2008 compliance;  priorities include submodules, the block construct and do concurrent support

We have set up mailing lists for announcements and developers.  Information, archives, and sign-up information is available at http://lists.flang-compiler.org/mailman/listinfo.

We owe a huge thank you to the early collaborators from DOE and ARM Ltd, who have been extremely helpful in testing the early source drops and providing guidance on priorities.  So, "Thank You!".

You'll see by looking at the repository that most of the commits are still from NVIDIA/PGI contributors, though several minor changes and bug fixes have already been driven by DOE, ARM, and others.  We expect it will take some time before external contributors are able to develop significant new features, but we're looking forward to collaborating with those who are interesting in helping.

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------



More information about the flang-announce mailing list