summaryrefslogtreecommitdiffstats
path: root/polly/lib/Analysis/ScopDetection.cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2017-09-02 08:25:55 +0000
committerTobias Grosser <tobias@grosser.es>2017-09-02 08:25:55 +0000
commit4baedc70d1a829c32910323fccba179d01cc682e (patch)
treeda086d44eb3d463f8c773f1c3a0f6ab1c23660ae /polly/lib/Analysis/ScopDetection.cpp
parentf1f9c34174bdb45f5305f2f10e7e7fde42627d58 (diff)
downloadbcm5719-llvm-4baedc70d1a829c32910323fccba179d01cc682e.tar.gz
bcm5719-llvm-4baedc70d1a829c32910323fccba179d01cc682e.zip
[ScopDetect/Info] Look through PHIs that follow an error block
In case a PHI node follows an error block we can assume that the incoming value can only come from the node that is not an error block. As a result, conditions that seemed non-affine before are now in fact affine. llvm-svn: 312410
Diffstat (limited to 'polly/lib/Analysis/ScopDetection.cpp')
-rw-r--r--polly/lib/Analysis/ScopDetection.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp
index 56e0259ffce..fb951c5055e 100644
--- a/polly/lib/Analysis/ScopDetection.cpp
+++ b/polly/lib/Analysis/ScopDetection.cpp
@@ -607,6 +607,9 @@ bool ScopDetection::isValidBranch(BasicBlock &BB, BranchInst *BI,
const SCEV *LHS = SE.getSCEVAtScope(ICmp->getOperand(0), L);
const SCEV *RHS = SE.getSCEVAtScope(ICmp->getOperand(1), L);
+ LHS = tryForwardThroughPHI(LHS, Context.CurRegion, SE, LI, DT);
+ RHS = tryForwardThroughPHI(RHS, Context.CurRegion, SE, LI, DT);
+
// If unsigned operations are not allowed try to approximate the region.
if (ICmp->isUnsigned() && !PollyAllowUnsignedOperations)
return !IsLoopBranch && AllowNonAffineSubRegions &&
OpenPOWER on IntegriCloud