[LLVMdev] Preferring to use GCC instead of LLVM
kr512
kr512 at optusnet.com.au
Sat May 10 03:06:33 PDT 2008
Oh another thing, consider this question that some people
will be asking: Why not use GCC to do what LLVM does, and
skip the hassle of using LLVM entirely?
ESPECIALLY considering that LLVM cannot be used without GCC.
Even if you are using LLVM as a back-end only, for compiling
LLVM bytecode only, GCC is still required to convert the
"llc" output assembly .S file into a ready-to-execute native
machine code .EXE or .DLL file.
Thus if LLVM is an incomplete back-end replacement for GCC,
why not just use the normal version of GCC?
I do understand the LLVM project and I think it is great and
very worthwhile, but while LLVM cannot be used as a complete
back-end by itself, then GCC is a more attractive solution
for our project.
See, in our project, we have a front-end compiler. For
input to the back-end, we can generate LLVM bytecode, or we
can generate C source code, and then we need it converted to
a native machine code .EXE or DLL ready to load and run. So
you see, either GCC or LLVM can be used as our back-end.
Now what advantage does LLVM have that will entice us to
pick LLVM over GCC? LLVM is smaller? Not really, because
LLVM still requires the use of GCC for the .S file, as I
said above.
LLVM would be a considerably more attractive solution than
GCC *if* the following were true:
(a) LLVM could be used as a back-end without use of GCC.
Meaning LLVM by itself can generate a ready-to-execute .EXE
or .DLL file.
(b) LLVM was provided as a precompiled DLL, not only as
command-line tools.
More information about the llvm-dev
mailing list