Hi, I am trying to use LLVM on x86 with some code intended for another architecture (IBM Cell). The plan is: 1. foreach $c_files llvm-gcc -emit-llvm -c -o $bc_file $c_file 2. link $bc_files 3. run my passes with 'opt' 4. llc -march=c 5. cell_cc The original code is for the Cell, and uses altivec intrinsics. However, llvm-gcc complains about not recognizing them. I read that there is an -maltivec flag for the LLVM PowerPC backend, but my version of llvm-gcc complains about this "unrecognized command line option." Any hints? Thanks. (Please CC me as I am not subscribed to this list) -- Sunjae Park MS. Georgia Tech College of Computing We choose to go to the moon and do the other things, not because they are easy, but because they are hard. - John F. Kennedy
On Apr 5, 2008, at 3:31 PM, Sunjae Park wrote:> Hi, I am trying to use LLVM on x86 with some code intended for another > architecture (IBM Cell). The plan is: > > 1. foreach $c_files > llvm-gcc -emit-llvm -c -o $bc_file $c_file > 2. link $bc_files > 3. run my passes with 'opt' > 4. llc -march=c > 5. cell_cc > > The original code is for the Cell, and uses altivec intrinsics. > However, > llvm-gcc complains about not recognizing them. I read that there is > an -maltivec flag for the LLVM PowerPC backend, but my version of > llvm-gcc > complains about this "unrecognized command line option." Any hints? >Hi Sunjae, You'll need to compile llvm-gcc as a cross-compiler to get it to accept altivec intrinsics and PPC-specific flags. -bw
On Sunday 06 April 2008 06:53:06 am Bill Wendling wrote:> (snip) > Hi Sunjae, > > You'll need to compile llvm-gcc as a cross-compiler to get it to > accept altivec intrinsics and PPC-specific flags. > > -bwThanks, Bill. I was afraid of that. Any pointers on how to do this? I'm able to build llvm-gcc-4.2 x86 natively, but not the powerpc version. Using "--disable-shared --disable-multilib --disable-bootstrap" as additional flags, I've tried: powerpc-linux powerpc64-linux CellSPU-linux as the target, but powerpc* dies with rs6000.c and the CellSPU target wasn't recognized. Setting --with-sysroot didn't help either. Thanks. -- Sunjae Park MS. Georgia Tech College of Computing