summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-11-14 00:06:09 +0000
committerDan Gohman <gohman@apple.com>2008-11-14 00:06:09 +0000
commitee8273e52f292bdf098a77819b82bb552b16faed (patch)
treeeab1212f24ce65f230b3c498519b77583842f3d9 /llvm/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp
parenta2cbbaa41f996f0a687b1436e42220fcd749cb89 (diff)
downloadbcm5719-llvm-ee8273e52f292bdf098a77819b82bb552b16faed.tar.gz
bcm5719-llvm-ee8273e52f292bdf098a77819b82bb552b16faed.zip
Initial support for carrying MachineInstrs in SUnits.
llvm-svn: 59278
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp
index 2c40d97a7ea..d60dd493576 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp
@@ -684,6 +684,16 @@ MachineBasicBlock *ScheduleDAG::EmitSchedule() {
EmitNoop();
continue;
}
+
+ // For post-regalloc scheduling, we already have the instruction;
+ // just append it to the block.
+ if (!DAG) {
+ BB->push_back(SU->getInstr());
+ continue;
+ }
+
+ // For pre-regalloc scheduling, create instructions corresponding to the
+ // SDNode and any flagged SDNodes and append them to the block.
SmallVector<SDNode *, 4> FlaggedNodes;
for (SDNode *N = SU->getNode()->getFlaggedNode(); N; N = N->getFlaggedNode())
FlaggedNodes.push_back(N);
OpenPOWER on IntegriCloud