aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/XCore/XCoreInstrInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-05 05:48:36 +0000
committerChris Lattner <sabre@nondot.org>2010-04-05 05:48:36 +0000
commit66f20c8e82685a699447144dbd659c4e465eccc8 (patch)
tree966eba4a1994cee5ae0316706c16cbbfd3d0141c /lib/Target/XCore/XCoreInstrInfo.cpp
parent655d82820cf0c86e162ab9b702333c1607734676 (diff)
downloadexternal_llvm-66f20c8e82685a699447144dbd659c4e465eccc8.zip
external_llvm-66f20c8e82685a699447144dbd659c4e465eccc8.tar.gz
external_llvm-66f20c8e82685a699447144dbd659c4e465eccc8.tar.bz2
simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100412 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore/XCoreInstrInfo.cpp')
-rw-r--r--lib/Target/XCore/XCoreInstrInfo.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/Target/XCore/XCoreInstrInfo.cpp b/lib/Target/XCore/XCoreInstrInfo.cpp
index ae3f16c..c983112 100644
--- a/lib/Target/XCore/XCoreInstrInfo.cpp
+++ b/lib/Target/XCore/XCoreInstrInfo.cpp
@@ -14,12 +14,12 @@
#include "XCoreMachineFunctionInfo.h"
#include "XCoreInstrInfo.h"
#include "XCore.h"
-#include "llvm/ADT/STLExtras.h"
+#include "llvm/MC/MCContext.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineLocation.h"
-#include "llvm/CodeGen/MachineModuleInfo.h"
#include "XCoreGenInstrInfo.inc"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
@@ -419,14 +419,11 @@ void XCoreInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
bool XCoreInstrInfo::spillCalleeSavedRegisters(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MI,
- const std::vector<CalleeSavedInfo> &CSI) const
-{
+ const std::vector<CalleeSavedInfo> &CSI) const {
if (CSI.empty()) {
return true;
}
MachineFunction *MF = MBB.getParent();
- const MachineFrameInfo *MFI = MF->getFrameInfo();
- MachineModuleInfo *MMI = MFI->getMachineModuleInfo();
XCoreFunctionInfo *XFI = MF->getInfo<XCoreFunctionInfo>();
bool emitFrameMoves = XCoreRegisterInfo::needsFrameMoves(*MF);
@@ -442,7 +439,7 @@ bool XCoreInstrInfo::spillCalleeSavedRegisters(MachineBasicBlock &MBB,
storeRegToStackSlot(MBB, MI, it->getReg(), true,
it->getFrameIdx(), it->getRegClass());
if (emitFrameMoves) {
- MCSymbol *SaveLabel = MMI->getContext().CreateTempSymbol();
+ MCSymbol *SaveLabel = MF->getContext().CreateTempSymbol();
BuildMI(MBB, MI, DL, get(XCore::DBG_LABEL)).addSym(SaveLabel);
XFI->getSpillLabels().push_back(std::make_pair(SaveLabel, *it));
}