llvm-project/llvm/lib/Transforms
Orlando Cazalet-Hyams 1a0f7a2077 [DebugInfo@O2][LoopVectorize] pr39024: Vectorized code linenos step through loop even after completion
Summary:
Bug: https://bugs.llvm.org/show_bug.cgi?id=39024

The bug reports that a vectorized loop is stepped through 4 times and each step through the loop seemed to show a different path. I found two problems here:

A) An incorrect line number on a preheader block (for.body.preheader) instruction causes a step into the loop before it begins.
B) Instructions in the middle block have different line numbers which give the impression of another iteration.

In this patch I give all of the middle block instructions the line number of the scalar loop latch terminator branch. This seems to provide the smoothest debugging experience because the vectorized loops will always end on this line before dropping into the scalar loop. To solve problem A I have altered llvm::SplitBlockPredecessors to accommodate loop header blocks.

I have set up a separate review D61933 for a fix which is required for this patch.

Reviewers: samsonov, vsk, aprantl, probinson, anemet, hfinkel, jmorse

Reviewed By: hfinkel, jmorse

Subscribers: jmorse, javed.absar, eraman, kcc, bjope, jmellorcrummey, hfinkel, gbedwell, hiraditya, zzheng, llvm-commits

Tags: #llvm, #debug-info

Differential Revision: https://reviews.llvm.org/D60831

llvm-svn: 363046
2019-06-11 10:37:20 +00:00
..
AggressiveInstCombine Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Coroutines [coroutines] Fix spills of static array allocas 2019-05-13 23:58:24 +00:00
Hello Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IPO Do not derive no-recurse attribute if function does not have exact definition. 2019-06-10 04:16:04 +00:00
InstCombine [InstCombine] allow unordered preds when canonicalizing to fabs() 2019-06-10 15:39:00 +00:00
Instrumentation [PGO] Fix the buildbot failure in r362995 2019-06-10 23:20:04 +00:00
ObjCARC [ObjC][ARC] Let ARC optimizer bail out if the number of pointer states 2019-04-25 19:42:55 +00:00
Scalar [LFTR] Use recomputed BE count 2019-06-10 19:18:53 +00:00
Utils [DebugInfo@O2][LoopVectorize] pr39024: Vectorized code linenos step through loop even after completion 2019-06-11 10:37:20 +00:00
Vectorize [DebugInfo@O2][LoopVectorize] pr39024: Vectorized code linenos step through loop even after completion 2019-06-11 10:37:20 +00:00
CMakeLists.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00