summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-02-01 09:10:45 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-02-01 09:10:45 +0000
commitd6e44ab5ec8bc0bb939a9a595d0c653602cf4a3d (patch)
tree9c5579f60abb16e0ef0982d176d3b9613b2562d0 /llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
parent806700f9738a09c8ddee7e466d8429eda9d7ee66 (diff)
downloadbcm5719-llvm-d6e44ab5ec8bc0bb939a9a595d0c653602cf4a3d.tar.gz
bcm5719-llvm-d6e44ab5ec8bc0bb939a9a595d0c653602cf4a3d.zip
Remove the nasty LABEL hack with a much less evil one. Now llvm.dbg.func.start implies a stoppoint is set. SelectionDAGISel records a new source line but does not create a ISD::LABEL node for this special stoppoint. Asm printer will magically print this label. This ensures nothing is emitted before.
llvm-svn: 46635
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp23
1 files changed, 1 insertions, 22 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
index aad1f87ed9e..3ecd623c813 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
@@ -711,28 +711,7 @@ void ScheduleDAG::EmitNode(SDNode *Node, unsigned InstanceNo,
}
}
- // Now that we have emitted all operands, emit this instruction itself.
- if (ISD::isDebugLabel(Node) &&
- !BB->empty() && &MF->front() == BB) {
- // If we are inserting a debug label and this happens to be the first
- // debug label in the entry block, it is the "function start" label.
- // Make sure there are no other instructions before it.
- unsigned NumLabels = 0;
- MachineBasicBlock::iterator MBBI = BB->begin();
- while (MBBI != BB->end()) {
- // FIXME: This is a nasty short term workaround. For now, we are
- // assuming there are two debug labels at the beginning of the
- // entry block: one for dbg_func_start, one for the first
- // dbg_stoppoint before actual code.
- if (!MBBI->isDebugLabel() || ++NumLabels > 1)
- break;
- ++MBBI;
- }
- if (NumLabels <= 1)
- BB->insert(BB->begin(), MI);
- else
- BB->push_back(MI);
- } else if (II.usesCustomDAGSchedInsertionHook())
+ if (II.usesCustomDAGSchedInsertionHook())
// Insert this instruction into the basic block using a target
// specific inserter which may returns a new basic block.
BB = DAG.getTargetLoweringInfo().EmitInstrWithCustomInserter(MI, BB);
OpenPOWER on IntegriCloud