summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-05-16 21:02:15 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-05-16 21:02:15 +0000
commit6b67ffd68bb2e555b1b512a809f3c82c68f3debe (patch)
tree717cc6e707d215b72fe79f427c6b7080c8fb9253 /lib/CodeGen/MachineModuleInfo.cpp
parent529874cf0cc1686a157c31c750fd10adabaa2f1a (diff)
downloadllvm-6b67ffd68bb2e555b1b512a809f3c82c68f3debe.tar.gz
llvm-6b67ffd68bb2e555b1b512a809f3c82c68f3debe.tar.bz2
llvm-6b67ffd68bb2e555b1b512a809f3c82c68f3debe.tar.xz
Remove addFrameMove.
Now that we have good testing, remove addFrameMove and create cfi instructions directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182052 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r--lib/CodeGen/MachineModuleInfo.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp
index 74cf9f50df..a916bd6412 100644
--- a/lib/CodeGen/MachineModuleInfo.cpp
+++ b/lib/CodeGen/MachineModuleInfo.cpp
@@ -268,39 +268,6 @@ MachineModuleInfo::MachineModuleInfo()
MachineModuleInfo::~MachineModuleInfo() {
}
-static MCCFIInstruction convertMoveToCFI(const MCRegisterInfo &MRI,
- MCSymbol *Label,
- const MachineLocation &Dst,
- const MachineLocation &Src) {
- // If advancing cfa.
- if (Dst.isReg() && Dst.getReg() == MachineLocation::VirtualFP) {
- if (Src.getReg() == MachineLocation::VirtualFP)
- return MCCFIInstruction::createDefCfaOffset(Label, Src.getOffset());
- // Reg + Offset
- return MCCFIInstruction::createDefCfa(
- Label, MRI.getDwarfRegNum(Src.getReg(), true), -Src.getOffset());
- }
-
- if (Src.isReg() && Src.getReg() == MachineLocation::VirtualFP) {
- assert(Dst.isReg() && "Machine move not supported yet.");
- return MCCFIInstruction::createDefCfaRegister(
- Label, MRI.getDwarfRegNum(Dst.getReg(), true));
- }
-
- assert(!Dst.isReg() && "Machine move not supported yet.");
- return MCCFIInstruction::createOffset(
- Label, MRI.getDwarfRegNum(Src.getReg(), true), Dst.getOffset());
-}
-
-
-void MachineModuleInfo::addFrameMove(MCSymbol *Label,
- const MachineLocation &Dst,
- const MachineLocation &Src) {
- MCCFIInstruction I =
- convertMoveToCFI(Context.getRegisterInfo(), Label, Dst, Src);
- FrameInstructions.push_back(I);
-}
-
bool MachineModuleInfo::doInitialization(Module &M) {
ObjFileMMI = 0;