diff options
author | Tobias Grosser <tobias@grosser.es> | 2017-03-07 16:17:55 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2017-03-07 16:17:55 +0000 |
commit | ce69e7b593c14a7eeaf89eade09482f087d68302 (patch) | |
tree | 8978f457d1fbb22dd32b168dfccd8b28ecfbf81a /lldb/packages/Python/lldbsuite/test/python_api/interpreter/main.c | |
parent | defdb7bed5fcb97066cf7a5835e14657404b2fe5 (diff) | |
download | bcm5719-llvm-ce69e7b593c14a7eeaf89eade09482f087d68302.tar.gz bcm5719-llvm-ce69e7b593c14a7eeaf89eade09482f087d68302.zip |
[ScopInfo] Avoid infinite loop during schedule construction
Our current scop modeling enters an infinite loop when trying to model code
that has unreachable instructions (e.g.,
test/ScopInfo/BoundChecks/single-loop.ll), as the number of basic blocks
returned by the LLVM Loop* does not include unreachable basic blocks that
branch off from the core loop body. This arises for example in the following
piece of code:
for (i = 0; i < N; i++) {
if (i > 1024)
abort(); <- this abort might be translated to an
unreachable
A[i] = ...
}
This patch adds these unreachable basic blocks in our per loop basic block
count to ensure that the schedule construction does not assume a loop has been
processed completely, despite certain unreachable basic blocks still remaining.
The infinite loop is only observable in combination with
https://reviews.llvm.org/D12676 or a similar patch.
llvm-svn: 297156
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/interpreter/main.c')
0 files changed, 0 insertions, 0 deletions