similar to: question about llvm partial unrolling/runtime unrolling

Displaying 20 results from an estimated 1300 matches similar to: "question about llvm partial unrolling/runtime unrolling"

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>
2012 Aug 06
3
[LLVMdev] How to call some transformation passes (LoopRotate and LoopUnroll) from my own pass
Hello, I wrote my own pass which needs to do some loop unrolling. I can perform loop unrolling via opt: opt -mem2reg -loops -loop-simplify -loop-rotate -lcssa -loop-unroll -unroll-count=50 mytest.bc -o mytest.bc This command works perfectly. However, what I really want is to produce the **same behavior** but from my own pass (i.e., I don't want to use opt). I wrote a Module pass which
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
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] =
2015 Feb 04
2
[LLVMdev] Is this a bug with loop unrolling and TargetTransformInfo ?
Hi, I ran into this issue recently and wanted to know if it was a bug or expected behavior. In the R600 backend's TargetTransformInfo implementation, we were setting UnrollingPreferences::Count = UINT_MAX. This was a mistake as we should have been setting UnrollingPreferences::MaxCount instead. However, as a result of setting Count to UINT_MAX, this loop would be unrolled 15 times: if (b
2012 Aug 06
0
[LLVMdev] How to call some transformation passes (LoopRotate and LoopUnroll) from my own pass
On Aug 6, 2012, at 6:04 AM, Jorge Navas <navas at comp.nus.edu.sg> wrote: > > Hello, > > I wrote my own pass which needs to do some loop unrolling. > > I can perform loop unrolling via opt: > > opt -mem2reg -loops -loop-simplify -loop-rotate -lcssa -loop-unroll > -unroll-count=50 mytest.bc -o mytest.bc > > This command works perfectly. > >
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 --------------
2011 Nov 21
4
[LLVMdev] How to make Polly ignore some non-affine memory accesses
2011/11/21 Tobias Grosser <tobias at grosser.es>: > On 11/20/2011 04:36 PM, Marcello Maggioni wrote: >> >> Sorry for the noobish question, but what kind of subscripts generate a >> SCEVCouldNotCompute  from the SCEV engine? >> I tried for a while but I wasn't able to trigger that > > Hi Marcello, > > the SCEV returns SCEVCouldNotCompute in case it
2011 Nov 21
0
[LLVMdev] How to make Polly ignore some non-affine memory accesses
On 11/20/2011 04:36 PM, Marcello Maggioni wrote: > Sorry for the noobish question, but what kind of subscripts generate a > SCEVCouldNotCompute from the SCEV engine? > I tried for a while but I wasn't able to trigger that Hi Marcello, the SCEV returns SCEVCouldNotCompute in case it cannot analyze an expression or if the analysis would be to complicated. I am currently not sure if
2011 Dec 04
0
[LLVMdev] How to make Polly ignore some non-affine memory accesses
On 11/21/2011 12:44 PM, Marcello Maggioni wrote: > 2011/11/21 Tobias Grosser<tobias at grosser.es>: >> On 11/20/2011 04:36 PM, Marcello Maggioni wrote: >>> >>> Sorry for the noobish question, but what kind of subscripts generate a >>> SCEVCouldNotCompute from the SCEV engine? >>> I tried for a while but I wasn't able to trigger that >>
2011 Nov 21
2
[LLVMdev] How to make Polly ignore some non-affine memory accesses
Sorry for the noobish question, but what kind of subscripts generate a SCEVCouldNotCompute from the SCEV engine? I tried for a while but I wasn't able to trigger that. 2011/11/20 Tobias Grosser <tobias at grosser.es>: > On 11/20/2011 03:01 AM, Marcello Maggioni wrote: >> >> 2011/11/19 Tobias Grosser<tobias at grosser.es>: >>> >>> On 11/18/2011
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()); //
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
2008 Aug 11
2
[LLVMdev] Applying different Optimizations for different Functions - Questions?
Hi! I am trying to develop an LLVM tool which can apply different optimizations for selected functions. For example, I want to apply an optimization onto one function but not for another one. I am using the standard optimizations available in LLVM. That is the runOnModule function I have written: bool ComplNewBBFuncs::runOnModule(Module &M) { Function *Main =
2009 Feb 28
1
[LLVMdev] SCEVCouldNotCompute
On Friday 27 February 2009 00:50, Nick Lewycky wrote: > David Greene wrote: > > We've upgraded to llvm 2.4 and we're hitting an assert in SCEV: > > > > llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h:669: RetVal > > llvm::SCEVVisitor<SC, > > RetVal>::visitCouldNotCompute(llvm::SCEVCouldNotCompute*) [with SC = > > llvm::SCEVExpander,
2009 Feb 27
0
[LLVMdev] SCEVCouldNotCompute
David Greene wrote: > We've upgraded to llvm 2.4 and we're hitting an assert in SCEV: > > llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h:669: RetVal > llvm::SCEVVisitor<SC, > RetVal>::visitCouldNotCompute(llvm::SCEVCouldNotCompute*) [with SC = > llvm::SCEVExpander, RetVal = llvm::Value*]: Assertion `0 && "Invalid use of >
2011 Nov 03
0
[LLVMdev] How to make Polly ignore some non-affine memory accesses
On 11/02/2011 11:17 AM, Marcello Maggioni wrote: > Mmm I found out a very strange behavior (to me) of the SCEV analysis > of the loop bound of the external loop I posted. > When in ScopDetection it gets the SCEV of the external loop bound in > the "isValidLoop()" function with: > const SCEV *LoopCount = SE->getBackedgeTakenCount(L); > > It returns a
2009 Feb 26
2
[LLVMdev] SCEVCouldNotCompute
We've upgraded to llvm 2.4 and we're hitting an assert in SCEV: llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h:669: RetVal llvm::SCEVVisitor<SC, RetVal>::visitCouldNotCompute(llvm::SCEVCouldNotCompute*) [with SC = llvm::SCEVExpander, RetVal = llvm::Value*]: Assertion `0 && "Invalid use of SCEVCouldNotCompute!"' failed. This happens in
2019 May 13
2
Is it possible to reproduce the result of opt -O3 manually?
I think this has to do with how the pass manager is populated when we give -O3 vs when we give particular pass names. Some passes have multiple createXYZPass() methods that accept arguments too. These methods call non-default pass constructors, which in turn cause the passes to behave in a different manner. eg: Pass *llvm::createLICMPass() { return new LegacyLICMPass(); } Pass