Fortran + LLVM Update
There are now at least five open source Fortran compilers (in various stages of completion) that are based on LLVM:
- Flang -- Original attempt (possibly defunct?) by the LLVM Team at the University of Illinois at Urbana-Champaign.
- Flang -- The first attempt by NVIDIA/PGI. It's some kind of open-sourced version of their commercial compiler being funded by Lawrence Livermore, Sandia and Los Alamos National Laboratories. See previous post when this was first announced in 2015.
- f18 -- The second (modernized) attempt by NVIDIA/PGI, built from the ground up. Intended to be a replacement for the previous one.
- DragonEgg -- This one uses LLVM as a GCC backend. Also seems to be defunct, the website says it only works with the very old GCC 4.6.
- lfortran -- This one is very interesting, since it isn't just a run of the mill Fortran compiler, it extends the language a little bit to include a REPL and some other great ideas. This one seems to have some connection to Los Alamos National Laboratory as well, but doesn't appear to be related to the NVIDIA Flang one.
None of these really seem to be finished yet. Hopefully, one or more will achieve full Fortran 2018 compliance and be good enough for production work. I'm particular interested to see how lfortran matures. In recent years, LLVM has taken the compiler world by storm, and it will be nice to see Fortran get in on the action.
References
- The LLVM Compiler Infrastructure Project
- M. Larabel, NVIDIA Has Been Working On A New Fortran "f18" Compiler It Wants To Contribute To LLVM, 1 March 2019 [Phoronix]
- NNSA, national labs team with Nvidia to develop open-source Fortran compiler technology, Nov. 13, 2015 [Lawrence Livermore National Laboratory]