summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/Mips16FrameLowering.cpp
diff options
context:
space:
mode:
authorOleg Ranevskyy <oranevskyy@accesssoftek.com>2015-11-05 17:50:17 +0000
committerOleg Ranevskyy <oranevskyy@accesssoftek.com>2015-11-05 17:50:17 +0000
commit057c5a6b2b082b62c8f33a8d6d6e942b8165757a (patch)
tree35fe0e16293ab2eca1c690571369fea7db07aa83 /llvm/lib/Target/Mips/Mips16FrameLowering.cpp
parent99fba3c1416447737bdc76c751ed8775d4abb106 (diff)
downloadbcm5719-llvm-057c5a6b2b082b62c8f33a8d6d6e942b8165757a.tar.gz
bcm5719-llvm-057c5a6b2b082b62c8f33a8d6d6e942b8165757a.zip
[DebugInfo] Fix ARM/AArch64 prologue_end position. Related to D11268.
Summary: This review is related to another review request http://reviews.llvm.org/D11268, does the same and merely fixes a couple of issues with it. D11268 is quite old and has merge conflicts against the current trunk. This request - rebases D11268 onto the new trunk; - resolves the merge conflicts; - fixes the prologue_end tests, which do not pass due to the subprogram definitions not marked as distinct. Reviewers: echristo, rengolin, kubabrecka Subscribers: aemerson, rengolin, jyknight, dsanders, llvm-commits, asl Differential Revision: http://reviews.llvm.org/D14338 llvm-svn: 252177
Diffstat (limited to 'llvm/lib/Target/Mips/Mips16FrameLowering.cpp')
-rw-r--r--llvm/lib/Target/Mips/Mips16FrameLowering.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/llvm/lib/Target/Mips/Mips16FrameLowering.cpp b/llvm/lib/Target/Mips/Mips16FrameLowering.cpp
index 71c2bdba2f9..7994c61fcdd 100644
--- a/llvm/lib/Target/Mips/Mips16FrameLowering.cpp
+++ b/llvm/lib/Target/Mips/Mips16FrameLowering.cpp
@@ -36,13 +36,17 @@ void Mips16FrameLowering::emitPrologue(MachineFunction &MF,
MachineBasicBlock &MBB) const {
assert(&MF.front() == &MBB && "Shrink-wrapping not yet supported");
MachineFrameInfo *MFI = MF.getFrameInfo();
- const Mips16InstrInfo &TII =
- *static_cast<const Mips16InstrInfo *>(STI.getInstrInfo());
- MachineBasicBlock::iterator MBBI = MBB.begin();
- DebugLoc dl = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
- uint64_t StackSize = MFI->getStackSize();
-
- // No need to allocate space on the stack.
+ const Mips16InstrInfo &TII =
+ *static_cast<const Mips16InstrInfo *>(STI.getInstrInfo());
+ MachineBasicBlock::iterator MBBI = MBB.begin();
+
+ // Debug location must be unknown since the first debug location is used
+ // to determine the end of the prologue.
+ DebugLoc dl;
+
+ uint64_t StackSize = MFI->getStackSize();
+
+ // No need to allocate space on the stack.
if (StackSize == 0 && !MFI->adjustsStack()) return;
MachineModuleInfo &MMI = MF.getMMI();
OpenPOWER on IntegriCloud