[llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp

Chris Lattner clattner at apple.com
Mon Jun 18 13:50:51 PDT 2007


On Jun 18, 2007, at 1:35 PM, Dan Gohman wrote:

>>> +  // Now we know the first non-constant operand.  Skip past any
>>> cast SCEVs.
>>> +  while (Idx < Ops.size() && Ops[Idx]->getSCEVType() < scAddExpr)
>>> +    ++Idx;
>>
>> Can you please introduce a predicate for this?  Comparing against
>> scAddExpr is not obvious :)
>
> I think if you read the whole body of SCEVAddExpr::get instead of  
> just what's
> in this diff, it'll be more more obvious. The operands of  
> theSCEVAddExpr are
> sorted by their getSCEVType() value, and the code is walking  
> through them
> expecting to deal with each kind in that order.

Ahh, ok, thanks!

-Chris



More information about the llvm-commits mailing list