llvm-project/llvm
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
..
benchmarks
bindings [bindings/go] Add wrappers for atomic operations. 2019-06-09 10:06:35 +00:00
cmake Build with _XOPEN_SOURCE defined on AIX 2019-06-07 15:45:25 +00:00
docs [llvm-dwarfdump] Add -o to help text and remove --out-file from doc 2019-06-11 10:20:07 +00:00
examples Add a HowToUseLLJIT example project. 2019-05-22 21:38:41 +00:00
include [ARM] Add the non-MVE instructions in Arm v8.1-M. 2019-06-11 09:29:18 +00:00
lib [DebugInfo@O2][LoopVectorize] pr39024: Vectorized code linenos step through loop even after completion 2019-06-11 10:37:20 +00:00
projects
resources
runtimes Setup testing target dependencies for default runtimes 2019-06-11 00:25:57 +00:00
test [DebugInfo@O2][LoopVectorize] pr39024: Vectorized code linenos step through loop even after completion 2019-06-11 10:37:20 +00:00
tools [llvm-dwarfdump] Add -o to help text and remove --out-file from doc 2019-06-11 10:20:07 +00:00
unittests Revert CMake: Make most target symbols hidden by default 2019-06-11 03:21:13 +00:00
utils Revert CMake: Make most target symbols hidden by default 2019-06-11 03:21:13 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Build with _XOPEN_SOURCE defined on AIX 2019-06-07 15:45:25 +00:00
CODE_OWNERS.TXT
CREDITS.TXT [test commit] Add my name to the CREDITS.TXT 2019-05-27 07:48:28 +00:00
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.