summaryrefslogtreecommitdiffstats
path: root/polly/lib
diff options
context:
space:
mode:
authorSebastian Pop <spop@codeaurora.org>2013-06-14 20:20:39 +0000
committerSebastian Pop <spop@codeaurora.org>2013-06-14 20:20:39 +0000
commite1e4a2d5345b06c86db6aa55faffee888aba2740 (patch)
tree6bf9dc44c993c3ea5cd703a57f92171fbce4d559 /polly/lib
parent15ad3e08fe7765dd6764c4afe7538fdabb150cd7 (diff)
downloadbcm5719-llvm-e1e4a2d5345b06c86db6aa55faffee888aba2740.tar.gz
bcm5719-llvm-e1e4a2d5345b06c86db6aa55faffee888aba2740.zip
scop detection: check flag before expensive call
llvm-svn: 184000
Diffstat (limited to 'polly/lib')
-rw-r--r--polly/lib/Analysis/ScopDetection.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp
index 6642e692f50..8ae485cdd61 100644
--- a/polly/lib/Analysis/ScopDetection.cpp
+++ b/polly/lib/Analysis/ScopDetection.cpp
@@ -266,8 +266,8 @@ bool ScopDetection::isValidMemoryAccess(Instruction &Inst,
AccessFunction = SE->getMinusSCEV(AccessFunction, BasePointer);
- if (!isAffineExpr(&Context.CurRegion, AccessFunction, *SE, BaseValue) &&
- !AllowNonAffine)
+ if (!AllowNonAffine && !isAffineExpr(&Context.CurRegion, AccessFunction, *SE,
+ BaseValue))
INVALID(AffFunc, "Non affine access function: " << *AccessFunction);
// FIXME: Alias Analysis thinks IntToPtrInst aliases with alloca instructions
OpenPOWER on IntegriCloud