Fix non-synthesizable loop exit values.
authorMichael Kruse <llvm@meinersbur.de>
Tue, 1 Mar 2016 21:44:06 +0000 (21:44 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Tue, 1 Mar 2016 21:44:06 +0000 (21:44 +0000)
commitc7e0d9c216d552456f78be3fc94f077d009bdb1f
treec0bf333b9af3657582b2c3e653b7f0b097e51077
parent89244ba84a6f2f3095cb77fbf9e78dd9b04fbe1d
Fix non-synthesizable loop exit values.

Polly recognizes affine loops that ScalarEvolution does not, in
particular those with loop conditions that depend on hoisted invariant
loads. Check for SCEVAddRec dependencies on such loops and do not
consider their exit values as synthesizable because SCEVExpander would
generate them as expressions that depend on the original induction
variables. These are not available in generated code.

llvm-svn: 262404
polly/include/polly/ScopDetection.h
polly/include/polly/Support/SCEVValidator.h
polly/include/polly/Support/ScopHelper.h
polly/lib/Analysis/ScopDetection.cpp
polly/lib/Analysis/ScopInfo.cpp
polly/lib/CodeGen/BlockGenerators.cpp
polly/lib/CodeGen/IslNodeBuilder.cpp
polly/lib/Support/SCEVValidator.cpp
polly/lib/Support/ScopHelper.cpp
polly/test/Isl/CodeGen/unpredictable-loop-unsynthesizable.ll [new file with mode: 0644]