[LLVMdev] obtaining IR for CellBE code
scottm at aero.org
Wed Jun 10 15:03:46 PDT 2009
The llvm-gcc frontend will _not_ produce the IR. Specifically, the
LLVM Cell BE (not "CELLBE") backend needs to capture and expand i32
multiplies. I'm sure there're other bugs that need to be fixed.
What you want to do, if you really, absolutely want to produce IR is
use llvm-gcc for PowerPC or x86 to produce the bitcode file. Then, use
llc to generate the assembly language output for the Cell. But...
don't use stdio in your code (printf will not work!). There are other
gotcha's, like using v2i32 vectors (i.e., non-standard vector sizes
that aren't 128-bits long) and alignment, but so far, it's a strategy
that's worked to test code locally when I've had a cycle or two to do
(The Department Director Lives!)
On May 7, 2009, at 9:59 AM, Kshitiz Garg wrote:
> On Thu, May 7, 2009 at 10:12 PM, Eli Friedman
> <eli.friedman at gmail.com> wrote:
>> On Thu, May 7, 2009 at 9:25 AM, Kshitiz Garg
>> <ksh.cseiitk at gmail.com> wrote:
>>>> Can you give a couple examples of error messages you're getting?
>>> llvm-gcc -emit-llvm -S -W -Wall -Winline -Wno-main -I. -I
>>> /opt/cell/sysroot/usr/spu/include -I
>>> /opt/cell/sysroot/opt/cell/sdk/usr/spu/include -O3 -c
>>> simpleDMA_spu.c:42:23: error: spu_mfcio.h: No such file or directory
>> Sorry for the extremely low-level question, but did you compile
>> llvm-gcc as a cross-compiler targeting Cell? Assuming you did, I'm
>> not sure what the issue is; llvm-gcc should be providing that header.
> Oh ok.. I think that is the problem. I was using the llvm-gcc x86 pre
> compiled binary.
> . I will compile llvm-gcc fromt end from the source code and try that.
> Thanks a lot.. :)
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev