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 | 0c2a4f39ad5cdb32a2c4e20f787798d8af645393 (patch) | |
tree | bc7819e296dc7afa567f6fc31691d31f16381d48 /lib/CodeGen/PrologEpilogInserter.cpp | |
parent | 99aa33745d9f0a255da9e56315993e68997e1e21 (diff) | |
download | external_llvm-0c2a4f39ad5cdb32a2c4e20f787798d8af645393.zip external_llvm-0c2a4f39ad5cdb32a2c4e20f787798d8af645393.tar.gz external_llvm-0c2a4f39ad5cdb32a2c4e20f787798d8af645393.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); } } |