[llvm-branch-commits] [llvm-branch] r105080 - in /llvm/branches/Apple/Hartnell: include/llvm/CodeGen/ScheduleDAG.h lib/CodeGen/PostRASchedulerList.cpp lib/CodeGen/ScheduleDAGInstrs.cpp

Bill Wendling isanbard at gmail.com
Fri May 28 17:33:18 PDT 2010


Author: void
Date: Fri May 28 19:33:18 2010
New Revision: 105080

URL: http://llvm.org/viewvc/llvm-project?rev=105080&view=rev
Log:
Revert r104180. It isn't for this branch.

Modified:
    llvm/branches/Apple/Hartnell/include/llvm/CodeGen/ScheduleDAG.h
    llvm/branches/Apple/Hartnell/lib/CodeGen/PostRASchedulerList.cpp
    llvm/branches/Apple/Hartnell/lib/CodeGen/ScheduleDAGInstrs.cpp

Modified: llvm/branches/Apple/Hartnell/include/llvm/CodeGen/ScheduleDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Hartnell/include/llvm/CodeGen/ScheduleDAG.h?rev=105080&r1=105079&r2=105080&view=diff
==============================================================================
--- llvm/branches/Apple/Hartnell/include/llvm/CodeGen/ScheduleDAG.h (original)
+++ llvm/branches/Apple/Hartnell/include/llvm/CodeGen/ScheduleDAG.h Fri May 28 19:33:18 2010
@@ -225,6 +225,7 @@
   private:
     SDNode *Node;                       // Representative node.
     MachineInstr *Instr;                // Alternatively, a MachineInstr.
+    MachineInstr *DbgInstr;             // A dbg_value referencing this.
   public:
     SUnit *OrigNode;                    // If not this, the node from which
                                         // this node was cloned.
@@ -255,8 +256,6 @@
     bool isScheduled      : 1;          // True once scheduled.
     bool isScheduleHigh   : 1;          // True if preferable to schedule high.
     bool isCloned         : 1;          // True if this node has been cloned.
-
-    SmallVector<MachineInstr*, 4> DbgInstrList; // dbg_values referencing this.
   private:
     bool isDepthCurrent   : 1;          // True if Depth is current.
     bool isHeightCurrent  : 1;          // True if Height is current.
@@ -269,7 +268,7 @@
     /// SUnit - Construct an SUnit for pre-regalloc scheduling to represent
     /// an SDNode and any nodes flagged to it.
     SUnit(SDNode *node, unsigned nodenum)
-      : Node(node), Instr(0), OrigNode(0), NodeNum(nodenum),
+      : Node(node), Instr(0), DbgInstr(0), OrigNode(0), NodeNum(nodenum),
         NodeQueueId(0),  Latency(0), NumPreds(0), NumSuccs(0), NumPredsLeft(0),
         NumSuccsLeft(0), isTwoAddress(false), isCommutable(false),
         hasPhysRegDefs(false), hasPhysRegClobbers(false),
@@ -281,7 +280,7 @@
     /// SUnit - Construct an SUnit for post-regalloc scheduling to represent
     /// a MachineInstr.
     SUnit(MachineInstr *instr, unsigned nodenum)
-      : Node(0), Instr(instr), OrigNode(0), NodeNum(nodenum),
+      : Node(0), Instr(instr), DbgInstr(0), OrigNode(0), NodeNum(nodenum),
         NodeQueueId(0), Latency(0), NumPreds(0), NumSuccs(0), NumPredsLeft(0),
         NumSuccsLeft(0), isTwoAddress(false), isCommutable(false),
         hasPhysRegDefs(false), hasPhysRegClobbers(false),
@@ -292,7 +291,7 @@
 
     /// SUnit - Construct a placeholder SUnit.
     SUnit()
-      : Node(0), Instr(0), OrigNode(0), NodeNum(~0u),
+      : Node(0), Instr(0), DbgInstr(0), OrigNode(0), NodeNum(~0u),
         NodeQueueId(0), Latency(0), NumPreds(0), NumSuccs(0), NumPredsLeft(0),
         NumSuccsLeft(0), isTwoAddress(false), isCommutable(false),
         hasPhysRegDefs(false), hasPhysRegClobbers(false),
@@ -329,6 +328,20 @@
       return Instr;
     }
 
+    /// setDbgInstr - Assign the debug instruction for the SUnit.
+    /// This may be used during post-regalloc scheduling.
+    void setDbgInstr(MachineInstr *MI) {
+      assert(!Node && "Setting debug MachineInstr of SUnit with SDNode!");
+      DbgInstr = MI;
+    }
+
+    /// getDbgInstr - Return the debug MachineInstr for this SUnit.
+    /// This may be used during post-regalloc scheduling.
+    MachineInstr *getDbgInstr() const {
+      assert(!Node && "Reading debug MachineInstr of SUnit with SDNode!");
+      return DbgInstr;
+    }
+
     /// addPred - This adds the specified edge as a pred of the current node if
     /// not already.  It also adds the current node as a successor of the
     /// specified node.

Modified: llvm/branches/Apple/Hartnell/lib/CodeGen/PostRASchedulerList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Hartnell/lib/CodeGen/PostRASchedulerList.cpp?rev=105080&r1=105079&r2=105080&view=diff
==============================================================================
--- llvm/branches/Apple/Hartnell/lib/CodeGen/PostRASchedulerList.cpp (original)
+++ llvm/branches/Apple/Hartnell/lib/CodeGen/PostRASchedulerList.cpp Fri May 28 19:33:18 2010
@@ -83,7 +83,7 @@
 static cl::opt<bool>
 EnablePostRADbgValue("post-RA-dbg-value",
                      cl::desc("Enable processing of dbg_value in post-RA"),
-                     cl::init(true), cl::Hidden);
+                     cl::init(false), cl::Hidden);
 
 
 AntiDepBreaker::~AntiDepBreaker() { }

Modified: llvm/branches/Apple/Hartnell/lib/CodeGen/ScheduleDAGInstrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Hartnell/lib/CodeGen/ScheduleDAGInstrs.cpp?rev=105080&r1=105079&r2=105080&view=diff
==============================================================================
--- llvm/branches/Apple/Hartnell/lib/CodeGen/ScheduleDAGInstrs.cpp (original)
+++ llvm/branches/Apple/Hartnell/lib/CodeGen/ScheduleDAGInstrs.cpp Fri May 28 19:33:18 2010
@@ -210,7 +210,7 @@
       assert(TRI->isPhysicalRegister(Reg) && "Virtual register encountered!");
 
       if (MO.isDef() && DanglingDebugValue[Reg].first!=0) {
-        SU->DbgInstrList.push_back(DanglingDebugValue[Reg].first);
+        SU->setDbgInstr(DanglingDebugValue[Reg].first);
         DbgValueVec[DanglingDebugValue[Reg].second] = 0;
         DanglingDebugValue[Reg] = std::make_pair((MachineInstr*)0, 0);
       }
@@ -599,8 +599,8 @@
     }
 
     BB->insert(InsertPos, SU->getInstr());
-    for (unsigned i = 0, e = SU->DbgInstrList.size() ; i < e ; ++i)
-      BB->insert(InsertPos, SU->DbgInstrList[i]);
+    if (SU->getDbgInstr())
+      BB->insert(InsertPos, SU->getDbgInstr());
   }
 
   // Update the Begin iterator, as the first instruction in the block





More information about the llvm-branch-commits mailing list