Hello, I was trying to extract out the IR for some CELLBE code. However i was not able to compile with llvm-gcc. Has someone who has tried this shed some light on the changes required to use llvm-gcc instead of gcc or xlc. A simple replacement of gcc with llvm-gcc -emit-llvm -S or marking $CC as llvm-gcc in the makefile did not work for me. I am using the standard makefile format supplied with the example codes of CellSDK. Is there any alternate way / intrinsic which can be called to introduce calls to the Cell C intrinsic functions?? TIA, regards, Kshitiz -- Kshitiz Garg Graduate Student Department of Computer Science & Engineering IIT Kanpur http://home.iitk.ac.in/~kshitizg
On Thu, May 7, 2009 at 9:03 AM, Kshitiz Garg <ksh.cseiitk at gmail.com> wrote:> I was trying to extract out the IR for some CELLBE code. However i > was not able to compile with llvm-gcc.Can you give a couple examples of error messages you're getting? -Eli
On Thu, May 7, 2009 at 9:39 PM, Eli Friedman <eli.friedman at gmail.com> wrote:> On Thu, May 7, 2009 at 9:03 AM, Kshitiz Garg <ksh.cseiitk at gmail.com> wrote: >> I was trying to extract out the IR for some CELLBE code. However i >> was not able to compile with llvm-gcc. > > 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 simpleDMA_spu.c:42:23: error: spu_mfcio.h: No such file or directory simpleDMA_spu.c: In function ‘main’: simpleDMA_spu.c:60: warning: implicit declaration of function ‘mfc_tag_reserve’ simpleDMA_spu.c:60: error: ‘MFC_TAG_INVALID’ undeclared (first use in this function) simpleDMA_spu.c:60: error: (Each undeclared identifier is reported only once simpleDMA_spu.c:60: error: for each function it appears in.) simpleDMA_spu.c:74: warning: implicit declaration of function ‘mfc_get’ simpleDMA_spu.c:79: warning: implicit declaration of function ‘mfc_write_tag_mask’ simpleDMA_spu.c:83: warning: implicit declaration of function ‘mfc_read_tag_status_all’ what is happening is llvm-gcc is not able to view the header files even when the includes have been given Kshitiz
Hi Kshitiz, unfortunately it is not possible to build an spu-llvm-gcc yet, there is a small number of issues (mainly support for integer divides and some 128-bit related stuff) which prevent the LLVM SPU backend from compiling libgcc successfully (the low level runtime library which is built as part of llvm-gcc) and thus prevent a successful llvm-gcc build. Please note that the Cell SPU backend is considered experimental. Patches welcome though! :) Greetings, Tilmann On Thu, May 7, 2009 at 6:03 PM, Kshitiz Garg <ksh.cseiitk at gmail.com> wrote:> Hello, > I was trying to extract out the IR for some CELLBE code. However i > was not able to compile with llvm-gcc. > Has someone who has tried this shed some light on the changes required > to use llvm-gcc instead of gcc or xlc. > A simple replacement of gcc with llvm-gcc -emit-llvm -S or marking $CC > as llvm-gcc in the makefile did not work for me. I am using the > standard makefile format supplied with the example codes of CellSDK. > Is there any alternate way / intrinsic which can be called to > introduce calls to the Cell C intrinsic functions?? > TIA, > regards, > Kshitiz > -- > Kshitiz Garg > Graduate Student > Department of Computer Science & Engineering > IIT Kanpur > http://home.iitk.ac.in/~kshitizg > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >