[LLVMdev] GSoC - Range Analysis

Duncan Sands baldrick at free.fr
Sat Mar 31 05:33:27 PDT 2012


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?

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.



More information about the llvm-dev mailing list