similar to: [LLVMdev] how to let loop induction variable count down

Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] how to let loop induction variable count down"

2011 Jan 20
0
[LLVMdev] induction variable computation not preserving scev
On Jan 19, 2011, at 2:03 PM, Nick Lewycky wrote: > On 19 January 2011 13:01, Dan Gohman <gohman at apple.com> wrote: > > On Jan 18, 2011, at 12:32 AM, Nick Lewycky wrote: > > > Hi, > > > > I tracked down a bug in indvars where we weren't updating SCEV properly. The attached patch shows the fix to this bug with a testcase, but it also causes five new test
2011 Jan 20
1
[LLVMdev] induction variable computation not preserving scev
On 20 January 2011 11:23, Dan Gohman <gohman at apple.com> wrote: > > On Jan 19, 2011, at 2:03 PM, Nick Lewycky wrote: > > > On 19 January 2011 13:01, Dan Gohman <gohman at apple.com> wrote: > > > > On Jan 18, 2011, at 12:32 AM, Nick Lewycky wrote: > > > > > Hi, > > > > > > I tracked down a bug in indvars where we weren't
2011 Jan 19
2
[LLVMdev] induction variable computation not preserving scev
On 19 January 2011 13:01, Dan Gohman <gohman at apple.com> wrote: > > On Jan 18, 2011, at 12:32 AM, Nick Lewycky wrote: > > > Hi, > > > > I tracked down a bug in indvars where we weren't updating SCEV properly. > The attached patch shows the fix to this bug with a testcase, but it also > causes five new test failures. > > Indvars isn't
2017 Jul 01
2
loop induction variables at IR level
Hi, I was looking at trying to get loop induction variable at IR level. LLVM documentation mentioned indvars pass and getCanonicalInductionVariable() to get them, I tried running the indvars pass and then a custom pass which iterates through loops and uses the function to obtain variable for a simple loop program. But the API returns null. I also read in similar posts that the indvars pass is not
2011 Jan 19
0
[LLVMdev] induction variable computation not preserving scev
On Jan 18, 2011, at 12:32 AM, Nick Lewycky wrote: > Hi, > > I tracked down a bug in indvars where we weren't updating SCEV properly. The attached patch shows the fix to this bug with a testcase, but it also causes five new test failures. Indvars isn't restructuring the loop there, so it ideally shouldn't need to call forgetLoop(). Offhand, is it possible that the problem
2011 Jan 18
2
[LLVMdev] induction variable computation not preserving scev
Hi, I tracked down a bug in indvars where we weren't updating SCEV properly. The attached patch shows the fix to this bug with a testcase, but it also causes five new test failures. Would someone be willing to take a look at the failures and figure out why we're getting worse output once this patch is applied? If I had to hazard a guess, I'd say that indvars is probably emitting code
2017 Apr 14
3
Question on induction variable simplification pass
Hi Sanjoy, I have attached the IR I got by compiling with -O2. This is just before we widen the IV. To get the backedge taken count info I ran indvars on it and then replaced zext with sext. I think regardless of where we decide to add this transformation in the pipeline, it should try to preserve as much information as it can. This means that we should generate sext for signed IVs and
2017 Apr 17
2
Question on induction variable simplification pass
Hi Pankaj, On April 14, 2017 at 4:55:16 PM, Chawla, Pankaj (pankaj.chawla at intel.com) wrote: > I have attached the IR I got by compiling with -O2. This is just before we widen the IV. Thanks! > To get the backedge taken count info I ran indvars on it and then replaced zext with sext. > > I think regardless of where we decide to add this transformation in the pipeline, it should
2011 Oct 28
0
[LLVMdev] Induction variables and partial unrolling
Currently, when a loop with loads or stores is partially unrolled, the generated code ends up looking like: for.body74: ; preds = %for.body74, %for.cond71.preheader %indvars.iv = phi i64 [ 0, %for.cond71.preheader ], [ % indvars.iv.next.9, %for.body74 ] ... %indvars.iv.next.1 = add i64 %indvars.iv, 2 %arrayidx78.2 = getelementptr inbounds [200 x [200 x
2012 Jan 16
0
[LLVMdev] Opt pass 'Canonicalize Induction Variables' not working
On 01/16/2012 01:19 PM, Pieter Custers wrote: > I am new to LLVM and I've a question about the optimization passes and > in particular about the loop transformation passes. I've setup the LLVM > tool-chain with Polly installed. > > The following example is causing problems with me: > http://llvm.org/docs/Passes.html#indvars > > The input is a .c file with the
2016 Aug 25
4
Canonicalize induction variables
But even for a very simple loop: int test1 (int *x, int *y, int *z, int k) { int sum = 0; for (int i = 10; i < k; i++) { z[i] = x[i] / y[i]; } return sum; } The initial value of induction variable is not zero after compiling with -O3 -mcpu=power8 x.cpp -S -c -emit-llvm -fno-unroll-loops (see bottom of the email for IR) Also I can write somewhat more complicated loop where step
2012 Jan 16
2
[LLVMdev] Opt pass 'Canonicalize Induction Variables' not working
I am new to LLVM and I've a question about the optimization passes and in particular about the loop transformation passes. I've setup the LLVM tool-chain with Polly installed. The following example is causing problems with me: http://llvm.org/docs/Passes.html#indvars The input is a .c file with the following loops: # 01 Standard, N=100 for (i=0; i<N; i++) b[i] = a[i] + 5; # 02
2017 Apr 13
3
Question on induction variable simplification pass
Hi all, It looks like the induction variable simplification pass prefers doing a zero-extension to compute the wider trip count of loops when extending the IV. This can sometimes result in loss of information making ScalarEvolution's analysis conservative which can lead to missed performance opportunities. For example, consider this loopnest- int i, j; for(i=0; i< 40; i++) for(j=0;
2012 Jan 16
2
[LLVMdev] Opt pass 'Canonicalize Induction Variables' not working
Hello Tobi, Thank you for the quick reply. I updated my complete build suite with your script (http://polly.grosser.es/polly.sh). The make-test fails with some errors, the rest went smoothly; -- Exit Code: 1 Command Output (stderr): -- LLVM ERROR: Could not resolve external global address: stdout -- ******************** Testing Time: 10.01s ******************** Failing Tests (3): Polly ::
2004 Apr 01
1
[LLVMdev] A question about induction variables
Chris Lattner wrote: > > int main() > > { > > int r(0); > > for (int i = 0; i < 100; ++i) > > r += i; > > ; > > return r; > > } > > When I compiled it, I got the following LLVM code: The code I get is somewhat different: int %main() { entry: %tmp.1.i = load bool* %Initialized.0__ ; <bool> [#uses=1] br
2004 Mar 31
0
[LLVMdev] A question about induction variables
On Wed, 31 Mar 2004, Vladimir Prus wrote: > I've just downloaded the latest release of LLVM, and playing with the > following simple example: > > int main() > { > int r(0); > for (int i = 0; i < 100; ++i) > r += i; > ; > return r; > } When I compiled it, I got the following LLVM code: int %main() { entry: call void %__main( )
2003 Sep 09
0
[LLVMdev] induction variables
> Can you suggest a good way to use the loops and induction variable > passes to map loop exiting BasicBlocks to InductionVariables. That is, > can we use these tools to identify the loop condition. I can try. :) It looks like you're running into problems because we don't perform "Linear Function Test Replacement". This optimization would reduce the amount of code
2008 Apr 26
2
[LLVMdev] Getting the trip count of a loop
Hi, I am trying to add a new loop pass in which I making a call to get the trip count of the loop using Value *TripCountValue = L->getTripCount() However I am always getting NULL for TripCountValue (confirmed through gdb). I am running this pass after the canonicalization of induction variables: opt --debug-pass=Structure -stats -indvars -loop-rotate -my-loop-pass < main.bc >
2004 Mar 31
2
[LLVMdev] A question about induction variables
Hello, I've just downloaded the latest release of LLVM, and playing with the following simple example: int main() { int r(0); for (int i = 0; i < 100; ++i) r += i; ; return r; } I compile it and then run: analyze -indvars x.bc which prints: Printing analysis 'Induction Variable Analysis' for function 'main': and nothing else. It is a
2014 Jan 16
3
[LLVMdev] Loop unrolling opportunity in SPEC's libquantum with profile info
On Wed, Jan 15, 2014 at 5:30 PM, Nadav Rotem <nrotem at apple.com> wrote: > Was the vectorizer successful in unrolling the loop in quantum_sigma_x? I > wonder if 'size’ is typically high or low. No. The vectorizer stated that it wasn't going to bother with the loop because it wasn't profitable. Specifically: LV: Checking a loop in "quantum_sigma_x" LV: Found a