diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-07 03:13:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-07 03:13:06 +0000 |
commit | 349c4952009525b27383e2120a6b3c998f39bd09 (patch) | |
tree | bc7819e296dc7afa567f6fc31691d31f16381d48 /lib/CodeGen/PrologEpilogInserter.cpp | |
parent | cc8cd0cbf12c12916d4b38ef0de5be5501c8270e (diff) | |
download | external_llvm-349c4952009525b27383e2120a6b3c998f39bd09.zip external_llvm-349c4952009525b27383e2120a6b3c998f39bd09.tar.gz external_llvm-349c4952009525b27383e2120a6b3c998f39bd09.tar.bz2 |
Move a bunch more accessors from TargetInstrInfo to TargetInstrDescriptor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r-- | lib/CodeGen/PrologEpilogInserter.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp index d7c0a7b..0f2da0b 100644 --- a/lib/CodeGen/PrologEpilogInserter.cpp +++ b/lib/CodeGen/PrologEpilogInserter.cpp @@ -262,7 +262,7 @@ void PEI::saveCalleeSavedRegisters(MachineFunction &Fn) { // Add code to restore the callee-save registers in each exiting block. for (MachineFunction::iterator FI = Fn.begin(), E = Fn.end(); FI != E; ++FI) // If last instruction is a return instruction, add an epilogue. - if (!FI->empty() && TII.isReturn(FI->back().getOpcode())) { + if (!FI->empty() && FI->back().getDesc()->isReturn()) { MBB = FI; I = MBB->end(); --I; @@ -483,10 +483,9 @@ void PEI::insertPrologEpilogCode(MachineFunction &Fn) { Fn.getTarget().getRegisterInfo()->emitPrologue(Fn); // Add epilogue to restore the callee-save registers in each exiting block - const TargetInstrInfo &TII = *Fn.getTarget().getInstrInfo(); for (MachineFunction::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I) { // If last instruction is a return instruction, add an epilogue - if (!I->empty() && TII.isReturn(I->back().getOpcode())) + if (!I->empty() && I->back().getDesc()->isReturn()) Fn.getTarget().getRegisterInfo()->emitEpilogue(Fn, *I); } } |