[PATCH] D90418: [debuginfo] Vectorizing a loop doesn't terminate all vectorized variable locations

Chris Jackson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 29 12:51:07 PDT 2020


chrisjackson created this revision.
chrisjackson added reviewers: aprantl, rnk, Orlando, TWeaver, StephenTozer, jmorse, dblaikie.
chrisjackson added a project: debug-info.
Herald added subscribers: llvm-commits, ormris, hiraditya.
Herald added a project: LLVM.
chrisjackson requested review of this revision.

This is an initial fix for BZ39018 <https://bugs.llvm.org/show_bug.cgi?id=39018>. The source file loop induction variable and its debug users and set to undef to prevent misleading values being presented. This is the simple 'don't mislead the user' fix, but there are possible improvements.

I intend to expand this work so that rather than permanently setting the original induction variable to 'undef', its value will reflect the the value for the vectorzied loops. For example, if a single iteration of the vectorized loop has width 4, compared to the previous 1, then the induction variable should increase in value by '4' per iteration.

There is some additional complexity as the vectorizer may use vector instructions of varying width to 'fit' the maximum iterations defined in the original source.


https://reviews.llvm.org/D90418

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/DebugInfo/pr39018.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90418.301712.patch
Type: text/x-patch
Size: 11225 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201029/c1b866d3/attachment.bin>


More information about the llvm-commits mailing list