[Flang-dev] new Flang discussions?
troyj at cray.com
Thu Oct 11 12:14:48 EDT 2018
I think the desire would be for Flang to have an AST that can be used for the same purposes as the Clang AST, but for it to not be precisely the Clang AST due to the different constructs. It might or might not lead to actual code sharing between [FC]lang. Possibly there could be common base classes. The main thing to avoid would be to make the mechanics of using the Flang AST to do useful stuff be dramatically different from using the Clang AST since that’s what people are already familiar with.
From: flang-dev <flang-dev-bounces at lists.flang-compiler.org> On Behalf Of Roger Ferrer Ibáñez
Sent: Thursday, October 11, 2018 10:53 AM
To: stefan.teleman at gmail.com
Cc: flang-dev at lists.flang-compiler.org
Subject: Re: [Flang-dev] new Flang discussions?
definitely, but I would expect a source-level tool to operate on a representation of the source input which hasn't undergone any lowering yet. If the goal is only code generation (which it isn't, for let's say, a checker), then I fully buy the idea of lowering things to C/C++.
I'm a bit scared of the idea of something akin to f2c happening in the FE, but perhaps this is not what will happen and my concern is moot?
Missatge de Stefan Teleman <stefan.teleman at gmail.com<mailto:stefan.teleman at gmail.com>> del dia dj., 11 d’oct. 2018 a les 17:29:
On Thu, Oct 11, 2018 at 11:24 AM Roger Ferrer Ibáñez <rofirrim at gmail.com<mailto:rofirrim at gmail.com>> wrote:
my concern was more about the extra expressivity of Fortran in some aspects compared to C/C++: things like array-sections, sophisticated constructs like WHERE or FORALL, statements like ALLOCATE/DEALLOCATE, the extra semantics of the DO-construct when the step is nonconstant, the IO-statements might mean that you end with a superset of nodes including every single specific construct of the language in the AST. Sure, you can lower all of them into C/C++ (and use C/C++ ASTs for that), it is just I am not sure I would like to see this happen early.
None of the Fortran features enumerated above precludes lowering to C/C++ AST.
stefan.teleman at gmail.com<mailto:stefan.teleman at gmail.com>
Roger Ferrer Ibáñez
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the flang-dev