[llvm-commits] SCEV factories

Chris Lattner clattner at apple.com
Wed Oct 17 16:58:02 PDT 2007


On Oct 11, 2007, at 2:31 PM, Dan Gohman wrote:

> The attached patch changes the SCEV factory functions from being
> static member functions of the SCEV subclasses to being non-static
> member functions of the ScalarEvolution class.
>
> This will be useful for things like the FIXME comment in
> SE.getSignExtendExpr (renamed from SCEVSignExtendExpr::get here). A
> sign-extend operator with an add-recurrence operand can possibly be
> transformed to an add-recurrence with a sign-extended base if the
> ScalarEvolution object is available and knows about the trip-count of
> the loop. This also applies to zero-extend as well.

Very nice, please commit.

> Also, this would make it easy to eliminate the static variables in
> ScalarEvolution.cpp -- they could be members of ScalarEvolutionImpl,
> if anyone is interested.

That would be very nice also :)

-Chris



More information about the llvm-commits mailing list