diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-16 21:02:15 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-16 21:02:15 +0000 |
commit | b08d2c2db056d93954c20c24605639d5fc3e5889 (patch) | |
tree | e10c6a2d703cbcf96d274cf9f4be4caf1fc7527f /llvm/lib/CodeGen/MachineModuleInfo.cpp | |
parent | da5d10000599b37ac36bc927148688a315e707eb (diff) | |
download | llvm-b08d2c2db056d93954c20c24605639d5fc3e5889.zip llvm-b08d2c2db056d93954c20c24605639d5fc3e5889.tar.gz llvm-b08d2c2db056d93954c20c24605639d5fc3e5889.tar.bz2 |
Remove addFrameMove.
Now that we have good testing, remove addFrameMove and create cfi
instructions directly.
llvm-svn: 182052
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineModuleInfo.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp index 74cf9f5..a916bd6 100644 --- a/llvm/lib/CodeGen/MachineModuleInfo.cpp +++ b/llvm/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; |