[PATCH] D14068: [FPEnv Core 03/14] Make SelectionDAG aware of FPEnv flags

Sergey Dmitrouk via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 4 11:59:45 PST 2015


sdmitrouk updated this revision to Diff 41911.
sdmitrouk added a comment.

Inverted meaning of flags.


Repository:
  rL LLVM

http://reviews.llvm.org/D14068

Files:
  include/llvm/CodeGen/SelectionDAGNodes.h
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Index: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
===================================================================
--- lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -2345,6 +2345,8 @@
     Flags.setNoNaNs(FMF.noNaNs());
     Flags.setNoSignedZeros(FMF.noSignedZeros());
     Flags.setUnsafeAlgebra(FMF.unsafeAlgebra());
+    Flags.setNoExceptions(FMF.noExceptions());
+    Flags.setNoRounding(FMF.noRounding());
   }
   SDValue BinNodeValue = DAG.getNode(OpCode, getCurSDLoc(), Op1.getValueType(),
                                      Op1, Op2, &Flags);
Index: include/llvm/CodeGen/SelectionDAGNodes.h
===================================================================
--- include/llvm/CodeGen/SelectionDAGNodes.h
+++ include/llvm/CodeGen/SelectionDAGNodes.h
@@ -328,6 +328,8 @@
   bool NoInfs : 1;
   bool NoSignedZeros : 1;
   bool AllowReciprocal : 1;
+  bool NoExceptions : 1;
+  bool NoRounding : 1;
 
 public:
   /// Default constructor turns off all optimization flags.
@@ -340,6 +342,8 @@
     NoInfs = false;
     NoSignedZeros = false;
     AllowReciprocal = false;
+    NoExceptions = false;
+    NoRounding = false;
   }
 
   // These are mutators for each flag.
@@ -351,6 +355,8 @@
   void setNoInfs(bool b) { NoInfs = b; }
   void setNoSignedZeros(bool b) { NoSignedZeros = b; }
   void setAllowReciprocal(bool b) { AllowReciprocal = b; }
+  void setNoExceptions(bool b) { NoExceptions = b; }
+  void setNoRounding(bool b) { NoRounding = b; }
 
   // These are accessors for each flag.
   bool hasNoUnsignedWrap() const { return NoUnsignedWrap; }
@@ -361,13 +367,16 @@
   bool hasNoInfs() const { return NoInfs; }
   bool hasNoSignedZeros() const { return NoSignedZeros; }
   bool hasAllowReciprocal() const { return AllowReciprocal; }
+  bool hasNoExceptions() const { return NoExceptions; }
+  bool hasNoRounding() const { return NoRounding; }
 
   /// Return a raw encoding of the flags.
   /// This function should only be used to add data to the NodeID value.
   unsigned getRawFlags() const {
     return (NoUnsignedWrap << 0) | (NoSignedWrap << 1) | (Exact << 2) |
     (UnsafeAlgebra << 3) | (NoNaNs << 4) | (NoInfs << 5) |
-    (NoSignedZeros << 6) | (AllowReciprocal << 7);
+    (NoSignedZeros << 6) | (AllowReciprocal << 7) |
+    (NoExceptions << 8) | (NoRounding << 9);
   }
 };
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14068.41911.patch
Type: text/x-patch
Size: 2378 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151204/0c71f921/attachment.bin>


More information about the llvm-commits mailing list