[llvm-commits] CVS: llvm/include/llvm/CodeGen/ScheduleDAG.h

Chris Lattner lattner at cs.uiuc.edu
Thu Mar 9 23:24:57 PST 2006



Changes in directory llvm/include/llvm/CodeGen:

ScheduleDAG.h updated: 1.16 -> 1.17
---
Log message:

Store VRBase in a map, not in NodeInfo.


---
Diffs of the changes:  (+5 -12)

 ScheduleDAG.h |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)


Index: llvm/include/llvm/CodeGen/ScheduleDAG.h
diff -u llvm/include/llvm/CodeGen/ScheduleDAG.h:1.16 llvm/include/llvm/CodeGen/ScheduleDAG.h:1.17
--- llvm/include/llvm/CodeGen/ScheduleDAG.h:1.16	Fri Mar 10 00:30:11 2006
+++ llvm/include/llvm/CodeGen/ScheduleDAG.h	Fri Mar 10 01:24:45 2006
@@ -151,7 +151,6 @@
     bool          IsStore : 1;            // Is memory store
     unsigned      Slot;                   // Node's time slot
     NodeGroup     *Group;                 // Grouping information
-    unsigned      VRBase;                 // Virtual register base
 #ifndef NDEBUG
     unsigned      Preorder;               // Index before scheduling
 #endif
@@ -166,7 +165,6 @@
       , IsCall(false)
       , Slot(0)
       , Group(NULL)
-      , VRBase(0)
 #ifndef NDEBUG
       , Preorder(0)
 #endif
@@ -326,14 +324,6 @@
     ///
     NodeInfo *getNI(SDNode *Node) { return Map[Node]; }
   
-    /// getVR - Returns the virtual register number of the node.
-    ///
-    unsigned getVR(SDOperand Op) {
-      NodeInfo *NI = getNI(Op.Val);
-      assert(NI->VRBase != 0 && "Node emitted out of order - late");
-      return NI->VRBase + Op.ResNo;
-    }
-
     /// isPassiveNode - Return true if the node is a non-scheduled leaf.
     ///
     static bool isPassiveNode(SDNode *Node) {
@@ -348,8 +338,10 @@
     }
 
     /// EmitNode - Generate machine code for an node and needed dependencies.
+    /// VRBaseMap contains, for each already emitted node, the first virtual
+    /// register number for the results of the node.
     ///
-    void EmitNode(NodeInfo *NI);
+    void EmitNode(NodeInfo *NI, std::map<SDNode*, unsigned> &VRBaseMap);
     
     /// EmitNoop - Emit a noop instruction.
     ///
@@ -381,7 +373,8 @@
 
   private:
     void AddOperand(MachineInstr *MI, SDOperand Op, unsigned IIOpNum,
-                    const TargetInstrDescriptor *II);
+                    const TargetInstrDescriptor *II,
+                    std::map<SDNode*, unsigned> &VRBaseMap);
 
     void AddToGroup(NodeInfo *D, NodeInfo *U);
 protected:






More information about the llvm-commits mailing list