From: Michael Ilseman Date: Wed, 28 Nov 2012 21:11:25 +0000 (+0000) Subject: Fast-math comments and convenience method X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0d38424bbebf2b52cb4ed93eff08e1085c859e91;p=oota-llvm.git Fast-math comments and convenience method git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168811 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Operator.h b/include/llvm/Operator.h index beea034bcaa..289df4e8480 100644 --- a/include/llvm/Operator.h +++ b/include/llvm/Operator.h @@ -176,10 +176,16 @@ struct FastMathFlags { NoSignedZeros(false), AllowReciprocal(false) { } + /// Whether any flag is set bool any() { return UnsafeAlgebra || NoNaNs || NoInfs || NoSignedZeros || AllowReciprocal; } + + /// Set all the flags to false + void clear() { + UnsafeAlgebra = NoNaNs = NoInfs = NoSignedZeros = AllowReciprocal = false; + } };