[LLVMdev] Checked arithmetic

Chris Lattner sabre at nondot.org
Tue Mar 25 21:18:03 PDT 2008


On Mar 25, 2008, at 8:25 PM, Jonathan S. Shapiro wrote:

> In looking at the LLVM reference manual, it is conspicuous that (a)  
> the
> IR does not define condition codes, and (b) the IR does not define
> opcodes that return condition results in addition to their  
> computational
> results.

We currently don't have this because noone has implemented it yet.  It  
would be great to have this.

> Given the IR as it stands, how does one go about *efficiently*
> implementing a language that requires checked arithmetic? I do
> understand that it can be done using intrinsics, but that  
> implementation
> is (to put it mildly) suboptimal.

Why?

-Chris



More information about the llvm-dev mailing list