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

John Regehr regehr at cs.utah.edu
Fri Aug 22 14:49:19 PDT 2008

> Thanks!  This is all very interesting, and tells me that LLVM has a
> way to go to fully support all of these capabilities (if that is the
> right thing to do, which isn't clear).  OTOH, it looks like a lot of
> real-world software that is using LLVM already doesn't seem to be
> affected by the lack of them.

LLVM's current choice is safe for all applications.  The trapping behavior 
would be a really nice addition, though.

Has anyone quantified the optimizations afforded by undefined signed 
overflow?  I'd expect that the benefits are minimal for most codes.  On 
the other hand I've seen reports that gcc's -fwrapv hurts performance of 
gcc output significantly.  I'm not sure if that is true.  Also, it could 
be the case that -fwrapv is implemented poorly.

> Does anyone know of any C/C++ programs that require integer overflow
> on signed arithmetic (even though it is not strictly allowed by the
> standard)?

I've seen embedded programs that do this.

Of course, the C standard is clear: these programs are wrong.


More information about the llvm-dev mailing list