<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 11/1/13 2:07 PM, Andrew Trick wrote:<br>
</div>
<blockquote
cite="mid:8D3A2A25-6AA0-4F7F-9497-C5E83AFB023E@apple.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<br>
<div>
<div>- I’m not sure why divide-by-zero would motivate this
(probably just missing something). LLVM doesn’t model it as a
trap currently. And if it did, an explicit nonzero-divisor
check would be easy to reason about without any metadata.</div>
</div>
</blockquote>
This is far enough off topic to not be worth discussing now, but I
want to throw out that there would be interested parties in defining
trapping versions of LLVM instructions which currently use undef
semantics for edge cases. We haven't dug into this much yet, but it
is something we're probably going to be interested in long term.
Our initial approach is to simply use explicit conditional guards to
handle things like div-by-zero and null-dereference. Depending on
the performance we see with that approach, we may be interested in
implementing support for implicit checks which would likely require
explicitly trapping semantics. <br>
<br>
Philip<br>
<br>
</body>
</html>