[LLVMdev] Using output from dragonegg

Dmitry N. Mikushin maemarcus at gmail.com
Sun Dec 25 16:21:17 PST 2011


Hi Zack,

DragonEgg should give you LLVM IR as an output. Btw, why do you need -fopt?
What to do with LLVM IR - depends on your purpose. You can translate
it to something else using one of available backends, for example, to
x86 assembly:

$ llc -march=x86 hello_world.bc

(It's better to use different extension, because llc would also produce *.o)

Or you can pass this file through any available code transformations,
for example:

$ opt -basicaa -mem2reg -simplifycfg -instcombine -S hello_word.bc -o
hello_world_opt.bc

HTH,
- Dima.

2011/12/26 Zack Maril <zmaril at tamu.edu>:
> Howdy!
> I am trying to understand how to properly use dragonegg. I've gotten it on
> my machine and it runs everything and seems to compile fortran well.
>
> If I run this command:
> gcc-4.6 tests/hello_world.f -o hello_world.o -fplugin=./dragonegg.so -S
> -flto
> I get a bunch of LLVM code in the hello_world.o file. What do I do with it
> next if I want to execute it?
> I've tried llvm-as and llvm-nm but both of them just throw errors up about
> file formats or errors that seem to indicate they aren't being used for
> their intended purpose.
> Thank you,
> Zack
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>




More information about the llvm-dev mailing list