[PATCH] D14068: [FPEnv Core 03/14] Make SelectionDAG aware of FPEnv flags
Sergey Dmitrouk via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 26 06:55:55 PDT 2015
sdmitrouk created this revision.
sdmitrouk added reviewers: hfinkel, joker.eph.
sdmitrouk added subscribers: llvm-commits, resistor, scanon.
sdmitrouk set the repository for this revision to rL LLVM.
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
@@ -2329,6 +2329,8 @@
Flags.setNoNaNs(FMF.noNaNs());
Flags.setNoSignedZeros(FMF.noSignedZeros());
Flags.setUnsafeAlgebra(FMF.unsafeAlgebra());
+ Flags.setKeepExceptions(FMF.keepExceptions());
+ Flags.setKeepRounding(FMF.keepRounding());
}
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 KeepExceptions : 1;
+ bool KeepRounding : 1;
public:
/// Default constructor turns off all optimization flags.
@@ -340,6 +342,8 @@
NoInfs = false;
NoSignedZeros = false;
AllowReciprocal = false;
+ KeepExceptions = false;
+ KeepRounding = 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 setKeepExceptions(bool b) { KeepExceptions = b; }
+ void setKeepRounding(bool b) { KeepRounding = 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 hasKeepExceptions() const { return KeepExceptions; }
+ bool hasKeepRounding() const { return KeepRounding; }
/// 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) |
+ (KeepExceptions << 8) | (KeepRounding << 9);
}
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14068.38401.patch
Type: text/x-patch
Size: 2414 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151026/07769434/attachment.bin>
More information about the llvm-commits
mailing list