From: Dan Gohman Date: Tue, 19 Jan 2010 22:27:22 +0000 (+0000) Subject: Add a comment and tidy up some whitespace. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=67847538148ed956aaa14a07a77902fb991445f2;p=oota-llvm.git Add a comment and tidy up some whitespace. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93932 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index a06321cecfd..7389007bf2f 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -1530,7 +1530,6 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl &Ops, return S; } - /// getMulExpr - Get a canonical multiply expression, or something simpler if /// possible. const SCEV *ScalarEvolution::getMulExpr(SmallVectorImpl &Ops, @@ -1558,7 +1557,6 @@ const SCEV *ScalarEvolution::getMulExpr(SmallVectorImpl &Ops, return getAddExpr(getMulExpr(LHSC, Add->getOperand(0)), getMulExpr(LHSC, Add->getOperand(1))); - ++Idx; while (const SCEVConstant *RHSC = dyn_cast(Ops[Idx])) { // We found two constants, fold them together! @@ -1877,6 +1875,8 @@ ScalarEvolution::getAddRecExpr(SmallVectorImpl &Operands, } } + // Okay, it looks like we really DO need an addrec expr. Check to see if we + // already have one, otherwise create a new one. FoldingSetNodeID ID; ID.AddInteger(scAddRecExpr); ID.AddInteger(Operands.size());