[LLVMdev] GSoC - Range Analysis

John Criswell criswell at illinois.edu
Sat Mar 31 08:38:53 PDT 2012


On 3/31/12 7:33 AM, Duncan Sands wrote:
> Hi Victor,
>
>>      I have been working on Douglas's range analysis, and today, after
>> toiling with it for two years, we have a very mature and robust
>> implementation, which is publicly available at
>> http://code.google.com/p/range-analysis/.
> one of the big problems with Douglas's original range analysis was that it
> couldn't handle modulo arithmetic.  For example, if an addition does not have
> the nsw flag then it had to give up [*].  Did you solve this problem?

As a follow up to this question, can your range analysis be configured 
so that it treats all arithmetic operations as two's complement 
arithmetic (i.e., does it take into account that, even with the nsw 
flag, values can overflow or underflow)?

Also, on which LLVM types does your analysis work?  I know it must work 
on integers, but does it also provide information on floating point or 
pointer values?

-- John T.

>
> Also, the tricky bit of range analysis is handling loops.  I suggested to
> Douglas that he exploit LLVM's SCEV infrastructure to discover and exploit
> how induction variables are evolving rather than trying to create his own
> poor man's version using interval arithmetic.  How are loops handled now?
>
> Ciao, Duncan.
>
> [*] IIRC it didn't pay any attention to this issue: it just assumed that
> arithmetic doesn't wrap - oops.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list