[llvm-commits] [llvm] r59282 - /llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h

Dan Gohman gohman at apple.com
Thu Nov 13 16:41:43 PST 2008


Author: djg
Date: Thu Nov 13 18:41:36 2008
New Revision: 59282

URL: http://llvm.org/viewvc/llvm-project?rev=59282&view=rev
Log:
Add a version of NewSUnit for creating units with MachineInstrs.

Modified:
    llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h

Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h?rev=59282&r1=59281&r2=59282&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h Thu Nov 13 18:41:36 2008
@@ -334,6 +334,14 @@
       return &SUnits.back();
     }
 
+    /// NewSUnit - Creates a new SUnit and return a ptr to it.
+    ///
+    SUnit *NewSUnit(MachineInstr *MI) {
+      SUnits.push_back(SUnit(MI, (unsigned)SUnits.size()));
+      SUnits.back().OrigNode = &SUnits.back();
+      return &SUnits.back();
+    }
+
     /// Clone - Creates a clone of the specified SUnit. It does not copy the
     /// predecessors / successors info nor the temporary scheduling states.
     SUnit *Clone(SUnit *N);





More information about the llvm-commits mailing list