[LLVMdev] build errors while cross compiling llvm-gcc for ARM

Sanjeev chugh sanjuchugh at gmail.com
Thu Jun 17 06:33:39 PDT 2010


Thanks for the reply. We have an product whose one part has lot of
algorithms doing some graphics work. Our intention was to figure out if
there can be any performance gain if we use llvm instead of native ARM. This
is for ARM target. Earlier, I have built this component using llvm and
tested  it on x86. Performance was 4x as compared to native gcc. Then I
built llvm for ARM and tested this component on ARM with llvm compiler and
performance of llvm+arm against native ARM was almost equal or less :(
However, I have run a simple sorting algorithms who run for 100K times and
sort 10K elements on llvm+arm and this time it's performance was 3x better
than native ARM. Can you guys please suggest what could be there in this
graphics component which is not allowing the performance to improve for

cross-compiler has been built with these flags

Using built-in specs.
Target: armv7fl-montavista-linux-gnueabi
Configured with: ./configure --host=i686-pc-linux-gnu
--build=i686-pc-linux-gnu --target=armv7fl-montavista-linux-gnueabi
--enable-cross --with-sysroot=/home/arm_v7_vfp_le/target/
--with-build-sysroot=/home/arm_v7_vfp_le/target/ --enable-shared
--enable-languages=c,c++ --with-as=/home/arm_v7_vfp_le/bin/arm_v7_vfp_le-as
--with-ld=/home/arm_v7_vfp_le/bin/arm_v7_vfp_le-ld --enable-checking=release
--disable-multilib --enable-llvm=/home/Desktop/Sanjeev/LLVM/llvm-2.7
--enable-clocale=gnu --with-cpu=cortex-a8 --with-interwork
--with-arch=armv7-a --with-mode=arm --with-tune=cortex-a8 --with-fpu=vfp3
--disable-bootstrap --disable-libmudflap --disable-libssp
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build)

These are the steps how I'm building library on ARM+llvm. generated .a is
linked with other targets built with native arm compiler.

g++-cross -flto -O2 -Wall -function-sections -fdata-sections ; for all .cpps
llvm-ld -link-as-library *.bc target.bc // Consolidate all .bcs into one
llc target.bc -o target.s
cross-as target.s -o target.o
ar q target.a target.o

On Mon, Jun 7, 2010 at 10:18 PM, Anton Korobeynikov <anton at korobeynikov.info
> wrote:

> Hello
> > /tmp/cczBL31y.s:409: rdhi, rdlo and rm must all be different
> This is binutils bug fixed ~2 years ago:
> http://sourceware.org/ml/binutils/2007-11/msg00046.html
> Make sure you're using the latest binutils for ARM (from binutils CVS)
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100617/0062dafb/attachment.html>

More information about the llvm-dev mailing list