[LLVMdev] Dependence Analysis [was: Flow-Sensitive AA]

Chris Lattner clattner at apple.com
Fri Aug 22 14:12:11 PDT 2008

On Aug 22, 2008, at 9:53 AM, Dale Johannesen wrote:

>> C has a way to express this: signed integers are defined to never
>> overflow,
> More precisely, signed integer overflow is undefined behavior, which
> gives the compiler great latitude.
> Assuming this will never happen and doing optimizations on that basis
> is valid, but so are other things.
> An easy implementation, which often matches user expectations because
> it is what most hardware does,
> is to treat signed and unsigned overflow alike, with clean wraparound.

In other words, our current implementation is correct.  However, we  
are missing the opportunity to optimize some things.  Trivial examples  
include some cases where you can't compute a simple loop count due to  
potential overflow.


More information about the llvm-dev mailing list