[ScopDetection] Do not allow required-invariant loads in non-affine region
commitb5da7af7cdc0a06c0f56a4e2f74e9b1f07afc1ce
authorTobias Grosser <tobias@grosser.es>
Thu, 2 Mar 2017 12:15:37 +0000 (2 12:15 +0000)
committerTobias Grosser <tobias@grosser.es>
Thu, 2 Mar 2017 12:15:37 +0000 (2 12:15 +0000)
tree91d7e93f789023816da561ddbd82fa87c9a33276
parent4b65b6e69dcb0e1b083cda41bfcdde84fcf27cd7
[ScopDetection] Do not allow required-invariant loads in non-affine region

These loads cannot be savely hoisted as the condition guarding the
non-affine region cannot be duplicated to also protect the hoisted load
later on. Today they are dropped in ScopInfo. By checking for this early, we
do not even try to model them and possibly can still optimize smaller regions
not containing this specific required-invariant load.

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@296744 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScopDetection.cpp
test/ScopInfo/invariant_load_in_non_affine.ll [new file with mode: 0644]