Hi, you need to run some optimization passes first. (like -O2) 2011/5/3 Manish Gupta <mgupta.iitr at gmail.com>> I just want to try loop-unroll and see corresponding changes in the bitcode > file. For that any loop will do. Have you been able to test llvm loop-unroll > successfully? > > > On Mon, May 2, 2011 at 10:04 PM, Yuan Pengfei <coolypf at qq.com> wrote: > >> Hi, >> >> > The loop that I am trying it on is: >> > for(i=0; i< 1000; i++) >> > { >> > c[i] = a[i] + b[i]; >> > } >> >> I can't find any benefit unrolling this loop. >> >> ------------------ >> Yuan Pengfei >> Peking Unversity, China > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-- Best regards, Kuan-Hsu -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110503/95b6bc89/attachment.html>
You mean like *llvm-gcc-4.2 -O2 -emit-llvm Hello.c -c -o Hello.bc* But still i am not able to observe any effect on bit code by running *opt-2.8 -loop-unroll Hello.bc -o Hello_unroll.bc* On Tue, May 3, 2011 at 3:58 AM, Zakk <zakk0610 at gmail.com> wrote:> Hi, you need to run some optimization passes first. (like -O2) > > 2011/5/3 Manish Gupta <mgupta.iitr at gmail.com> > >> I just want to try loop-unroll and see corresponding changes in the >> bitcode file. For that any loop will do. Have you been able to test llvm >> loop-unroll successfully? >> >> >> On Mon, May 2, 2011 at 10:04 PM, Yuan Pengfei <coolypf at qq.com> wrote: >> >>> Hi, >>> >>> > The loop that I am trying it on is: >>> > for(i=0; i< 1000; i++) >>> > { >>> > c[i] = a[i] + b[i]; >>> > } >>> >>> I can't find any benefit unrolling this loop. >>> >>> ------------------ >>> Yuan Pengfei >>> Peking Unversity, China >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> > > > -- > Best regards, > Kuan-Hsu > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110503/0ca20f53/attachment.html>
Hi, You might want to try running -loops -loop-simplify before loop unroll.>From loop simplify.cppThis pass performs several transformations to transform natural loops into a00011 // simpler form, which makes subsequent analyses and transformations simpler and00012 // more effective. Arushi On Tue, May 3, 2011 at 2:17 PM, Manish Gupta <mgupta.iitr at gmail.com> wrote:> You mean like > > *llvm-gcc-4.2 -O2 -emit-llvm Hello.c -c -o Hello.bc* > > But still i am not able to observe any effect on bit code by running > > *opt-2.8 -loop-unroll Hello.bc -o Hello_unroll.bc* > > On Tue, May 3, 2011 at 3:58 AM, Zakk <zakk0610 at gmail.com> wrote: > >> Hi, you need to run some optimization passes first. (like -O2) >> >> 2011/5/3 Manish Gupta <mgupta.iitr at gmail.com> >> >>> I just want to try loop-unroll and see corresponding changes in the >>> bitcode file. For that any loop will do. Have you been able to test llvm >>> loop-unroll successfully? >>> >>> >>> On Mon, May 2, 2011 at 10:04 PM, Yuan Pengfei <coolypf at qq.com> wrote: >>> >>>> Hi, >>>> >>>> > The loop that I am trying it on is: >>>> > for(i=0; i< 1000; i++) >>>> > { >>>> > c[i] = a[i] + b[i]; >>>> > } >>>> >>>> I can't find any benefit unrolling this loop. >>>> >>>> ------------------ >>>> Yuan Pengfei >>>> Peking Unversity, China >>> >>> >>> >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>> >>> >> >> >> -- >> Best regards, >> Kuan-Hsu >> >> >> > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110503/fb4e882a/attachment.html>