Also avoid adding callee save code before debug labels.
llvm-svn: 46586
This commit is contained in:
parent
3646fdda67
commit
4863fcc3eb
|
@ -248,6 +248,14 @@ void PEI::saveCalleeSavedRegisters(MachineFunction &Fn) {
|
|||
// code into the entry block.
|
||||
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->getOpcode() == TargetInstrInfo::LABEL)
|
||||
++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.
|
||||
|
|
Loading…
Reference in New Issue