[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 14:09:15 PDT 2018


hsaito added a comment.

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

> > 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.
>
> I see. This is not directly representable in debug info. You could either introduce a new artificial $X_vectorized variable that shows the entire vector, or you could represent only the first element in the vector and hide the other unrolled iterations. DWARF cannot currently represent more than one value per variable per pc address.


That matches my understanding. My preference is artificial $X_vectorized approach, but I'm also fine using "only the first element" as a stepping stone to eventually get to $X_vectorized approach.

It goes without saying ---- but if we can work together to extend DWARF to represent multiple values, that would be the best long term outcome.


https://reviews.llvm.org/D44338





More information about the llvm-commits mailing list