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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46635 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2008-02-01 09:10:45 +00:00
parent a647c92ec2
commit 1b08bbca55
8 changed files with 29 additions and 59 deletions

View File

@ -249,13 +249,6 @@ void PEI::saveCalleeSavedRegisters(MachineFunction &Fn) {
MachineBasicBlock *MBB = Fn.begin();
MachineBasicBlock::iterator I = MBB->begin();
// Do not insert prologue code before debug LABELs at the start of the
// entry block.
MachineModuleInfo *MMI = FFI->getMachineModuleInfo();
if (MMI && MMI->hasDebugInfo())
while (I != MBB->end() && I->isDebugLabel())
++I;
if (!TII.spillCalleeSavedRegisters(*MBB, I, CSI)) {
for (unsigned i = 0, e = CSI.size(); i != e; ++i) {
// Add the callee-saved register as live-in. It's killed at the spill.