[LLVMdev] Fortran and LLVM

Warren Armstrong warren.armstrong at anu.edu.au
Wed Nov 8 17:38:53 PST 2006


Michael McCracken wrote:
> On 11/8/06, Warren Armstrong <warren.armstrong at anu.edu.au> wrote:
>   
>> 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?
>>     
>
> Hi Warren, I think here you're referring to me. Some of my changes did
> make it into the mainline, to the extent that you can produce an f95
> binary that will compile correct LLVM code for some very small set of
> toy fortran programs, but it chokes on real code.
>
> The reason I stopped working on it is that the version of gfortran
> that is on the LLVM branch is buggy and the latest version is rather
> different, and the effort required to reconcile the changes in either
> direction was too much to consider seriously.
>
> I'd still like to get gfortran+LLVM working, but at least for my part,
> I'm waiting until the LLVM-gcc4 tree is updated to a more current gcc,
> with a more stable gfortran to start from.
>
> -mike
>   

Ah, I see.  I'll do the same, then.

Thanks to you and Devang for the replies.

Cheers,
Warren





More information about the llvm-dev mailing list