diff options
| author | Tobias Grosser <tobias@grosser.es> | 2015-08-31 06:37:25 +0000 |
|---|---|---|
| committer | Tobias Grosser <tobias@grosser.es> | 2015-08-31 06:37:25 +0000 |
| commit | d86bf4271c0c30a93be74cc3453ae744f6e7a544 (patch) | |
| tree | 192316211be279049706e739ac81468883374c6b /polly | |
| parent | 692f8683d7db227d49ee3dad45c87ab840f039c3 (diff) | |
| download | bcm5719-llvm-d86bf4271c0c30a93be74cc3453ae744f6e7a544.tar.gz bcm5719-llvm-d86bf4271c0c30a93be74cc3453ae744f6e7a544.zip | |
Do not model scalar references to constant values
llvm-svn: 246418
Diffstat (limited to 'polly')
| -rw-r--r-- | polly/lib/Analysis/TempScopInfo.cpp | 3 | ||||
| -rw-r--r-- | polly/test/Isl/CodeGen/phi_loop_carried_float_escape.ll | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/polly/lib/Analysis/TempScopInfo.cpp b/polly/lib/Analysis/TempScopInfo.cpp index c669f5544f8..bb242df9a71 100644 --- a/polly/lib/Analysis/TempScopInfo.cpp +++ b/polly/lib/Analysis/TempScopInfo.cpp @@ -210,6 +210,9 @@ bool TempScopInfo::buildScalarDependences(Instruction *Inst, Region *R, if (R->contains(OpInst)) continue; + if (isa<Constant>(Op)) + continue; + IRAccess ScalarAccess(IRAccess::READ, Op, ZeroOffset, 1, true, Op); AccFuncMap[Inst->getParent()].push_back( std::make_pair(ScalarAccess, Inst)); diff --git a/polly/test/Isl/CodeGen/phi_loop_carried_float_escape.ll b/polly/test/Isl/CodeGen/phi_loop_carried_float_escape.ll index 5f03f55f9cb..a22b1718248 100644 --- a/polly/test/Isl/CodeGen/phi_loop_carried_float_escape.ll +++ b/polly/test/Isl/CodeGen/phi_loop_carried_float_escape.ll @@ -1,4 +1,8 @@ -; RUN: opt %loadPolly -S -polly-no-early-exit -polly-detect-unprofitable -polly-codegen < %s | FileCheck %s +; RUN: opt %loadPolly -S -polly-no-early-exit -polly-detect-unprofitable \ +; RUN: -polly-analyze-read-only-scalars=false -polly-codegen < %s | FileCheck %s + +; RUN: opt %loadPolly -S -polly-no-early-exit -polly-detect-unprofitable \ +; RUN: -polly-analyze-read-only-scalars=true -polly-codegen < %s | FileCheck %s ; ; float f(float *A, int N) { ; float tmp = 0; |

