similar to: [LLVMdev] Problem with loop-unrolling

Displaying 20 results from an estimated 50000 matches similar to: "[LLVMdev] Problem with loop-unrolling"

2011 Jun 25
1
[LLVMdev] Loop Unrolling
Hello, I tried to do some small experiments on the loop unroll transformation. Following is the Test Program. I compiled it as follows: $ opt -loop-rotate -debug-only=loop-unroll -loop-unroll -unroll-count=2 test1.o -S -o test1.s ------------------ int a[1024]; int main() { int i, sum=0; for(i=0; i<1024; ++i) sum += a[i]; printf("%d",sum); } ------------------- I got
2011 Jun 17
1
[LLVMdev] Loop Unroll Factor
Devang, I meant as an end user. -Suresh On Thu, Jun 16, 2011 at 11:00 PM, Devang Patel <dpatel at apple.com> wrote: > Suresh, > > > On Jun 15, 2011, at 9:13 PM, Suresh Purini wrote: > >> Dear all, >> >> What is the default loop-unroll factor in llvm? How can we specify >> our own unroll-factor? > > Here "we" means end user or a
2011 Jun 16
2
[LLVMdev] Loop Unroll Factor
Dear all, What is the default loop-unroll factor in llvm? How can we specify our own unroll-factor? -Suresh
2011 Jun 16
0
[LLVMdev] Loop Unroll Factor
Suresh, On Jun 15, 2011, at 9:13 PM, Suresh Purini wrote: > Dear all, > > What is the default loop-unroll factor in llvm? How can we specify > our own unroll-factor? Here "we" means end user or a compiler developer ? The threshold is 150, see LoopUnrollPass.cpp - Devang
2015 Aug 20
2
loop unrolling introduces conditional branch
Hi, I want to use loop unrolling pass, however, I find that loop unrolling will introduces conditional branch at end of every "unrolled" part. For example, consider the following code *void foo( int n, int array_x[])* *{* * for (int i=0; i < n; i++)* * array_x[i] = i; * *}* Then I use this command "opt-3.5 try.bc -mem2reg -loops -loop-simplify -loop-rotate -lcssa
2016 Oct 12
2
Loop Unrolling Fail in Simple Vectorized loop
Hi all, Attached herewith is a simple vectorized function with loops performing a simple shuffle. I want all loops (inner and outer) to be unrolled by 2 and as such used -unroll-count=2 The inner loops(with k as the induction variable and having constant trip counts) unroll fully, but the outer loop with (j) fails to unroll. The llvm code is also attached with inner loops fully unrolled. To
2016 Oct 13
2
Loop Unrolling Fail in Simple Vectorized loop
Thanks for the explanation. But I am a little confused with the following fact. Can't LLVM keep vectorizable_elements as a symbolic value and convert the loop to say; for(unsigned i = 0; i < vectorizable_elements ; i += 2){ //main loop } for(unsigned i=0 ; i < vectorizable_elements % 2; i++){ //fix up } Why does it have to reason about the range of vectorizable_elements? Even
2009 Apr 27
1
[LLVMdev] Strange loop unrolling problem (partially solved)
A short while ago I wrote about the strange loop unrolling behavior we encountered. The problem was that with -O3, the following loop does not get unrolled if the ifdef'ed dead code is not present. ------------------------------------ extern volatile int v1; int unroll() { int i; int v2 = 0; for(i = 0; i < 3; i++) { if (i == v2) { v1 = 1000; } else { v1 = 1001; }
2015 Aug 20
2
loop unrolling introduces conditional branch
Hi Xiangyang, The algorithm for loop unrolling was changed post-3.5 to do more what you'd expect. If you use 3.6 or 3.7 you'll likely get better results. Cheers, James On Thu, 20 Aug 2015 at 18:09 Philip Reames via llvm-dev < llvm-dev at lists.llvm.org> wrote: > On 08/20/2015 07:38 AM, Xiangyang Guo via llvm-dev wrote: > > Hi, > > I want to use loop unrolling
2016 Oct 13
2
Loop Unrolling Fail in Simple Vectorized loop
If count > MAX_UINT-4 your loop loops indefinitely with an increment of 4, I think. On Thu, Oct 13, 2016 at 4:42 PM, Charith Mendis via llvm-dev < llvm-dev at lists.llvm.org> wrote: > So, I tried unrolling the following simple loop. > > int unroll(unsigned * a, unsigned * b, unsigned *c, unsigned count){ > > for(unsigned i=0; i<count; i++){ > > a[i] =
2005 Apr 20
1
[LLVMdev] llvm-gcc loop unrolling
What component is responsible for loop unrolling, llvm-gcc, or some LLVM pass after GCC? When compiling this function: void printArray( int array[16] ) { for( int i = 0; i < 16; ++ i ) { printf( "%d\n", array[i] ); } } llvm-gcc chooses to unroll this loop, and I don't think it should. It doesn't unroll the loop if there are 17 iterations, only 16. It also produces
2015 Aug 21
2
loop unrolling introduces conditional branch
There's been some recent noise on the mailing list about requiring -fno-rtti; http://lists.llvm.org/pipermail/llvm-dev/2015-August/089010.html Could that be it? On Sat, Aug 22, 2015 at 12:21 AM, Xiangyang Guo via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Hi, James and Philip, Thanks for your help. > > Based on your advice, I downloaded llvm-3.7. However, with this new
2014 Jan 28
2
[LLVMdev] Loop unrolling opportunity in SPEC's libquantum with profile info
In r200270 I added support to unroll conditional stores in the loop vectorizer. It is currently off pending further benchmarking and can be enabled with "-mllvm -vectorize-num-stores-pred=1”. Furthermore, I added a heuristic to unroll until load/store ports are saturated “-mllvm enable-loadstore-runtime-unroll” instead of the pure size based heuristic. Those two together with a patch that
2011 Jun 19
2
[LLVMdev] Phase Interactions
Dear all, I am doing few experiments to do understand optimization phase interactions. Here is a brief description of my experiements. 1. I picked the list of machine independent optimizations acting on llvm IR (those that are enabled at O3). 2. for each optimzation in the optimization-list a) Compiled the program using 'clang -c O0 -flto program.c' b) opt
2011 Sep 21
1
[LLVMdev] Fortran to llvm IR
Hello, How can I convert Fortran Programs to llvm IR? Can I use dragonegg to generate an llvm IR and then use rest of the llvm tool set as it is? -Suresh
2011 Jun 19
0
[LLVMdev] Phase Interactions
On 19 June 2011 14:44, Suresh Purini <suresh.purini at gmail.com> wrote: >  I am doing few experiments to do understand optimization phase > interactions. Here is a brief description of my experiements. > > 1. I picked the list of machine independent optimizations acting on > llvm IR (those that are enabled at O3). > 2.  for each optimzation in the optimization-list >  
2013 Feb 09
1
[LLVMdev] Impact of an analysis pass on program run time
Hello, I am working on finding good optimization sequences for a given program (phase ordering problem). I have the following setup. 1) The source programs are translated into LLVM IR using -O0 + -scalarrepl. 2) Find an optimization sequence using some strategy which translates the IR generated in the previous step into another IR. 3) Apply llc -O2 and map the IR in to target assembly code.
2014 Jul 15
4
[LLVMdev] Partial loop unrolling
Hi, PS: It is a generic question related to partial loop unrolling, and nothing specific to LLVM. As far as partial loop unrolling is concerned, I could see following three different possibilities. Assume that unroll factor is 3. Original loop: for (i = 0; i < 10; i++) { do_foo(i); } 1. First possibility i = 0; do_foo(i++); do_foo(i++);
2014 Jan 21
5
[LLVMdev] Loop unrolling opportunity in SPEC's libquantum with profile info
On 16/01/2014, 23:47 , Andrew Trick wrote: > > On Jan 15, 2014, at 4:13 PM, Diego Novillo <dnovillo at google.com > <mailto:dnovillo at google.com>> wrote: > >> Chandler also pointed me at the vectorizer, which has its own >> unroller. However, the vectorizer only unrolls enough to serve the >> target, it's not as general as the runtime-triggered
2011 Jul 06
1
[LLVMdev] Optimization Order at O2/O3
Dear all, Is there a command line argument which prints the order of application of various analysis/transformation passes on a program using clang? -Suresh