[LLVMdev] slow on raspberry pi

Renato Golin Linaro renato.golin at linaro.org
Fri Jan 18 03:36:40 PST 2013

On 18 January 2013 11:03, Torsten RĂ¼ger <torsten at villataika.fi> wrote:

> So when i got my raspberry pi, and having read that llvm is better at arm
> than gcc, i compiled llvm on the pi. The pi has a soc with armv6 (i don't
> know what that means exactly though).

Hi Torsten,

That means an ARM1176, an old - but still kicking - ARM core.


> The pi is not fast and llvm with clang compilation took 22 h, but worked.
> hurrah.
> Then i compiled llvm/clang with itself and was pleased it took "only" 12
> hours. even better.

I got faster compilations with Clang on ARM on both PandaES and Chromebook,
so that's consistent, but half the time is really impressive.

Have you run "make check-all" ?

But then I compiled linpack and clang numbers were less than 1/4 off gcc
> compiled  :-(    (9000kFlops about)

> Now according to this http://elinux.org/RPi_Performance  there is
> something with compiler settings, hard/soft floats and possibly the exact
> target (armv6XXX) of the pi to make it better.

Compile with -v and see what's the full command to see if it's choosing the
triple correctly. It should pick armv6k.

Since there's no NEON on ARM11 and VFP is optional, it's likely that LLVM
is assuming soft-floats, in which case your performance will be hurt. You
can also see in the full compilation command like (via clang -v) and turn
it on by choosing "-mfloat-abi hard".

My question is: has anybody else tried this, or could tell me what i could
> try to remedy this.

LLVM compilation times won't be much faster than that, but turning on
hard-float can help linpack. Though, I'd be surprised if it went up 4x to
catch up with GCC.

I'd love to see the numbers and possibly a trace of it running on both
GCC-compiled and LLVM-compiled versions (if you'd be so kind ;).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130118/016eff1e/attachment.html>

More information about the llvm-dev mailing list