> > +  // 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.

Dan

-- 
Dan Gohman, Cray Inc.
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to