Displaying 20 results from an estimated 169 matches for "exitcond".
2015 Aug 20
2
loop unrolling introduces conditional branch
...%indvars.iv = phi i64 [ %indvars.iv.next.2, %7 ], [ 0, %0 ]*
* %2 = getelementptr inbounds i32* %array_x, i64 %indvars.iv*
* %3 = trunc i64 %indvars.iv to i32*
* store i32 %3, i32* %2*
* %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1*
* %lftr.wideiv = trunc i64 %indvars.iv.next to i32*
* %exitcond = icmp ne i32 %lftr.wideiv, %n*
* br i1 %exitcond, label %4, label %._crit_edge*
*._crit_edge: ; preds = %.lr.ph
<http://lr.ph/>, %4, %7, %0*
* ret void*
*; <label>:4 ; preds = %.lr.ph
<http://lr.ph/>*...
2009 Oct 13
0
[LLVMdev] Detecting reduction operations
...e. For example:
bb:
%indvar = phi i64 [ 0, %bb.nph ], [ %indvar.next, %bb ]
%sum = phi i32 [ 0, %bb.nph ], [ %3, %bb ]
%1 = getelementptr i32* %X, i64 %indvar
%2 = load i32* %1, align 4
%3 = add i32 %2, %sum
%indvar.next = add i64 %indvar, 1
%exitcond = icmp eq i64 %indvar.next, %tmp.
br i1 %exitcond, label %bb2, label %bb
I would like to recognize that there is circular dependence (true and
anti-) between %3 and %sum and that the only operations that form this
dependence are associative+commutative (e.g. addition). In this
example, we...
2009 Oct 12
3
[LLVMdev] Detecting reduction operations
On Oct 12, 2009, at 4:01 PM, Scott Ricketts wrote:
> To be more specific, it would be helpful to have some utilities for
> finding dependencies (true, output, and anti-). Where is a good place
> to start for this kind of analysis?
Hi Scott,
Do you mean loop carried dependencies? There is some initial work on
dependence analysis, but it is still pretty young. We also have
support
2015 Aug 20
2
loop unrolling introduces conditional branch
...ars.iv.next.2, %7 ], [ 0, %0 ]*
> * %2 = getelementptr inbounds i32* %array_x, i64 %indvars.iv*
> * %3 = trunc i64 %indvars.iv to i32*
> * store i32 %3, i32* %2*
> * %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1*
> * %lftr.wideiv = trunc i64 %indvars.iv.next to i32*
> * %exitcond = icmp ne i32 %lftr.wideiv, %n*
> * br i1 %exitcond, label %4, label %._crit_edge*
>
> *._crit_edge: ; preds = %.lr.ph
> <http://lr.ph/>, %4, %7, %0*
> * ret void*
>
> *; <label>:4 ; preds...
2015 Dec 09
2
persuading licm to do the right thing
...i64 [ 0, %for.body.lr.ph ], [ %inc, %for.body ]
%sum.05 = phi double [ 0.000000e+00, %for.body.lr.ph ], [ %add, %for.body
]
%arrayidx = getelementptr inbounds double* %0, i64 %i.06
%1 = load double* %arrayidx, align 8, !tbaa !5
%add = fadd double %sum.05, %1
%inc = add nsw i64 %i.06, 1
%exitcond = icmp eq i64 %inc, %n
br i1 %exitcond, label %for.end, label %for.body
for.end: ; preds = %for.body,
%entry
%sum.0.lcssa = phi double [ 0.000000e+00, %entry ], [ %add, %for.body ]
ret double %sum.0.lcssa
}
and the second looks like
double v[10000]...
2015 Dec 09
2
persuading licm to do the right thing
...or.body ]
> %sum.05 = phi double [ 0.000000e+00, %for.body.lr.ph ], [ %add,
> %for.body ]
> %arrayidx = getelementptr inbounds double* %0, i64 %i.06
> %1 = load double* %arrayidx, align 8, !tbaa !5
> %add = fadd double %sum.05, %1
> %inc = add nsw i64 %i.06, 1
>
> %exitcond = icmp eq i64 %inc, %n
> br i1 %exitcond, label %for.end, label %for.body
>
> for.end: ; preds = %for.body,
> %entry
> %sum.0.lcssa = phi double [ 0.000000e+00, %entry ], [ %add, %for.body ]
> ret double %sum.0.lcssa
> }
>
>...
2015 Aug 21
2
loop unrolling introduces conditional branch
...%2 = getelementptr inbounds i32* %array_x, i64 %indvars.iv*
>>> * %3 = trunc i64 %indvars.iv to i32*
>>> * store i32 %3, i32* %2*
>>> * %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1*
>>> * %lftr.wideiv = trunc i64 %indvars.iv.next to i32*
>>> * %exitcond = icmp ne i32 %lftr.wideiv, %n*
>>> * br i1 %exitcond, label %4, label %._crit_edge*
>>>
>>> *._crit_edge: ; preds = %.lr.ph
>>> <http://lr.ph/>, %4, %7, %0*
>>> * ret void*
>>>
>>> *; <la...
2008 Jul 12
3
[LLVMdev] Little bug in LoopInfo after Rotate?
...phi i32 [ 0, %entry ], [ %i.0.reg2mem.0.ph, %bb1 ],
[ %indvar.next9, %bb3 ] ; <i32> [#uses=4]
%j.0.reg2mem.0 = phi i32 [ 0, %entry ], [ %indvar.next, %bb1 ], [ 0,
%bb3 ] ; <i32> [#uses=3]
%indvar.next = add i32 %j.0.reg2mem.0, 1 ; <i32> [#uses=2]
%exitcond = icmp eq i32 %indvar.next, 16 ; <i1> [#uses=1]
br i1 %exitcond, label %bb3, label %bb1
bb3: ; preds = %bb1
%indvar.next9 = add i32 %i.0.reg2mem.0.ph, 1 ; <i32> [#uses=2]
%exitcond10 = icmp eq i32 %indvar.next9, 32 ; <i1> [#uses=1]
br i...
2015 Dec 09
2
persuading licm to do the right thing
...hi double [ 0.000000e+00, %for.body.lr.ph ], [ %add,
>> %for.body ]
>> %arrayidx = getelementptr inbounds double* %0, i64 %i.06
>> %1 = load double* %arrayidx, align 8, !tbaa !5
>> %add = fadd double %sum.05, %1
>> %inc = add nsw i64 %i.06, 1
>>
>> %exitcond = icmp eq i64 %inc, %n
>> br i1 %exitcond, label %for.end, label %for.body
>>
>> for.end: ; preds = %for.body,
>> %entry
>> %sum.0.lcssa = phi double [ 0.000000e+00, %entry ], [ %add, %for.body ]
>> ret double %sum.0...
2015 Dec 09
2
persuading licm to do the right thing
...or.body.lr.ph ], [ %add,
>>> %for.body ]
>>> %arrayidx = getelementptr inbounds double* %0, i64 %i.06
>>> %1 = load double* %arrayidx, align 8, !tbaa !5
>>> %add = fadd double %sum.05, %1
>>> %inc = add nsw i64 %i.06, 1
>>>
>>> %exitcond = icmp eq i64 %inc, %n
>>> br i1 %exitcond, label %for.end, label %for.body
>>>
>>> for.end: ; preds = %for.body,
>>> %entry
>>> %sum.0.lcssa = phi double [ 0.000000e+00, %entry ], [ %add, %for.body ]
>>...
2014 Aug 21
2
[LLVMdev] Any Optimization Suggestion to Get Rid of AddrSpaceCast around PHI
...dy.lr.ph
%i.03 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %for.body ]
%ptr.02 = phi i32 addrspace(4)* [ %0, %for.body.lr.ph ], [ %add.ptr,
%for.body ]
store i32 %i.03, i32 addrspace(4)* %ptr.02, align 4
%add.ptr = getelementptr inbounds i32 addrspace(4)* %ptr.02, i64 4
%inc = add i32 %i.03, 1
%exitcond = icmp eq i32 %inc, %numElems
br i1 %exitcond, label %for.end, label %for.body
for.end: ; preds = %
Thanks;
Changpeng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140821/a0d9e48b/attachment.html>
2015 Jul 16
2
[LLVMdev] Improving loop vectorizer support for loops with a volatile iteration variable
...> > for.body: ; preds = %for.body.backedge, %for.body.preheader
>
> > %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ % indvars.iv.be
> > ,
> > %for.body.backedge ]
>
> > ...
>
> > %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
>
> > %exitcond = icmp eq i64 %indvars.iv.next, 1600
>
> > br i1 %exitcond, label %while.cond.loopexit, label
> > %for.body.backedge
>
> > for.body.backedge: ; preds = %for.body, %while.cond.loopexit
>
> > % indvars.iv.be = phi i64 [ %indvars.iv.next, %for.body ], [ 0,
> >...
2015 Dec 09
3
persuading licm to do the right thing
...;>>> %for.body ]
>>>> %arrayidx = getelementptr inbounds double* %0, i64 %i.06
>>>> %1 = load double* %arrayidx, align 8, !tbaa !5
>>>> %add = fadd double %sum.05, %1
>>>> %inc = add nsw i64 %i.06, 1
>>>>
>>>> %exitcond = icmp eq i64 %inc, %n
>>>> br i1 %exitcond, label %for.end, label %for.body
>>>>
>>>> for.end: ; preds = %for.body,
>>>> %entry
>>>> %sum.0.lcssa = phi double [ 0.000000e+00, %entry ], [ %add,...
2010 May 29
3
[LLVMdev] Vectorized LLVM IR
...oat* %input_ptr3, align 4
%input_ptr2 = getelementptr float* %input2, i64 %indvar
%fTemp4 = load float* %input_ptr2, align 4
%fTemp5 = fadd float %fTemp4, %fTemp3
%fTemp6 = fmul float %fTemp5, %fTemp2
store float %fTemp6, float* %output_ptr0, align 4
%indvar.next = add i64 %indvar, 1
%exitcond = icmp eq i64 %indvar.next, %count_64
br i1 %exitcond, label %return, label %loop
return:
ret void
}
And the vectorized LLVM code is :
define void @llvm_compute(%struct.llvm_dsp* noalias %obj, i32 %count, <32 x float>** noalias %inputs, <32 x float>** noalias %outputs) nounwind...
2015 Sep 03
2
[RFC] New pass: LoopExitValues
...id
for.cond.cleanup.3: ; preds = %for.body.4
%inc10 = add nuw nsw i32 %Outer.026, 1
%scevgep = getelementptr i1, i1* %lsr.iv12, i32 %0
%1 = bitcast i1* %scevgep to i32*
%scevgep7 = getelementptr i1, i1* %lsr.iv56, i32 %0
%2 = bitcast i1* %scevgep7 to i32*
%exitcond27 = icmp eq i32 %inc10, %Size
br i1 %exitcond27, label %for.cond.cleanup.loopexit, label %for.body.4.lr.ph
for.body.4: ; preds =
%for.body.4, %for.body.4.lr.ph
%lsr.iv8 = phi i32* [ %scevgep9, %for.body.4 ], [ %lsr.iv5,
%for.body.4.lr.ph ]
%lsr.iv3 = phi...
2018 Feb 27
0
Question about instcombine pass.
...[ 1, %entry ], [ %indvars.iv.next, %for.body ]
%mul = mul nsw i32 %store_forwarded, %store_forwarded
%arrayidx5 = getelementptr inbounds [10 x i32], [10 x i32]* @X, i64 0, i64 %indvars.iv
store i32 %mul, i32* %arrayidx5, align 4, !tbaa !2
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
br i1 %exitcond, label %for.end, label %for.body
----------------------------------
(CASE3)
This case is not optimized as I expected.
I expected that instructions about an array 'a' are removed like the CASE2.
----------------------------------
#defin...
2015 Feb 26
6
[LLVMdev] RFC: Loop versioning for LICM
...ntptr inbounds i32* %var1, i64 %indvars.iv.loopVersion
store i32 %add, i32* %arrayidx.loopVersion, align 4, !tbaa !1, !alias.scope !11, !noalias !11
%indvars.iv.next.loopVersion = add nuw nsw i64 %indvars.iv.loopVersion, 1
%lftr.wideiv.loopVersion = trunc i64 %indvars.iv.loopVersion to i32
%exitcond.loopVersion = icmp eq i32 %lftr.wideiv.loopVersion, %0
br i1 %exitcond.loopVersion, label %for.inc11.loopexit38, label %for.body3.loopVersion
<Original Loop>
for.body3: ; preds = %for.body3.lr.ph, %for.body3
%indvars.iv = phi i64 [ %indvars.iv.next,...
2007 Feb 05
1
[LLVMdev] Misc optimization issue
...%entry
%indvar = phi uint [ 0, %entry ], [ %indvar.next, %bb ] ; <uint> [#uses=2]
%i.0.0 = cast uint %indvar to int ; <int> [#uses=1]
%tmp1 = add int %i.0.0, 1 ; <int> [#uses=1]
%indvar.next = add uint %indvar, 1 ; <uint> [#uses=2]
%exitcond = seteq uint %indvar.next, %x ; <bool> [#uses=1]
br bool %exitcond, label %bb7, label %bb
bb7: ; preds = %bb, %entry
%j.0.1 = phi int [ 0, %entry ], [ %tmp1, %bb ] ; <int> [#uses=1]
ret int %j.0.1
}
Aaron
-------------- next part -------...
2010 Apr 21
1
[LLVMdev] determining the number of iteration of a loop
In your example the the number of iterations is known -- it is N. It
is not known at compile time, but it's known at run-time before you
enter the loop. So you can do transforms like if( N < threshold ) copy
of loop optimized for small iterations count; else copy of loop
optimized for large iterations count;
But you are right, in general, the number of iterations in unknown. I
think Khaled
2009 Oct 13
1
[LLVMdev] Detecting reduction operations
...%indvar = phi i64 [ 0, %bb.nph ], [ %indvar.next, %bb ]
> %sum = phi i32 [ 0, %bb.nph ], [ %3, %bb ]
> %1 = getelementptr i32* %X, i64 %indvar
> %2 = load i32* %1, align 4
> %3 = add i32 %2, %sum
> %indvar.next = add i64 %indvar, 1
> %exitcond = icmp eq i64 %indvar.next, %tmp.
> br i1 %exitcond, label %bb2, label %bb
>
> I would like to recognize that there is circular dependence (true and
> anti-) between %3 and %sum and that the only operations that form this
> dependence are associative+commutative (e.g. addition...