summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86RegisterInfo.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-01-30 20:08:35 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-01-30 20:08:35 +0000
commit965d1b4bba6107b451edee403c6666acb86f39e3 (patch)
tree00af25d1449afc00d0c1858e7bcf9510b301bfa7 /lib/Target/X86/X86RegisterInfo.cpp
parent43b8f3b7d375187f843181ad3331ea9f06b473f5 (diff)
downloadllvm-965d1b4bba6107b451edee403c6666acb86f39e3.tar.gz
llvm-965d1b4bba6107b451edee403c6666acb86f39e3.tar.bz2
llvm-965d1b4bba6107b451edee403c6666acb86f39e3.tar.xz
Treat the label for the first @llvm.dbg.stoppoint the same way as the dbg_func_start label. Make sure nothing else is inserted before them.
Note this solution might be somewhat fragile since ISD::LABEL may be used for other purposes. If that ends up to be an issue, we may need to introduce a different node for debug labels. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46571 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86RegisterInfo.cpp')
-rw-r--r--lib/Target/X86/X86RegisterInfo.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp
index bca197311f..2f8ee1dadd 100644
--- a/lib/Target/X86/X86RegisterInfo.cpp
+++ b/lib/Target/X86/X86RegisterInfo.cpp
@@ -525,11 +525,15 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
X86FI->getCalleeSavedFrameSize() +(-TailCallReturnAddrDelta));
uint64_t NumBytes = StackSize - X86FI->getCalleeSavedFrameSize();
- // Skip over the label which mark the beginning of the function.
- if (MMI && MMI->needsFrameInfo() &&
- MBBI != MBB.end() &&
- MBBI->getOpcode() == X86::LABEL)
+ // 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() == X86::LABEL) {
+ ++NumLabels;
++MBBI;
+ }
+ }
// Insert stack pointer adjustment for later moving of return addr. Only
// applies to tail call optimized functions where the callee argument stack