[llvm-dev] [RFC] FP Environment and Rounding mode handling in LLVM

Antoine Pitrou via llvm-dev llvm-dev at lists.llvm.org
Fri Feb 5 04:47:32 PST 2016


Hello,

On Fri, 05 Feb 2016 02:05:38 +0000
Chandler Carruth via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> 1) This avoids implicit state. The implicit state of the floating point
> environment makes things like code motion extremely hard to reason about. I
> think we will just get it wrong too often to make this a good approach. By
> modeling all of this as actual SSA values I think there is a much better
> chance we'll get this stuff right. For example by or-ing all the i1s for
> floating point exceptions and testing the result to implement fetestexcept.

I'm not sure I understand everything here, but as a data point we would
like to access the FP error status (get and set its individual bits).
However, we don't need to change the rounding mode or the exception
mode. Does your proposal mean we would need to use the mentioned
intrinsics and get a performance hit, or am I missing something obvious?

(in the context of Numba, a performance hit on FP calculations is
certainly unacceptable for us)

Regards

Antoine.




More information about the llvm-dev mailing list