forked from OSchip/llvm-project
Do not model scalar references to constant values
llvm-svn: 246418
This commit is contained in:
parent
692f8683d7
commit
d86bf4271c
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue