diff options
author | Michael Ilseman <milseman@apple.com> | 2012-11-28 21:11:25 +0000 |
---|---|---|
committer | Michael Ilseman <milseman@apple.com> | 2012-11-28 21:11:25 +0000 |
commit | 0d38424bbebf2b52cb4ed93eff08e1085c859e91 (patch) | |
tree | 2dd170484b4ac469067c5ed0a506c92990d3178a /include/llvm/Operator.h | |
parent | 61c654ce5c86a7a9f8d81057979aa5b0eaab07b9 (diff) |
Fast-math comments and convenience method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168811 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Operator.h')
-rw-r--r-- | include/llvm/Operator.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Operator.h b/include/llvm/Operator.h index beea034bca..289df4e848 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; + } }; |