diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2008-01-31 03:33:38 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2008-01-31 03:33:38 +0000 |
| commit | 3c0486fb38aabf2c680e587ed77ca1e7be0bb6ae (patch) | |
| tree | 2f421743151181d787198ca98c5f6bfe7661a763 /llvm/lib | |
| parent | a0be8264b5d2a79107726984d3ce569bca93829e (diff) | |
| download | bcm5719-llvm-3c0486fb38aabf2c680e587ed77ca1e7be0bb6ae.tar.gz bcm5719-llvm-3c0486fb38aabf2c680e587ed77ca1e7be0bb6ae.zip | |
Makes the same change in ppc backend: avoid inserting prologue before debug labels.
llvm-svn: 46596
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp b/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp index b9273af1a48..ff8b359470a 100644 --- a/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp @@ -712,6 +712,16 @@ void PPCRegisterInfo::emitPrologue(MachineFunction &MF) const { // Prepare for frame info. unsigned FrameLabelId = 0; + // Skip over the labels which mark the beginning of the function. + if (MMI && MMI->needsFrameInfo()) { + unsigned NumLabels = 0; + while (NumLabels <= 1 && + MBBI != MBB.end() && MBBI->getOpcode() == PPC::LABEL) { + ++NumLabels; + ++MBBI; + } + } + // Scan the prolog, looking for an UPDATE_VRSAVE instruction. If we find it, // process it. for (unsigned i = 0; MBBI != MBB.end(); ++i, ++MBBI) { |

