Don't check side effects for functions outside of SCoP
commit85b93331b2660ca22cbb69b4e88d6190367968ff
authorEli Friedman <efriedma@codeaurora.org>
Wed, 14 Jun 2017 22:43:28 +0000 (14 22:43 +0000)
committerEli Friedman <efriedma@codeaurora.org>
Wed, 14 Jun 2017 22:43:28 +0000 (14 22:43 +0000)
treedde29eda8f58afaeba374550d06aff015c620c17
parente8f4b0eddf2b7eff88c6f6fd78cc556b79f3ff13
Don't check side effects for functions outside of SCoP

In r304074 we introduce a patch to accept results from side effect free
functions into SCEV modeling. This causes rejection of cases where the
call is happening outside the SCoP. This patch checks if the call is
outside the Region and treats the results as a parameter (SCEVType::PARAM)
to the SCoP instead of returning SCEVType::INVALID.

Patch by Sameer Abu Asal.

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