Remove the code from the scheduler that commuted two-address
[oota-llvm.git] / include / llvm / CodeGen / ScheduleDAGSDNodes.h
index d7f0ea49d487de3f46d53a56c1d3b4fc98578646..2c3f0974c0d1de2fba1ee90e62c44e5e21474e97 100644 (file)
@@ -17,7 +17,6 @@
 
 #include "llvm/CodeGen/ScheduleDAG.h"
 #include "llvm/CodeGen/SelectionDAG.h"
-#include "llvm/ADT/SmallSet.h"
 
 namespace llvm {
   /// HazardRecognizer - This determines whether or not an instruction can be
@@ -75,8 +74,6 @@ namespace llvm {
   ///
   class ScheduleDAGSDNodes : public ScheduleDAG {
   public:
-    SmallSet<SDNode*, 16> CommuteSet;     // Nodes that should be commuted.
-
     ScheduleDAGSDNodes(SelectionDAG *dag, MachineBasicBlock *bb,
                        const TargetMachine &tm);
 
@@ -103,10 +100,13 @@ namespace llvm {
     ///
     SUnit *NewSUnit(SDNode *N) {
 #ifndef NDEBUG
-      const SUnit *Addr = &SUnits[0];
+      const SUnit *Addr = 0;
+      if (SUnits.size() > 0)
+        Addr = &SUnits[0];
 #endif
       SUnits.push_back(SUnit(N, (unsigned)SUnits.size()));
-      assert(Addr == &SUnits[0] && "SUnits std::vector reallocated on the fly!");
+      assert((Addr == 0 || Addr == &SUnits[0]) &&
+             "SUnits std::vector reallocated on the fly!");
       SUnits.back().OrigNode = &SUnits.back();
       return &SUnits.back();
     }