[LLVMdev] Dependence Analysis [was: Flow-Sensitive AA]
Chris Lattner
clattner at apple.com
Fri Aug 22 14:17:16 PDT 2008
On Aug 22, 2008, at 2:03 PM, Vikram S. Adve wrote:
> 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.
>
> 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)?
Yes, it is a common bug to depend on this. See (for example):
http://www.kb.cert.org/vuls/id/162289
> Also, does anyone know how -ftrapv is implemented on processors that
> don't have hardware detection of integer overflow? It sounds very
> expensive to do entirely in software.
GCC's -ftrapv option is not fully implemented on any target, so it is
not really dependable. The Ada frontend (which requires trap on
overflow in some cases) for example implement their own range checks
instead of relying on GCC's ftrapv support.
-Chris
More information about the llvm-dev
mailing list