[llvm-commits] [llvm] r46596 - /llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.cpp
Evan Cheng
evan.cheng at apple.com
Wed Jan 30 19:33:38 PST 2008
Author: evancheng
Date: Wed Jan 30 21:33:38 2008
New Revision: 46596
URL: http://llvm.org/viewvc/llvm-project?rev=46596&view=rev
Log:
Makes the same change in ppc backend: avoid inserting prologue before debug labels.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.cpp
Modified: llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.cpp?rev=46596&r1=46595&r2=46596&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.cpp Wed Jan 30 21:33:38 2008
@@ -712,6 +712,16 @@
// 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) {
More information about the llvm-commits
mailing list