[LLVMdev] LLVM + FORTRAN 95

David Greene dag at cray.com
Tue Nov 3 13:46:51 PST 2009


On Tuesday 03 November 2009 15:29, Nilesh Mahajan wrote:
> Hi all,
>
> I want to compile FORTRAN 95 code with LLVM. More specifically, I
> would like to get an AST dump of the program I compile, statically
> analyze the AST, make modifcations to the AST and then feed it back to
> LLVM. Do you have any hints as to how I should proceed about doing
> this. I noticed that clang has an ast-dump option but don't know
> whether it supports FORTRAN 95.

Your best bet is to use llvm-gfortran.  I don't know what you mean by
"AST."  Do you really want an AST or something else (LLVM IR, something
higher-level, etc.)?  LLVM doesn't understand ASTs directly.

Longer term, it sure would be nice to have flang.  :)

                             -Dave



More information about the llvm-dev mailing list