search for: unrol

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

Did you mean: unroll
2014 Jan 16
11
[LLVMdev] Loop unrolling opportunity in SPEC's libquantum with profile info
I am starting to use the sample profiler to analyze new performance opportunities. The loop unroller has popped up in several of the benchmarks I'm running. In particular, libquantum. There is a ~12% opportunity when the runtime unroller is triggered. This helps functions like quantum_sigma_x (http://sourcecodebrowser.com/libquantum/0.2.4/gates_8c_source.html#l00149). The function accounts...
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...
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...
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>...
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 unroller. From >> what I've seen, it will get a maximum unroll factor of 2 on x86 (4 on >> avx targets). Additionally, the vectorizer only unrolls to aid &g...
2016 Oct 13
2
Loop Unrolling Fail in Simple Vectorized loop
...5 PM, Friedman, Eli <efriedma at codeaurora.org> wrote: > On 10/12/2016 4:35 PM, Charith Mendis via llvm-dev wrote: > > 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 inspect further...
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...
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...
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 inspect further, I added the following to the Pa...
2012 Nov 21
2
[LLVMdev] Disable loop unroll pass
...kel wrote: > ----- Original Message ----- >> From: "Ivan Llopard" <ivanllopard at gmail.com> >> To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> >> 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 &...
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 use...
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 i...
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 a...
2012 Nov 21
2
[LLVMdev] Disable loop unroll pass
I just wanted to add to Krzysztof's response. I'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...
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 unrolle...
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...
2017 Jan 31
3
(RFC) Adjusting default loop fully unroll threshold
...PM Mehdi Amini via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: >> On Jan 30, 2017, at 10:49 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 dou...
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 scr...
2018 Aug 09
3
Legacy Loop Pass Manager question
...is code snippet PM.add(createIndVarSimplifyPass()); // Canonicalize indvars MPM.add(createLoopIdiomPass()); // Recognize idioms like memset. addExtensionsToPM(EP_LateLoopOptimizations, MPM); MPM.add(createLoopDeletionPass()); // Delete dead loops .. if (!DisableUnrollLoops) MPM.add(createSimpleLoopUnrollPass(OptLevel)); // Unroll small loops I see -debug-pass=Structure output: Scalar Evolution Analysis Loop Pass Manager Induction Variable Simplification Recognize loop idioms Delete dead loops Unrol...
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&quo...