Some benchmark comparison of gcc4.5 and dragonegg (was dragonegg in FSF gcc?)
Duncan Sands
baldrick@free.fr
Wed Apr 21 19:35:00 GMT 2010
Hi Vladimir,
> Dragonegg does not work with -flto. It generates assembler code on which
> gas complaints (a lot of non-assembler code like target data-layout
> which are not in comments).
actually it does work with -flto, in an awkward way. When you use -flto
it spits out LLVM IR. You need to use -S, otherwise the system assembler
tries (and fails) to compile this. You need to then use llvm-as to turn
this into LLVM bitcode. You can then link and optimize the bitcode either
by hand (using llvm-ld) or using the gold plugin, as described in
http://llvm.org/docs/GoldPlugin.html
It is annoying that gcc insists on running the system assembler when passed
-c. Not running the assembler isn't only good for avoiding the -S + llvm-as
rigmarole mentioned above. LLVM is now capable of writing out object files
directly, i.e. without having to pass via an assembler at all. It would be
neat if I could have the plugin immediately write out the final object file
if -c is passed. I didn't work out how to do this yet. It probably requires
some gcc modifications, so maybe something can be done for gcc-4.6.
For transparent LTO another possibility is to encode LLVM bitcode in the
assembler in the same way as gcc does for gimple when passed -flto. I didn't
investigate this yet.
Ciao,
Duncan.
More information about the Gcc
mailing list