This is probably fantastic from a maintainability perspective, but I'm curious if some performance is left on the table by using LLVM IR instead of compiling directly to machine code. I know there are a number of optimizations that can be made for Fortran that can't be made for C-like languages and I wonder if some of those C-like assumptions are implicitly encoded in the IR.
Related ongoing thread:<p><i>Fortran</i> - <a href="https://news.ycombinator.com/item?id=37291504">https://news.ycombinator.com/item?id=37291504</a> - Aug 2023 (193 comments)<p>(current thread is better because less generic)
> LFortran is structured around two independent modules, AST (Abstract Syntax Tree) and ASR (Abstract Semantic Representation), both of which are standalone (completely independent of the rest of LFortran) and users are encouraged to use them independently for other applications and build tools on top.<p>Modern frontend architecture comes to Fortran! Awesome.
It's a little bit embarrassing that a <i>Fortran</i> compiler provides a shell for interactive use, yet the Rust project, with at least two orders of magnitude more development effort, does not.
How does this compiler compare with Flang? I saw it shouted out on the main page but didn't really see any comparisons for why you'd pick one or the other.
I misread LLVM as LLM and wondered what on earth language models have to do with Fortran compilation. (They don't. LLVM is a compiler framework.)<p>Anyways, great work to the team! It's fun to see such a flurry of articles from the Fortran community today