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
Hi,> 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.I am the primary maintainer of llvmc. First of all, thanks for your bug report.> tools/llvmc/plugins/Base/Base.td hardcodes the -relocation-model=pic > option into invocations of llc:This part was copied verbatim from the previous incarnation of llvmc and wasn't given much thought.> I don't see an easy way to disable or override this option when invoking > llvmc on the command line.I removed the '-relocation-model' bit from the default invocation string for llc. To pass arguments to llc, use the new "-Wllc" option. -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
Mikhail Glushenkov wrote:> I removed the '-relocation-model' bit from the default invocation > string for llc. To pass arguments to llc, use the new "-Wllc" > option.I'd say that this is the proper solution, even though it breaks backward compatibility on x86_64. But given that llvmc is still considered experimental, better do it now than later. ;-) Thanks a lot for creating llvmc, it's very useful! -- 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