Handle Top-Level-Regions in polly::isHoistableLoad
commite7ea04ec789b640e2160629de44c075fe8cdbb21
authorPhilip Pfaffe <philip.pfaffe@gmail.com>
Thu, 30 Nov 2017 13:06:10 +0000 (30 13:06 +0000)
committerPhilip Pfaffe <philip.pfaffe@gmail.com>
Thu, 30 Nov 2017 13:06:10 +0000 (30 13:06 +0000)
tree6ae6010bc0d3fc1bfb4b8989d3aa0790bb88869d
parentdf42941885ceaa32aab6e4cbe129ba79e5359e3d
Handle Top-Level-Regions in polly::isHoistableLoad

Summary:
This can be seen as a follow-up on my previous differential [D33411](https://reviews.llvm.org/D33411).
We received a bug report where this error was triggered. I have tried my best to recreate the issue in a minimal lit testcase which is also part of this differential.

I only handle return instructions as predecessors to a virtual TLR-exit right now. From inspecting the codebase, it seems `unreachable` instructions may also be of interest here. If requested, I can extend my patches to consider them as well. I would also apply this on `ScopHelper.cpp::isErrorBlock` (see D33411), of course.

Reviewers: philip.pfaffe, bollu

Reviewed By: bollu

Subscribers: Meinersbur, pollydev, llvm-commits

Tags: #polly

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

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@319431 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/ScopHelper.cpp
test/ScopDetect/tlr_is_hoistable_load.ll [new file with mode: 0644]