Will Julia support Flang Fortran?

Just released:
https://github.com/flang-compiler/flang/wiki

Any comments?

It’s not capable of generating binaries yet. Once it matures, it might be a nice way to get fortran, in particular in a world where we want to also build dependencies as LLVM IR.

2 Likes

I assume you’re referring to https://github.com/llvm/llvm-project/tree/002968a320463237f0ccea754a7482b229e34cf1/flang (release notes for the version in LLVM 11) which is a completely different project, albeit they confusingly share the same name?

2 Likes

Not sure if they are “completely” different projects – the flang-compiler project lists two compilers (or frontends), “flang” based on the old PGI compiler, and “f18” which is a frontend rewrite from scratch. The statement in the f18 repository says that f18 has been migrated into the llvm repo, and in the process got (indeed confusingly) renamed to flang.

Not sure where you’re looking but Home · flang-compiler/flang Wiki · GitHub says

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.

[…]

The [GitHub - flang-compiler/f18: F18 is a front-end for Fortran intended to replace the existing front-end in the Flang compiler](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.

And quoting from https://github.com/llvm/llvm-project/blob/002968a320463237f0ccea754a7482b229e34cf1/flang/README.md

It started off as the f18 project (GitHub - flang-compiler/f18: F18 is a front-end for Fortran intended to replace the existing front-end in the Flang compiler) with an aim to replace the previous flang project (GitHub - flang-compiler/flang: Flang is a Fortran language front-end designed for integration with LLVM.) and address its various deficiencies.

Same goal, same name, but they look independent efforts.

So which of them could be integrated nicely with Julia, perhaps with a package similar to Cxx.jl ?

The flang that now lives in llvm-project, the one of which you probably saw the announcement yesterday

1 Like