diff options
author | Jim Laskey <jlaskey@mac.com> | 2005-08-17 20:08:02 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2005-08-17 20:08:02 +0000 |
commit | 58b968be853ef02d0f448e5e2c31676e361c210f (patch) | |
tree | 00de55631613effa6c503d54f2fc843b5b6d6d03 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 3a1eff732b36a663cdb9f07f4a9ccae6452eadcb (diff) |
Move the code dependency for MathExtras.h from SelectionDAGNodes.h.
Added some class dividers in SelectionDAG.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22841 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 81b08039a4..cb682c1465 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -57,6 +57,21 @@ static bool isInvertibleForFree(SDOperand N) { return false; } +//===----------------------------------------------------------------------===// +// ConstantFPSDNode Class +//===----------------------------------------------------------------------===// + +/// isExactlyValue - We don't rely on operator== working on double values, as +/// it returns true for things that are clearly not equal, like -0.0 and 0.0. +/// As such, this method can be used to do an exact bit-for-bit comparison of +/// two floating point values. +bool ConstantFPSDNode::isExactlyValue(double V) const { + return DoubleToBits(V) == DoubleToBits(Value); +} + +//===----------------------------------------------------------------------===// +// ISD Class +//===----------------------------------------------------------------------===// /// getSetCCSwappedOperands - Return the operation corresponding to (Y op X) /// when given the operation for (X op Y). @@ -140,6 +155,9 @@ const TargetMachine &SelectionDAG::getTarget() const { return TLI.getTargetMachine(); } +//===----------------------------------------------------------------------===// +// SelectionDAG Class +//===----------------------------------------------------------------------===// /// RemoveDeadNodes - This method deletes all unreachable nodes in the /// SelectionDAG, including nodes (like loads) that have uses of their token @@ -1822,7 +1840,9 @@ void SelectionDAG::ReplaceAllUsesWith(SDNode *From, SDNode *To) { } } - +//===----------------------------------------------------------------------===// +// SDNode Class +//===----------------------------------------------------------------------===// /// hasNUsesOfValue - Return true if there are exactly NUSES uses of the /// indicated value. This method ignores uses of other values defined by this |