[LLVMdev] Dragonegg + IR + llc = Dragonegg directly

Martin Apel martin.apel at SIMPACK.de
Tue Apr 17 05:58:48 PDT 2012


Hi all,

I tried using dragonegg to compile some numerical software of ours. I
tried out two different approaches expecting both would yield the same
results:
1. gfortran-4.6 -fplugin=dragonegg-3.0 -o test.o test.f   (I ommitted a
bunch of additional arguments for brevity)
2. gfortran-4.6 -fplugin=dragonegg-3.0 -fplugin-arg-dragonegg-emit-ir -S
-o test.ll test.f
   llc -O0 -o test.s test.ll
   as -o test.o test.s

When comparing the results of our software compiled with gfortran-4.6
without LLVM with approach 1, I get the same results for both versions.
However, when I use approach 2, the computation results differ from the
original version.

I expected that using the dragonegg plugin to generate native code
directly would internally do more or less the same as the explicit step of
approach 2, but this does not seem to be the case. Any ideas why this
happens?

Regards,

Martin



More information about the llvm-dev mailing list