[llvm-commits] [polly] r144282 - /polly/trunk/lib/Analysis/ScopDetection.cpp
Tobias Grosser
grosser at fim.uni-passau.de
Thu Nov 10 04:45:11 PST 2011
Author: grosser
Date: Thu Nov 10 06:45:11 2011
New Revision: 144282
URL: http://llvm.org/viewvc/llvm-project?rev=144282&view=rev
Log:
ScopDetection: Improve formatting of error message and simplify some code
Modified:
polly/trunk/lib/Analysis/ScopDetection.cpp
Modified: polly/trunk/lib/Analysis/ScopDetection.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=144282&r1=144281&r2=144282&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetection.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetection.cpp Thu Nov 10 06:45:11 2011
@@ -170,14 +170,13 @@
|| isa<UndefValue>(ICmp->getOperand(1)))
INVALID(AffFunc, "undef operand in branch at BB: " + BB.getNameStr());
- const SCEV *ScevLHS = SE->getSCEV(ICmp->getOperand(0));
- const SCEV *ScevRHS = SE->getSCEV(ICmp->getOperand(1));
+ const SCEV *LHS = SE->getSCEV(ICmp->getOperand(0));
+ const SCEV *RHS = SE->getSCEV(ICmp->getOperand(1));
- bool affineLHS = isAffineExpr(&Context.CurRegion, ScevLHS, *SE);
- bool affineRHS = isAffineExpr(&Context.CurRegion, ScevRHS, *SE);
-
- if (!affineLHS || !affineRHS)
- INVALID(AffFunc, "Non affine branch in BB: " + BB.getNameStr());
+ if (!isAffineExpr(&Context.CurRegion, LHS, *SE) ||
+ !isAffineExpr(&Context.CurRegion, RHS, *SE))
+ INVALID(AffFunc, "Non affine branch in BB '" << BB.getNameStr()
+ << "' with LHS: " << *LHS << " and RHS: " << *RHS);
}
// Allow loop exit conditions.
More information about the llvm-commits
mailing list