[PATCH] D31165: [SDAG] Add AllowContract to SNodeFlags
Adam Nemet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 28 16:58:33 PDT 2017
This revision was automatically updated to reflect the committed changes.
anemet marked 2 inline comments as done.
Closed by commit rL298961: [SDAG] Add AllowContract to SNodeFlags (authored by anemet).
Changed prior to commit:
https://reviews.llvm.org/D31165?vs=92421&id=93320#toc
Repository:
rL LLVM
https://reviews.llvm.org/D31165
Files:
llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Index: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -2588,6 +2588,7 @@
Flags.setVectorReduction(vec_redux);
if (EnableFMFInDAG) {
Flags.setAllowReciprocal(FMF.allowReciprocal());
+ Flags.setAllowContract(FMF.allowContract());
Flags.setNoInfs(FMF.noInfs());
Flags.setNoNaNs(FMF.noNaNs());
Flags.setNoSignedZeros(FMF.noSignedZeros());
Index: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
===================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -350,13 +350,15 @@
bool NoSignedZeros : 1;
bool AllowReciprocal : 1;
bool VectorReduction : 1;
+ bool AllowContract : 1;
public:
/// Default constructor turns off all optimization flags.
SDNodeFlags()
: NoUnsignedWrap(false), NoSignedWrap(false), Exact(false),
UnsafeAlgebra(false), NoNaNs(false), NoInfs(false),
- NoSignedZeros(false), AllowReciprocal(false), VectorReduction(false) {}
+ NoSignedZeros(false), AllowReciprocal(false), VectorReduction(false),
+ AllowContract(false) {}
// These are mutators for each flag.
void setNoUnsignedWrap(bool b) { NoUnsignedWrap = b; }
@@ -368,6 +370,7 @@
void setNoSignedZeros(bool b) { NoSignedZeros = b; }
void setAllowReciprocal(bool b) { AllowReciprocal = b; }
void setVectorReduction(bool b) { VectorReduction = b; }
+ void setAllowContract(bool b) { AllowContract = b; }
// These are accessors for each flag.
bool hasNoUnsignedWrap() const { return NoUnsignedWrap; }
@@ -379,6 +382,7 @@
bool hasNoSignedZeros() const { return NoSignedZeros; }
bool hasAllowReciprocal() const { return AllowReciprocal; }
bool hasVectorReduction() const { return VectorReduction; }
+ bool hasAllowContract() const { return AllowContract; }
/// Clear any flags in this flag set that aren't also set in Flags.
void intersectWith(const SDNodeFlags *Flags) {
@@ -390,6 +394,7 @@
NoInfs &= Flags->NoInfs;
NoSignedZeros &= Flags->NoSignedZeros;
AllowReciprocal &= Flags->AllowReciprocal;
+ AllowContract &= Flags->AllowContract;
}
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31165.93320.patch
Type: text/x-patch
Size: 2399 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170328/16919736/attachment.bin>
More information about the llvm-commits
mailing list