F18-LLVM: Unanswered but important points

Hello,

This is regarding recent/ongoing discussions about F18 being merged in LLVM.

I was going through these threads, and I found few important points which were possibly left unanswered (or I might have missed few threads).

URL: http://lists.llvm.org/pipermail/flang-dev/2019-December/000120.html

Point: Is (3) AST → FIR → MLIR LLVM-IR → LLVM-IR) in a shape where we can generate LLVM IR now? [*1]

F18 generates parser tree after successful completion of parsing/semantics phase.

In the above point ([*1]) AST is mentioned. Do we mean that AST and parse tree as same, as F18 does not generate anything known as AST.

If not, are we planning to implement AST generation in F18?

URL: http://lists.llvm.org/pipermail/llvm-dev/2019-December/137677.html

Point: IR generation still appears to be text string based?

F18 does not generate IR/FIR so far.

Please enlighten on above points.

Thanks in anticipation.

Regards,

Rajesh

“parser tree” and AST sound like they’re probably the same thing - any reason to believe they aren’t/any distinction between those terms you’re aware of?
(you probably want to CC relevant people from those thread into this one/whoever you’re hoping to address these concerns - mailing lists can be high volume & people don’t always find the threads they would like to contribute to)

Some comments:
- We need to make sure not to confuse F18 and legacy flang. If I
   write/wrote flang, and I started on of those threads, I always mean
   F18 which is "new flang", soon to be llvm/flang.
- With AST I meant whatever the parser + sema of F18 generates. To be
   honest, I haven't looked to closely at what that is but I expected an
   AST like structure to be present.
- flang = f18 does not have IR generation, that was what the thread was
   about. Legacy flang has string based IR "printing".
- We should have this discussion on the flang list
   (flang-dev@lists.llvm.org).

Thanks,
  Johannes