[LLVMdev] Fortran and LLVM

Warren Armstrong warren.armstrong at anu.edu.au
Wed Nov 8 15:47:33 PST 2006


Hi all,

I'm looking into using LLVM to do some optimisations of
Fortran code.  As part of this, I've been trying to build
the frontend with f95 support.  At the moment, I'm trying
to resolve undefined symbol problems for code defined in
c-common.c + elsewhere - I'm taking the temporary approach
of copy-pasting it into a new file, and linking that in.  I have no
idea if it will work, but you can't just link c-common.o in, because then
you get multiple definitions of some symbols.

However, judging from past threads on here, it seems that getting
gfortran support will require a lot of work.  I've also seen
people who use LLVM and Fortran to compile the SPEC FP benchmarks -
the NAG compiler has been mentioned in this context.  I have two
questions here:

1. I know someone previously tried to get gfortran working - did their
changes make it into the SVN mainline? 

2. How do you go about hooking LLVM into the NAG compiler?  Does
it emit an IR that LLVM recognises?

Cheers,
Warren








More information about the llvm-dev mailing list