llvm-project/polly/lib
Tobias Grosser 349d1c3368 [ScopDetection] Remove redundant checks for endless loops
Summary:
Both `canUseISLTripCount()` and `addOverApproximatedRegion()` contained checks
to reject endless loops which are now removed and replaced by a single check
in `isValidLoop()`.

For reporting such loops the `ReportLoopOverlapWithNonAffineSubRegion` is
renamed to `ReportLoopHasNoExit`. The test case
`ReportLoopOverlapWithNonAffineSubRegion.ll` is adapted and renamed as well.

The schedule generation in `buildSchedule()` is based on the following
assumption:

Given some block B that is contained in a loop L and a SESE region R,
we assume that L is contained in R or the other way around.

However, this assumption is broken in the presence of endless loops that are
nested inside other loops. Therefore, in order to prevent erroneous behavior
in `buildSchedule()`, r265280 introduced a corresponding check in
`canUseISLTripCount()` to reject endless loops. Unfortunately, it was possible
to bypass this check with -polly-allow-nonaffine-loops which was fixed by adding
another check to reject endless loops in `allowOverApproximatedRegion()` in
r273905. Hence there existed two separate locations that handled this case.

Thank you Johannes Doerfert for helping to provide the above background
information.

Reviewers: Meinersbur, grosser

Subscribers: _jdoerfert, pollydev

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

Contributed-by: Matthias Reisinger <d412vv1n@gmail.com>
llvm-svn: 281987
2016-09-20 17:05:22 +00:00
..
Analysis [ScopDetection] Remove redundant checks for endless loops 2016-09-20 17:05:22 +00:00
CodeGen GPGPU: Do not run mostly sequential kernels in GPU 2016-09-18 08:31:09 +00:00
Exchange Perform copying to created arrays according to the packing transformation 2016-09-14 06:26:09 +00:00
External cmake: PollyPPCG depends on PollyISL 2016-09-13 21:09:35 +00:00
JSON Fix spacing around variable initializations and for-loops. NFC. 2016-08-09 17:49:24 +00:00
Support Update CFGPrinter -> CFGPrinterLegacyPass 2016-09-16 05:48:09 +00:00
Transform Perform copying to created arrays according to the packing transformation 2016-09-14 06:26:09 +00:00
CMakeLists.txt Add -polly-flatten-schedule pass. 2016-09-08 15:02:36 +00:00
Polly.cpp Drop '@brief' from doxygen comments 2016-09-02 06:33:33 +00:00