[LLVMdev] Checked arithmetic
Chris Lattner
sabre at nondot.org
Wed Mar 26 11:02:16 PDT 2008
On Wed, 26 Mar 2008, Jonathan S. Shapiro wrote:
> I want to background process this for a bit, but it would be helpful to
> discuss some approaches first.
>
> There would appear to be three approaches:
>
> 1. Introduce a CC register class into the IR. This seems to be a
> fairly major overhaul.
>
> 2. Introduce a set of scalar and fp computation quasi-instructions
> that accept the same arguments as their computational counterparts,
> but produce *only* the condition code. For example:
Why not define an "add with overflow" intrinsic that returns its value and
overflow bit as an i1?
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list