[-llvm-dev]
Hi again,
I had a productive conversation with Bob Scollard (PGI), Chandler, and some others in Austin last week that I'd like to briefly summarize for everyone else.
PGI will be releasing the necessary components to form an Fortran frontend sometime over the next year, and as a community, we need to decide how those components will relate to the Flang project. As we hope that Flang will become part of the LLVM project, this means deciding how these components relate to the LLVM project.
PGI's frontend is currently written in ANSI C, and they have no immediate plans to change that. They also currently plan on using a decoupled method of generating LLVM IR, specifically by printing textual IR for use by other LLVM components, and thus not linking directly to any of LLVM itself. Their parser is generated by a custom parser generator (for which they'll release source), and is not recursive descent. I'm not clear on the structure of the components after parsing. The runtime library is mostly written in C, with some pieces written in Fortran. Bob, if I've gotten anything wrong here, please correct me.
As Chandler was quick to point out, a lot of the power of Clang's design, especially in terms of generating good diagnostic messages, comes from its design as a recursive descent parser. The faithfulness of Clang's AST is also a strong enabler for many things (analysis and transformation tools, for example). The Flang community might not, therefore, want a Fortran parser constructed in a different way.
Moreover, the community, especially the larger LLVM community, will likely insist on a project built in C++ using LLVM libraries and coding standards, for inclusion in LLVM itself. As a result, aside perhaps from the runtime library, we'll need to consider carefully which pieces Flang we can borrow from the code that PGI will contribute more-or-less as-is, which pieces we'll want to take with major refactoring, and which we'll want to rewrite (perhaps treating PGI's code as the reference implementation).
That having been said, I feel comfortable based on this conversation, recommending that we continue developing the existing Flang codebase while we await code from PGI. We'll almost certainly want a differently-structured parser, at least, in the long term. That having been said, Bob stressed to me that PGI is interested in working in coordination with the wider community, and so they'll be part of the Flang community as we make our short-term and longer-term plans.
Thanks again,
Hal
> --
> You received this message because you are subscribed to the Google
> Groups "flang-dev" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to
flang-dev+...@googlegroups.com.
> To post to this group, send email to
flan...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/flang-dev/28947050.754.1447453317969.JavaMail.javamailuser%40localhost.