[LLVMdev] GSoC - Range Analysis

John Regehr regehr at cs.utah.edu
Mon Apr 2 09:35:36 PDT 2012


> from what I understand of the analysis, to come to its conclusions it assumes
> that there is no overflow.  That doesn't make it useless for removing integer
> overflow checks: you can successively walk variables, and if you can prove that
> there is no overflow of a variable X given your analysis of previously seen
> variables, then X can safely be added to the set of analysed variables.  Rinse
> and repeat.  However this probably doesn't work for variables inside loops.

I'd also be interested to hear more from the range analysis authors about 
this.

Remaining faithful to the C/C++ overflow rules while operating on LLVM IR 
may be very tricky, particularly with respect to integer promotions and 
similar constructs, which may have no representation in the IR (even 
before optimization).

An analysis that is not sound with respect to the original C/C++ semantics 
would be of little use to anyone.

John



More information about the llvm-dev mailing list