[LLVMdev] llvmc issues on x86_32

Albert Graef Dr.Graef at t-online.de
Mon Mar 30 02:24:34 PDT 2009


According to the FAQ llvmc is considered experimental/unsupported. But
FWIW, here's an issue I found while trying to use it on 32 bit x86 systems.

tools/llvmc/plugins/Base/Base.td hardcodes the -relocation-model=pic
option into invocations of llc:

def llc : Tool<
[(in_language "llvm-bitcode"),
 (out_language "assembler"),
 (output_suffix "s"),
 (cmd_line "llc -relocation-model=pic -f $INFILE -o $OUTFILE"),
 (actions (case (switch_on "S"), (stop_compilation)))
]>;

This is nice on 64 bit systems, but generates slow code on 32 bit x86,
and even breaks on 32 bit Windows (using the mingw port); llc spits out
a failed assertion there if invoked with -relocation-model=pic.

I don't see an easy way to disable or override this option when invoking
llvmc on the command line.

My question is, are the llvmc maintainers aware of this, and is there a
workaround which does not require patching up Base.td? I couldn't find
anything in bugzilla.

TIA,
Albert

-- 
Dr. Albert Gr"af
Dept. of Music-Informatics, University of Mainz, Germany
Email:  Dr.Graef at t-online.de, ag at muwiinfa.geschichte.uni-mainz.de
WWW:    http://www.musikinformatik.uni-mainz.de/ag



More information about the llvm-dev mailing list