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

Troy Johnson via llvm-dev llvm-dev at lists.llvm.org
Fri Mar 1 14:30:57 PST 2019


So, for example, you plan on implementing your own equivalent to the Clang AST matchers but for your Fortran AST?

-Troy
________________________________
From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Stephen Scalpone via llvm-dev <llvm-dev at lists.llvm.org>
Sent: Friday, March 1, 2019 4:13:10 PM
To: Bruno Ricci; llvm-dev at lists.llvm.org
Subject: Re: [llvm-dev] RFC for f18+runtimes in LLVM

Hi Bruno, Troy,

We looked early on at reusing the preprocessor and other source-file utilities from clang.  It turns out that while preprocessors look similar on the surface, preprocessors are deeply integrated with their source language and take into account many language syntax rules.  In the f18 documentation we have two documents that dive into more details about the differences between C and Fortran and the nuances of the preprocessor.

We thought we might be able to reuse the clang diagnostic infrastructure, but upon looking at the code we saw a lot of very specific C/C++ information in that code, which seems very natural to want to keep as much semantic information as possible for error messages.  In the end, it seemed impractical to try to map Fortran entities to C/C++ objects just for the diagnostic infrastructure.

 - Steve

On 3/1/19, 9:47 AM, "llvm-dev on behalf of Bruno Ricci via llvm-dev" <llvm-dev-bounces at lists.llvm.org on behalf of llvm-dev at lists.llvm.org> wrote:



    On 01/03/2019 17:26, Troy Johnson via llvm-dev wrote:
    > This RFC started a good discussion and I’d like to hear responses from its author
    > to all of the points that have been made so far.
    >
    >
    >
    > FWIW, I’m also in favor of reusing as much from Clang as practical.  In fact, with> the combined repo now, it might make sense to factor out some common front end code
    > that both a Clang and any Flang (f18 or Fort) would use, for maintainability as well
    > as to avoid the perceived strangeness of a Fortran front end relying on a C front end.

    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

    Bruno
    _______________________________________________
    LLVM Developers mailing list
    llvm-dev at lists.llvm.org
    https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190301/2107f0a5/attachment.html>


More information about the llvm-dev mailing list