[llvm-commits] [llvm] r108848 - /llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp
Dan Gohman
gohman at apple.com
Tue Jul 20 09:32:11 PDT 2010
Author: djg
Date: Tue Jul 20 11:32:11 2010
New Revision: 108848
URL: http://llvm.org/viewvc/llvm-project?rev=108848&view=rev
Log:
Minor code cleanups.
Modified:
llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp
Modified: llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp?rev=108848&r1=108847&r2=108848&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolutionNormalization.cpp Tue Jul 20 11:32:11 2010
@@ -69,6 +69,7 @@
DominatorTree &DT) {
if (isa<SCEVConstant>(S) || isa<SCEVUnknown>(S))
return S;
+
if (const SCEVCastExpr *X = dyn_cast<SCEVCastExpr>(S)) {
const SCEV *O = X->getOperand();
const SCEV *N = TransformForPostIncUse(Kind, O, User, OperandValToReplace,
@@ -82,9 +83,11 @@
}
return S;
}
+
if (const SCEVNAryExpr *X = dyn_cast<SCEVNAryExpr>(S)) {
SmallVector<const SCEV *, 8> Operands;
bool Changed = false;
+ // Transform each operand.
for (SCEVNAryExpr::op_iterator I = X->op_begin(), E = X->op_end();
I != E; ++I) {
const SCEV *O = *I;
@@ -134,6 +137,7 @@
}
return S;
}
+
if (const SCEVUDivExpr *X = dyn_cast<SCEVUDivExpr>(S)) {
const SCEV *LO = X->getLHS();
const SCEV *RO = X->getRHS();
@@ -145,6 +149,7 @@
return SE.getUDivExpr(LN, RN);
return S;
}
+
llvm_unreachable("Unexpected SCEV kind!");
return 0;
}
More information about the llvm-commits
mailing list