aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-01-31 03:33:38 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-01-31 03:33:38 +0000
commit0a75538a68cda3bddbda3980ea0128d9f6e6339d (patch)
tree4c30d72f369330d947afaf5fdcdc0f7735815d87
parentfa9b80eb64127b3d9691e18537975635520e51e9 (diff)
Makes the same change in ppc backend: avoid inserting prologue before debug labels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46596 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/PowerPC/PPCRegisterInfo.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCRegisterInfo.cpp b/lib/Target/PowerPC/PPCRegisterInfo.cpp
index b9273af1a4..ff8b359470 100644
--- a/lib/Target/PowerPC/PPCRegisterInfo.cpp
+++ b/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) {