Move the code dependency for MathExtras.h from SelectionDAGNodes.h.
authorJim Laskey <jlaskey@mac.com>
Wed, 17 Aug 2005 20:08:02 +0000 (20:08 +0000)
committerJim Laskey <jlaskey@mac.com>
Wed, 17 Aug 2005 20:08:02 +0000 (20:08 +0000)
Added some class dividers in SelectionDAG.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22841 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/SelectionDAGNodes.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index eb634a627c9a7bffbb14b33c756733e8041670b5..303d38346905266ba1e0c4be65b476cc7e6651f0 100644 (file)
@@ -25,7 +25,6 @@
 #include "llvm/ADT/GraphTraits.h"
 #include "llvm/ADT/iterator"
 #include "llvm/Support/DataTypes.h"
-#include "llvm/Support/MathExtras.h"
 #include <cassert>
 #include <vector>
 
@@ -742,9 +741,7 @@ public:
   /// 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 isExactlyValue(double V) const {
-    return DoubleToBits(V) == DoubleToBits(Value);
-  }
+  bool isExactlyValue(double V) const;
 
   static bool classof(const ConstantFPSDNode *) { return true; }
   static bool classof(const SDNode *N) {
index 81b08039a4774c7b4679993362317994768bcbcd..cb682c14658d81780eec93d5ed94e8138dcbd93c 100644 (file)
@@ -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