From 0d38424bbebf2b52cb4ed93eff08e1085c859e91 Mon Sep 17 00:00:00 2001 From: Michael Ilseman Date: Wed, 28 Nov 2012 21:11:25 +0000 Subject: [PATCH] Fast-math comments and convenience method git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168811 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Operator.h | 6 ++++++ 1 file changed, 6 insertions(+) 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; + } }; -- 2.34.1