Hi, I am trying to turn on the new GCC auto-vectorization feature within llvmgcc4. Below is the command I used, but nothing was vectorized. Does it mean that llvmgcc4 has disabled this optimization and all I can do is to embed SSE intrinsics in the source code by hand? Thanks! ./llvm-gcc4-x86/bin/llvm-gcc -c -O2 -ftree-vectorize -msse -ftree-vectorizer-verbose=5 -emit-llvm vec.c -o vec.bc ////////////////////vec.c///////////////////////// int a[256], b[256], c[256]; foo () { int i; for (i=0; i<256; i++){ a[i] = b[i] + c[i]; } } -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060731/2f1a0a92/attachment.html>
llvmgcc4 emits LLVM byte code before executing GCC optimizations, so one can say that llvmgcc4 disables all GCC optimizations. On Jul 31, 2006, at 11:01 AM, Zhiru Zhang wrote:> Hi, > I am trying to turn on the new GCC auto-vectorization feature > within llvmgcc4. Below is the command I used, but nothing was > vectorized. Does it mean that llvmgcc4 has disabled this > optimization and all I can do is to embed SSE intrinsics in the > source code by hand? > > Thanks! > > ./llvm-gcc4-x86/bin/llvm-gcc -c -O2 -ftree-vectorize -msse -ftree- > vectorizer-verbose=5 -emit-llvm vec.c -o vec.bc > > ////////////////////vec.c///////////////////////// > int a[256], b[256], c[256]; > foo () { > int i; > for (i=0; i<256; i++){ > a[i] = b[i] + c[i]; > } > } > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev- Devang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060731/4f7f48f2/attachment.html>
Does llvmgcc4 convert the high-level AST to LLVM (like llvmgcc3x) or does it go from GIMPL to LLVM? If the latter, would it be possible to allow some TreeSSA optimizations before emitting LLVM? --Vikram http://www.cs.uiuc.edu/~vadve http://llvm.cs.uiuc.edu/ On Jul 31, 2006, at 1:10 PM, Devang Patel wrote:> llvmgcc4 emits LLVM byte code before executing GCC optimizations, > so one can say that llvmgcc4 disables all GCC optimizations. > > On Jul 31, 2006, at 11:01 AM, Zhiru Zhang wrote: > >> Hi, >> I am trying to turn on the new GCC auto-vectorization feature >> within llvmgcc4. Below is the command I used, but nothing was >> vectorized. Does it mean that llvmgcc4 has disabled this >> optimization and all I can do is to embed SSE intrinsics in the >> source code by hand? >> >> Thanks! >> >> ./llvm-gcc4-x86/bin/llvm-gcc -c -O2 -ftree-vectorize -msse -ftree- >> vectorizer-verbose=5 -emit-llvm vec.c -o vec.bc >> >> ////////////////////vec.c///////////////////////// >> int a[256], b[256], c[256]; >> foo () { >> int i; >> for (i=0; i<256; i++){ >> a[i] = b[i] + c[i]; >> } >> } >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > - > Devang > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev