LLVM ARM for shipped products?

I have been following the recent posts regarding LLVM ARM backend on the list. I am trying to figure out if I should start using LLVM to compile my project or if I should just stick with cross compilers like those provided by Code Sourcery and wait till a later time. I have the following questions in this regard:

  1. Can some one tell me if LLVM ARM is being used by anyone to compile any shipped products? If so,
    a) how are you getting by despite the apparent bugs that exist (http://llvm.org/bugs/buglist.cgi?quicksearch=ARM)?
    b) do you build LLVM natively on your ARM platform or do you build it as a cross compiler?

  2. I have heard “rumors” that Apple uses LLVM to compile code shipped on iPhone. Is that correct? If so, can someone tell me whether they use the sources available in the svn tree or do they add customized passes that plug-in to the LLVM infrastructure? Again, is the compiler used native or a cross compiler?

Thanks a lot for sharing your experiences.

SO

I can't comment on how Apple uses LLVM, but we are actively working to improve the quality of the ARM backend. If you can try out using LLVM to compile your project, it would be really great to hear your feedback. We'll find and fix the bugs more quickly if more people try it out and report any problems.

You didn't say what kind of ARM platform you are working on, so I don't know if it is feasible for you to run a native LLVM. Cross-compiling should also work and is probably the easiest thing to try.

I've only been working on this project for a short time, so I'm not yet familiar with all the ARM-related bugs in the database. If there are particular ones that are preventing you from using LLVM, let me know and I'll see if I can do anything about them. Thanks!

Hi,

Simple One schrieb:

1. Can some one tell me if LLVM ARM is being used by anyone to compile
any shipped products? If so,
     a) how are you getting by despite the apparent bugs that exist
(http://llvm.org/bugs/buglist.cgi?quicksearch=ARM)?

I want to use llvm inside OpenJDK's runtime hotspot for which a variant
exists that uses llvm as a JIT compiler backend. Unfortunately the
outstanding issues of the ARM backend in llvm make it crash often and
not suitable for any real work.

Some details here:
http://rschuster.blogs.evolvis.org/2009/03/27/shark-bites-arm/

     b) do you build LLVM natively on your ARM platform or do you build
it as a cross compiler?

I am maintaining a so-called build recipe for the OpenEmbedded project.
LLVM is cross-compiled in this build environment. I have also filed some
PRs against llvm in order to fix the most pressing issues with the new
cmake based build system. As it looks now most of these things are fixed
now and I am looking forward to need no special patches any more when
llvm 2.6 is released.

2. I have heard "rumors" that Apple uses LLVM to compile code shipped on
iPhone. Is that correct? If so, can someone tell me whether they use the
sources available in the svn tree or do they add customized passes that
plug-in to the LLVM infrastructure? Again, is the compiler used native
or a cross compiler?

No idea about this.

Regards
Robert

Hi Robert,

I read your blog entry. The only specific problem you described was pr3877, which is that atomic intrinsics are not implemented for ARM. Versions of the ARM architecture prior to v6 do not support atomic operations very well, so depending on what kind of ARM processor you're using, you may need to solve this problem another way, e.g., by calling some external functions that can do things atomically. It sounds like Xerxes already suggested that approach. We should still fix pr3877, at least for ARM v6 and later, but I'm not sure about the priority of that.

Your comments above seem to indicate that you've run into many other problems with LLVM's ARM backend. If any of those problems still exist in the latest version, could you be more specific about them? I haven't experienced your problems with LLVM "crash[ing] often and not suitable for any real work".

--Bob