Displaying 7 results from an estimated 7 matches for "isinductionvariable".
Did you mean:
inductionvariable
2013 Feb 19
1
[LLVMdev] Auto-vectorization and phi nodes
...a loop: Loop
> LV: Found an induction variable.
> LV: Found an unidentified PHI. %a.ptr = phi float* [ %a, %Top ], [ %a.next, %Loop ]
> LV: Can't vectorize the instructions or CFG
> LV: Not vectorizing.
>
Yes. SCEV does not identify this PHI. You can add a breakpoint in "isInductionVariable" to verify this. How are you generating this code ? Do you have a C example for it ?
Thanks,
Nadav
2013 Oct 23
2
[LLVMdev] First attempt at recognizing pointer reduction
...(we are storing/loading from the pointer).
>
Hi Arnold, Nadav,
Let me resurrect this discussion a bit.
There are few things that I need to check while validating a stride access
loop:
1. If there is an induction variable, and it has stride > 1. This is easy,
and can be easily extended on isInductionVariable() by adding Step
to InductionInfo;
2. If the reduction variables' access are sequential and compatible with
the stride. This is the core of the change, and will require SCEV
computation, as extensively described by Arnold.
3. If the reduction variable has any use outside of the loop. This wil...
2013 Feb 19
0
[LLVMdev] Auto-vectorization and phi nodes
Hi Nadav and Hal and thanks for the help!
To the best of my understanding, indvars doesn't complain and an
induction variable is detected. However, the loop vectorizer says:
LV: Checking a loop in "add_vector"
LV: Found a loop: Loop
LV: Found an induction variable.
LV: Found an unidentified PHI. %a.ptr = phi float* [ %a, %Top ], [
%a.next, %Loop ]
LV: Can't vectorize the
2013 Oct 23
0
[LLVMdev] First attempt at recognizing pointer reduction
...the pointer).
>
> Hi Arnold, Nadav,
>
> Let me resurrect this discussion a bit.
>
> There are few things that I need to check while validating a stride access loop:
> 1. If there is an induction variable, and it has stride > 1. This is easy, and can be easily extended on isInductionVariable() by adding Step to InductionInfo;
Yes.
> 2. If the reduction variables' access are sequential and compatible with the stride. This is the core of the change, and will require SCEV computation, as extensively described by Arnold.
> 3. If the reduction variable has any use outside of t...
2013 Feb 19
2
[LLVMdev] Auto-vectorization and phi nodes
Hi Vesa,
The pass IndVars changes the induction variables to allow SCEV to analyze them and enable other optimizations. This is the canonicalization phase. Later on, LSR lowers the canonicalized induction variables to induction variables that map nicely to the target's addressing modes. In many cases it can remove some of the induction variables.
I suspect that the loop vectorizer does
2013 Oct 21
0
[LLVMdev] First attempt at recognizing pointer reduction
Renato,
can you post a hand-created vectorized IR of how a reduction would work on your example?
I don’t think that recognizing this as a reduction is going to get you far. A reduction is beneficial if the value reduced is only truly needed outside of a loop.
This is not the case here (we are storing/loading from the pointer).
Your example is something like
WRITEPTR = phi i8* [ outsideval,
2013 Oct 21
5
[LLVMdev] First attempt at recognizing pointer reduction
Hi Nadav, Arnold,
I managed to find some time to work on the pointer reduction, and I got a
patch that can make "canVectorize()" pass.
Basically what I do is to teach AddReductionVar() about pointers, saying
they don't really have an exit instructions, and that (maybe) the final
store is a good candidate (is it?).
This makes it recognize the writes and reads, but then