diff options
| author | Tobias Grosser <tobias@grosser.es> | 2017-09-02 08:25:55 +0000 |
|---|---|---|
| committer | Tobias Grosser <tobias@grosser.es> | 2017-09-02 08:25:55 +0000 |
| commit | 4baedc70d1a829c32910323fccba179d01cc682e (patch) | |
| tree | da086d44eb3d463f8c773f1c3a0f6ab1c23660ae /polly/lib/Analysis/ScopDetection.cpp | |
| parent | f1f9c34174bdb45f5305f2f10e7e7fde42627d58 (diff) | |
| download | bcm5719-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.cpp | 3 |
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 && |

