[llvm-dev] RFC for f18+runtimes in LLVM

David Greene via llvm-dev llvm-dev at lists.llvm.org
Fri Mar 1 10:08:23 PST 2019


Bruno Ricci via llvm-dev <llvm-dev at lists.llvm.org> writes:

> What part of the frontend do you think could be shared ? At least the following seems
> to be re-usable:
>
> - The diagnostics infrastructure
> - IdentifierTable
> - The file manager and source location infrastructure

I would like to see the possibility of clang's AST being enhanced to
handle Fortran.  Then I believe a lot of the clang tooling (clang-query,
etc.)  could be more easily made to understand Fortran.  I have no doubt
there is a significant amount of work to do this.  That's why I asked
Petr about the experience of the Fort team.  Is it more work to add the
necessary bits to clang's AST and its tooling, or is it more work to
construct a new AST ground-up and then construct all the tooling around
that ground-up?  I suspect the latter is more work to achieve the same
quality as in clang, though depending on the ultimate goal for a Fortran
frontend, it may be less (say we don't want all of the clang-style
tooling for Fortran, for example).

Maybe even a lot of codegen could be reused, I don't know.  I am hardly
a clang expert.  :)  OpenMP lowering could maybe also be reused, though
moving that to LLVM (as I've seen discussed) would then naturally reuse
it.

                                -David


More information about the llvm-dev mailing list