From f449bf36ef5cb8e23fa2b5bc43f8d54d2b48fa4e Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 14 Nov 2008 00:06:09 +0000 Subject: Initial support for carrying MachineInstrs in SUnits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59278 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp') diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp index 2c40d97a7e..d60dd49357 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp +++ b/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 FlaggedNodes; for (SDNode *N = SU->getNode()->getFlaggedNode(); N; N = N->getFlaggedNode()) FlaggedNodes.push_back(N); -- cgit v1.2.3