Displaying 4 results from an estimated 4 matches for "isknownpositive".
2016 Jun 30
1
Regarding ScalarEvolution's loop backedge computation
Hi Pankaj,
Chawla, Pankaj via llvm-dev wrote:
> It looks like ScalarEvolution bails out of loop backedge computation if
> it cannot prove the IV stride as either positive or negative (based on
> loop control condition). I think this logic can be refined for signed
IVs.
>
> Consider this simple loop-
>
> void foo(int *A, int n, int s) {
>
> int i;
>
>
2012 Nov 16
1
[LLVMdev] ScalarEvolution, HowManyLessThans question for step > 1
...stion about some code in ScalarEvolution.cpp, in the function
HowManyLessThans. Specifically, this function returns CouldNotCompute if
the iteration step is greater than one even when the NoWrap flags are set
(if the step goes past the limit and wraps). Here's the comment:
} else if (isKnownPositive(Step)) {
// Test whether a positive iteration can step past the limit
// value and past the maximum value for its type in a single step.
// Note that it's not sufficient to check NoWrap here, because even
// though the value after a wrap is undefined, it's not un...
2016 Jun 29
3
Regarding ScalarEvolution's loop backedge computation
Hi,
It looks like ScalarEvolution bails out of loop backedge computation if it cannot prove the IV stride as either positive or negative (based on loop control condition). I think this logic can be refined for signed IVs.
Consider this simple loop-
void foo(int *A, int n, int s) {
int i;
for(i=0; i<n; i += s) {
A[i]++;
}
}
The IV of this loop has this SCEV form-
2015 Jan 15
4
[LLVMdev] confusion w.r.t. scalar evolution and nuw
I've been doing some digging in this area (scev, wrapping arithmetic),
learning as much as I can, and have reached a point where I'm fairly
confused about the semantics of nuw in scalar evolution expressions.
Consider the following program:
define void @foo(i32 %begin) {
entry:
br label %loop
loop:
%idx = phi i32 [ %begin, %entry ], [ %idx.dec, %loop ]
%idx.dec = sub nuw i32