llvm-capstone/polly
Tobias Grosser ce69e7b593 [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
2017-03-07 16:17:55 +00:00
..
cmake [Cmake] Optionally use a system isl version. 2017-02-27 17:54:25 +00:00
docs Porting the example illustrating Polly from HTML to reStructuredText 2017-02-10 11:46:57 +00:00
include/polly [ScopDetection] Do not detect scops that exit to an unreachable 2017-03-07 15:50:43 +00:00
lib [ScopInfo] Avoid infinite loop during schedule construction 2017-03-07 16:17:55 +00:00
test [ScopDetection] Do not detect scops that exit to an unreachable 2017-03-07 15:50:43 +00:00
tools GPURuntime: ensure compilation with C99 2016-09-11 07:32:50 +00:00
unittests [Support] Remove NonowningIslPtr. NFC. 2017-02-23 17:57:27 +00:00
utils
www Porting the example illustrating Polly from HTML to reStructuredText 2017-02-10 11:46:57 +00:00
.arcconfig Upgrade all the .arcconfigs to https. 2016-07-14 13:15:37 +00:00
.arclint [External] Move lib/JSON to lib/External/JSON. NFC. 2017-02-05 15:26:56 +00:00
.gitattributes
.gitignore Do not track the isl PDF manual in SVN 2017-01-16 11:48:03 +00:00
CMakeLists.txt [Cmake] Optionally use a system isl version. 2017-02-27 17:54:25 +00:00
CREDITS.txt
LICENSE.txt [External] Move lib/JSON to lib/External/JSON. NFC. 2017-02-05 15:26:56 +00:00
README

Polly - Polyhedral optimizations for LLVM
-----------------------------------------
http://polly.llvm.org/

Polly uses a mathematical representation, the polyhedral model, to represent and
transform loops and other control flow structures. Using an abstract
representation it is possible to reason about transformations in a more general
way and to use highly optimized linear programming libraries to figure out the
optimal loop structure. These transformations can be used to do constant
propagation through arrays, remove dead loop iterations, optimize loops for
cache locality, optimize arrays, apply advanced automatic parallelization, drive
vectorization, or they can be used to do software pipelining.