[PATCH] D44338: [LV][VPlan] Build plain CFG with simple VPInstructions for outer loops.

Hideki Saito via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 11 13:08:34 PDT 2018


hsaito added a comment.

In https://reviews.llvm.org/D44338#1096041, @aprantl wrote:

> In https://reviews.llvm.org/D44338#1094746, @hsaito wrote:
>
> > In https://reviews.llvm.org/D44338#1094601, @aprantl wrote:
> >
> > > Can you outline what would make updating dbg.value intrinsics to point to vector instructions special, such that it can't be handled immediately?
> >
> >
> > I keep pushing the implementers (Diego, Satish, etc.) very hard to maintain good correspondence between input IR and output IR. Assuming that dbg.value can handle widened values from scalar values, there shouldn't be anything special.
>
>
> Assuming widening means putting a smaller value into a larger register at offset 0, then it is safe to just point the dbg.value to the new larger register. If the offset is nonzero, you'll need to generate a DW_OP_shr DIExpression to shift the value into place in the debugger.


Vectorized loop by nature executes multiple iterations of the sequential loop at the same time. So, the same variable X (say, i32 type) is widened to widenedX (4 x i32 type) to represent 4 different values of X, say, for iterations i, i+1, i+2, and i+3 executing together. In terms of debugging vectorized code, when the programmer points to X during vector execution, debugger needs to show 4 different values of X in this scenario. It's different from placing one value in a larger sized register.


https://reviews.llvm.org/D44338





More information about the llvm-commits mailing list