Displaying 20 results from an estimated 762 matches for "induction".
2010 Oct 29
2
[LLVMdev] Landing my new development on the trunk ...
...to be run after it for cleanup. Also -licm,
-reassociate, -gvn
> >> > and -sccp can be enabling optimizations for OSR.
> >>
> >> Hmm... perhaps that could be partially fixed using the InstSimplify
> >> infrastructure.
> >
> > OSR can produce induction variables that are not used.
-instcombine finds the
> > unused induction variables and deletes them (which is super cool
btw :)). I am
> > unsure if InstructionSimplify can fix that.
>
> Oh... no, you would need instcombine for that. However, how hard
> would it be to...
2013 Feb 04
6
[LLVMdev] Vectorizer using Instruction, not opcodes
...ody, %
vector.ph
%index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%broadcast.splatinsert = insertelement <4 x i32> undef, i32 %index, i32 0
%broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x
i32> undef, <4 x i32> zeroinitializer
%induction = add <4 x i32> %broadcast.splat, <i32 0, i32 1, i32 2, i32 3>
%0 = extractelement <4 x i32> %induction, i32 0
%1 = getelementptr inbounds [256 x i32]* %b, i32 0, i32 %0
%2 = insertelement <4 x i32*> undef, i32* %1, i32 0
%3 = extractelement <4 x i32> %inductio...
2004 Mar 31
2
[LLVMdev] A question about induction variables
...9;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 bit strange -- since 'i' is clearly an induction
variable and the resulting loop in assembler should have some induction
variable too. Does this mean that induction variable analysis is not fully
implemented,...
2003 Sep 09
2
[LLVMdev] induction variables
Hello LLVM,
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.
What i have tried
Function Pass:
foreach BB
if(terminal is loop exit of containing loop)
trace back to instruction producing the cond that the...
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 optimiza...
2013 Feb 04
0
[LLVMdev] Vectorizer using Instruction, not opcodes
Hi all,
My take on this is that, as you state below, at the IR level we are only roughly estimating cost, at best (or we would have to lower the code and then estimate cost - something we don't want to do).
I would propose for estimating the "worst case costs" and see how far we get with this. My rational here is that we don't want vectorization to decrease performance relative
2011 Mar 13
7
[LLVMdev] IndVarSimplify too aggressive ?
Hi all,
The IndVarSimplify pass seems to be too aggressive when it enlarge the induction variable type ; this can pessimize the generated code when the new induction variable size is not natively supported by the target. This is probably not an issue for x86_64, which supports natively all types, but it is a real one for several embedded targets, with very few native types.
I attached...
2004 Mar 31
0
[LLVMdev] A question about induction variables
...i.0.0, 1 ; <int> [#uses=2]
%tmp.1 = setgt int %inc, 99 ; <bool> [#uses=1]
br bool %tmp.1, label %loopexit, label %no_exit
loopexit: ; preds = %no_exit
ret int %tmp.4
}
> I compile it and then run:
> analyze -indvars x.bc
> which prints:
> Printing analysis 'Induction Variable Analysis' for function 'main':
When I did this, I got the following:
$ analyze -indvars t.ll
Printing analysis 'Induction Variable Analysis' for function 'main':
Canonical Induction Variable: int %i.0.0:
%i.0.0 = phi int [ 0, %entry ], [ %inc, %no_exit...
2017 Dec 01
2
Using Scalar Evolution to Identify Expressions Evolving in terms of Loop induction variables
Hi,
I am using Scalar Evolution to extract access expressions (for load and store instructions) in terms of the loop induction variables.
I observe that the Scalar Evolution analysis is returning more expressions than I expect - including ones that are not defined
in terms of the loop induction variable. For instance in the following code:
for(unsigned long int bid = 0; bid < no_of_queries; bid++){
unsigned long...
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 size is a
constant > 1, and the conditions are so that IV will not overflow:
int test2 (int *x, int *y...
2013 Feb 04
0
[LLVMdev] Vectorizer using Instruction, not opcodes
...index = phi i32 [ 0, % vector.ph ], [ %index.next, %vector.body ]
> %broadcast.splatinsert = insertelement <4 x i32> undef, i32 %index,
> i32 0
> %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4
> x i32> undef, <4 x i32> zeroinitializer
> %induction = add <4 x i32> %broadcast.splat, <i32 0, i32 1, i32 2,
> i32 3>
> %0 = extractelement <4 x i32> %induction, i32 0
> %1 = getelementptr inbounds [256 x i32]* %b, i32 0, i32 %0
> %2 = insertelement <4 x i32*> undef, i32* %1, i32 0
> %3 = extractelement <4 x...
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...
2016 May 16
4
Working on FP SCEV Analysis
Hi,
I'm working now on extending SCEV Analysis and adding FP support.
At the beginning, I want to vectorize this loop:
float fp_inc;
float x = init;
for (int i=0;i<N;i++){
A[i] = x;
x += fp_inc; // Loop invariant variable or constant
}
In this loop "x" is a FP induction variable. But it is not the "primary" induction and loop trip count is still depends on integer induction "i".
In the future, I plan to work on "primary" FP inductions.
Intel compiler vectorizes FP-induction loops, GCC does not.
I wanted to hear that community does n...
2013 Feb 04
2
[LLVMdev] Vectorizer using Instruction, not opcodes
Hi folks,
I've been thinking on how to implement some of the costs and there is a lot
of instructions which cost depend on other instructions around. Casts are
one obvious case, since arithmetic and memory instructions can, sometimes,
cast values for free.
The cost model receives Opcodes, which lose the info on the history of the
values being vectorized, and I thought we could pass the whole
2013 Feb 04
0
[LLVMdev] Vectorizer using Instruction, not opcodes
...; %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
> %broadcast.splatinsert = insertelement <4 x i32> undef, i32 %index, i32 0
> %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> undef, <4 x i32> zeroinitializer
> %induction = add <4 x i32> %broadcast.splat, <i32 0, i32 1, i32 2, i32 3>
> %0 = extractelement <4 x i32> %induction, i32 0
> %1 = getelementptr inbounds [256 x i32]* %b, i32 0, i32 %0
> %2 = insertelement <4 x i32*> undef, i32* %1, i32 0
> %3 = extractelement <4...
2014 Apr 22
2
[LLVMdev] SCEV and induction variable identification
Hi Fellows,
The goal is to find the induction variable for a loop, where the
induction variable increments with the multiplication, division or shift
operations, like this one:
sz = 8;
do {
... ...
sz = sz / 2;
} while (sz)
Is SCEV capable of detecting the induction variable 'sz' in this case?
The code snippet I am using t...
2017 Aug 09
4
ind variable
This support was removed years ago from indvars. We don't need canonical
induction variables any more as all analysis are done on SCEVs. The SCEV
generator can transform them even without the need for explicit
canonical induction variables.
Best,
Tobias
On Wed, Aug 9, 2017, at 14:23, Anastasiya Ruzhanskaya via llvm-dev
wrote:
> The files of this strange pass are described he...
2010 Oct 29
0
[LLVMdev] Landing my new development on the trunk ...
...cm,
>> >> > -reassociate, -gvn
>> >> > and -sccp can be enabling optimizations for OSR.
>> >>
>> >> Hmm... perhaps that could be partially fixed using the InstSimplify
>> >> infrastructure.
>> >
>> > OSR can produce induction variables that are not used. -instcombine
>> > finds the
>> > unused induction variables and deletes them (which is super cool btw
>> > :)). I am
>> > unsure if InstructionSimplify can fix that.
>>
>> Oh... no, you would need instcombine for that. ...
2017 Dec 01
0
Using Scalar Evolution to Identify Expressions Evolving in terms of Loop induction variables
...t
loop i.e. [computable/variant/invariant].
Thanks
On Fri, Dec 1, 2017 at 10:20 AM, Sharif, Hashim via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
>
> Hi,
>
> I am using Scalar Evolution to extract access expressions (for load and
> store instructions) in terms of the loop induction variables.
> I observe that the Scalar Evolution analysis is returning more expressions
> than I expect - including ones that are not defined
> in terms of the loop induction variable. For instance in the following
> code:
>
>
> for(unsigned long int bid = 0; bid < no_of_que...
2004 Apr 01
1
[LLVMdev] A question about induction variables
...nt %inc, 99 ; <bool> [#uses=1]
br bool %tmp.1, label %loopexit, label %no_exit
loopexit: ; preds = %no_exit
ret int %tmp.4
}
but still there's a loop.
> > I compile it and then run:
> > analyze -indvars x.bc
> > which prints:
> > Printing analysis 'Induction Variable Analysis' for function 'main':
>
> When I did this, I got the following:
>
> $ analyze -indvars t.ll
> Printing analysis 'Induction Variable Analysis' for function 'main':
> Canonical Induction Variable: int %i.0.0:
> %i.0.0 = phi in...