search for: unrolling

Displaying 20 results from an estimated 1377 matches for "unrolling".

2014 Jan 16
11
[LLVMdev] Loop unrolling opportunity in SPEC's libquantum with profile info
...8c_source.html#l00149). The function accounts for ~20% of total runtime. By allowing the runtime unroller, we can speedup the program by about 12%. I have been poking at the unroller a little bit. Currently, the runtime unroller is only triggered by a special flag or if the target states it in the unrolling preferences. We could also consult the block frequency information here. If the loop header has a higher relative frequency than the rest of the function, then we'd enable runtime unrolling. Chandler also pointed me at the vectorizer, which has its own unroller. However, the vectorizer only un...
2015 Oct 16
2
question about llvm partial unrolling/runtime unrolling
Hi Hal, I did opt.exe -S -debug -loop-unroll -unroll-runtime=true -unroll-count=4 csShader.ll and it prints out: Args: opt.exe -S -debug -loop-unroll -unroll-runtime=true -unroll-count=4 csShader.ll Loop Unroll: F[build_cs_5_0] Loop %loop_entry Loop Size = 82 partially unrolling with count: 1 Thanks, Frances On Thu, Oct 15, 2015 at 9:35 PM, Hal Finkel <hfinkel at anl.gov> wrote: > > ------------------------------ > > *From: *"Frances Tzeng via llvm-dev" <llvm-dev at lists.llvm.org> > *To: *llvm-dev at lists.llvm.org > *Sent: *M...
2014 Jul 17
4
[LLVMdev] Removing metadata in a pass
Is it OK to remove metadata in an optimization pass? The context is patch http://reviews.llvm.org/D4571 which removes loop unrolling hint metadata after using it to avoid unrolling more than the hint suggests. This is a potential problem because loop unrolling can be run more than once. Example: a loop annotated with "#pragma clang loop unroll_count(2)" which adds hint metadata to the loop would be unrolled twice eve...
2015 Oct 12
2
question about llvm partial unrolling/runtime unrolling
Hi, I am trying to do loop unrolling with loops that don't have constant loop counter. It is highly appreciated if anyone can help me on this. What I want to do is to turn loop (n) { <loop body> } into loop (n/4) { <loop body> <loop body> <loop body> &l...
2014 Jan 21
5
[LLVMdev] Loop unrolling opportunity in SPEC's libquantum with profile info
...#39;ve seen, it will get a maximum unroll factor of 2 on x86 (4 on >> avx targets). Additionally, the vectorizer only unrolls to aid >> reduction variables. When I forced the vectorizer to unroll these >> loops, the performance effects were nil. > > Vectorization and partial unrolling (aka runtime unrolling) for ILP > should to be the same pass. The profitability analysis required in > each case is very closely related, and you never want to do one before > or after the other. The analysis makes sense even for targets without > vector units. The “vector unroller”...
2016 Oct 13
2
Loop Unrolling Fail in Simple Vectorized loop
...aving 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 inspect further, I added the following to the PassManagerBuilder.cpp to > run some canonicalization routines and redo unrolling again. I have set > partial unrolling on + have a huge threshold + allows expensive loop trip > counts. Still it didn't unroll by 2. > > MPM.add(createLoopUnrollPass()); > > MPM.add(createCFGSimplificationPass()); > > MPM.add(createLoopSimplifyPass()); > > MPM.add(...
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] = b[i]*c[i-1]; > > } > > return 0; > > } > > > Then, the unroller is able to unroll it by 2 eve...
2012 Feb 01
3
[LLVMdev] Loop Unroll a constant number of times?
Is it possible to unroll a loop (forcibly if necessary) with llvm (possibly the -loop-unroll pass) a constant number of times. I believe that I read that the -unroll-count=x option was removed, correct? So is there some other way to do this or is this just not possible in llvm? -------------- next part -------------- An HTML attachment was scrubbed... URL:
2016 Oct 12
2
Loop Unrolling Fail in Simple Vectorized loop
...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 inspect further, I added the following to the PassManagerBuilder.cpp to run some canonicalization routines and redo unrolling again. I have set partial unrolling on + have a huge threshold + allows expensive loop trip counts. Still it didn't unroll by 2. MPM.add(createLoopUnrollPass()); MPM.add(createCFGSimplificationPass()); MPM.add(createLoopSimplifyPass()); MPM.add(createLoopRotatePass(SizeLevel == 2 ? 0 : -1))...
2012 Nov 21
2
[LLVMdev] Disable loop unroll pass
...>> Sent: Wednesday, November 21, 2012 10:31:07 AM >> Subject: [LLVMdev] Disable loop unroll pass >> >> Hi, >> >> We've a target which has hardware support for zero-overhead loops. >> Currently, we cannot detect them because the loop unroller is >> unrolling >> them before entering into the codegen. Looking at its implementation, >> it >> seems that it checks if it is profitable to unroll it or not based on >> certain parameters. >> >> Given that zero cost loops building is based more or less on the same >> con...
2014 Jul 31
3
[LLVMdev] Should we enable Partial unrolling and Runtime unrolling on AArch64?
Hi all, Partial unrolling and runtime unrolling are enabled by default in aarch64 gcc which is help to get performance better. But these two methods are enabled for only several backends in LLVM which are X86, PowerPC and R600. I don't know the history of these two kinds of unrolling, and why they are not widely used. I...
2012 Nov 21
4
[LLVMdev] Disable loop unroll pass
Hi, We've a target which has hardware support for zero-overhead loops. Currently, we cannot detect them because the loop unroller is unrolling them before entering into the codegen. Looking at its implementation, it seems that it checks if it is profitable to unroll it or not based on certain parameters. Given that zero cost loops building is based more or less on the same constraints that loop unroll pass, I wonder if it is reasonab...
2012 Nov 22
0
[LLVMdev] Disable loop unroll pass
Hi, Ivan: My $0.02. hasZeroCostLooping() disabling unrolling dose not seem to be appropriate for other architectures, at least the one I worked before. You mentioned: >Currently, we cannot detect them because the loop unroller is >unrolling them before entering into the codegen. Looking at its implementation, >it. Could you please artic...
2012 Nov 21
2
[LLVMdev] Disable loop unroll pass
...#39;m not sure if you're referring to the case when a compile-time trip count loop is completely unrolled or for a loop with a run-time trip count, which would be partially unrolled. For Hexagon, if we partially unroll a loop, we'd also like to use our hardware loop instructions. That is, unrolling and hardware loops are complementary. Thanks, -- Brendon -- Qualcomm Innovation Center, Inc is a member of Code Aurora Forum, hosted by The Linux Foundation -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Krzysztof Parzyszek Se...
2017 Jan 30
4
(RFC) Adjusting default loop fully unroll threshold
Currently, loop fully unroller shares the same default threshold as loop dynamic unroller and partial unroller. This seems conservative because unlike dynamic/partial unrolling, fully unrolling will not affect LSD/ICache performance. In https://reviews.llvm.org/D28368, I proposed to double the threshold for loop fully unroller. This will change the codegen of several SPECCPU benchmarks: Code size: 447.dealII 0.50% 453.povray 0.42% 433.milc 0.20% 445.gobmk 0.32% 403.gcc 0...
2014 Jun 22
2
[LLVMdev] Failed to Unroll a Seemingly Simple Loop
Hi, I found LLVM cannot unroll the loop in the example below, while gcc can. Before I dig more about this issue, is this behavior as designed? bool bar(int i); void foo(int *a, int x, int y) { for (int i = 0; i < 4; ++i) { if (bar(i)) { break; } a[i] = i; } } Btw, if s/break/continue, LLVM is able to unroll it. Thanks, Jingyue -------------- next part --------------
2017 Jan 31
3
(RFC) Adjusting default loop fully unroll threshold
...9 AM, Dehao Chen via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: >> >> Currently, loop fully unroller shares the same default threshold as loop dynamic unroller and partial unroller. This seems conservative because unlike dynamic/partial unrolling, fully unrolling will not affect LSD/ICache performance. In https://reviews.llvm.org/D28368 <https://reviews.llvm.org/D28368>, I proposed to double the threshold for loop fully unroller. This will change the codegen of several SPECCPU benchmarks: >> >> Code size: >> 447.dea...
2020 May 22
4
Loop Unroll
Hi, I'm interesting in find a pass for loop unrolling in LLVM compiler. I tried opt --loop-unroll --unroll-count=4, but it don't work well. What pass I can used and how? I would also like to know if there is any way to mark the loops that I want them to be unroll Thanks you. -------------- next part -------------- An HTML attachment was scrubbe...
2018 Aug 09
3
Legacy Loop Pass Manager question
Hi, If we add multiple loop passes to the pass manager in PassManagerBuilder.cpp consecutively without any func/module pass in between, I used to think they would belong to the same loop pass manager. But it does not seem to be the case. For example for this code snippet PM.add(createIndVarSimplifyPass()); // Canonicalize indvars MPM.add(createLoopIdiomPass()); //
2011 Jun 25
1
[LLVMdev] Loop Unrolling
...0; for(i=0; i<1024; ++i) sum += a[i]; printf("%d",sum); } ------------------- I got the following compilation error. Any thoughts on why it is happening. It is not supposed to crash right? ------------------------------- Loop Unroll: F[main] Loop %for.body Loop Size = 7 UNROLLING loop %for.body by 2! PHINode should have one entry for each predecessor of its parent basic block! %sum.0.lcssa = phi i32 [ %add.1, %for.inc.1 ] Broken module found, compilation aborted! 0 opt 0x0894589a 1 opt 0x08945627 2 0x00d9c400 __kernel_sigreturn + 0 3 libc.so.6 0...