aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-11-14 00:41:36 +0000
committerDan Gohman <gohman@apple.com>2008-11-14 00:41:36 +0000
commit59d5f1d13babee143957686003db06f605d05ba2 (patch)
tree18afda67d93e5d7432eef21e94354505c6fd66c9
parent8f6c6d4c5f7bb9ab71147c8215c3779a6bec7689 (diff)
Add a version of NewSUnit for creating units with MachineInstrs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59282 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/ScheduleDAG.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/ScheduleDAG.h b/include/llvm/CodeGen/ScheduleDAG.h
index 125f8eaa8c..8445432e8e 100644
--- a/include/llvm/CodeGen/ScheduleDAG.h
+++ b/include/llvm/CodeGen/ScheduleDAG.h
@@ -334,6 +334,14 @@ namespace llvm {
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);