Bug 16358: simplify SCEVs with assumptions

Andrew Trick atrick at apple.com
Mon Nov 25 17:54:54 PST 2013


On Nov 25, 2013, at 5:52 PM, Sebastian Pop <spop at codeaurora.org> wrote:

> Sebastian Pop wrote:
>> Also another problem that I have seen is that the expression niter computes is
>> cached, so any subsequent queries to niter would have to provide the assumptions
>> under which the niter expression has been computed. So one would have to attach
>> to the cached value of a SCEV the assumptions under which that expression has
>> been computed.
> 
> One idea that is used in ISL and before in other polyhedral tools like PIP is to
> build a "quast" (quasi affine syntax tree) that lists the constraints under
> which the expression is nice and known and the constraints under which the
> expression cannot be computed: so the expression niter computes would look like
> 
> if ({1,+,1}<%for> < 2**16)
>  {1,+,1}<%for>
> else
>  unknown
> 
> That way one would explicitely get the constraints under which the expression
> has a nice form, and the cases under which it cannot be computed.

That sounds great, I’m glad someone else has figured it out.
-Andy



More information about the llvm-commits mailing list