[LLVMdev] LLVM + FORTRAN 95

David Greene dag at cray.com
Tue Nov 3 15:49:45 PST 2009


On Tuesday 03 November 2009 17:24, Nilesh Mahajan wrote:
=
> By AST I mean Abstract Syntax Tree. We are writing an optimization
> pass for some FORTRAN95 + MPI code that requires us to analyze the
> AST. We thought of 2 ways of doing this:
> 1. Compile the code using Clang/llvm-gfortran, get the textual AST
> dump (somehow), analyze the AST dump using Ruby, modify it and then
> feed back the modified AST to LLVM.
> 2. Do the analysis as an LLVM module.
> From your comments, I get the feeling that 2nd option is the better option.

It's the only option right now unless you want to hack the output of
gfortran and somehow feed it back into gfortran.  You REALLY don't want
to try that.  This is why we need flang.

                           -Dave



More information about the llvm-dev mailing list