aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/PrologEpilogInserter.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-04-23 18:19:47 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-04-23 18:19:47 +0000
commit874384e20f618d6ac932628db64e048757213fcd (patch)
treed6a51f9e98a41b514bc085b825a42ba55f18dee6 /lib/CodeGen/PrologEpilogInserter.cpp
parentd1c133a051dbf6e82d27f051a5992407b09123af (diff)
downloadexternal_llvm-874384e20f618d6ac932628db64e048757213fcd.zip
external_llvm-874384e20f618d6ac932628db64e048757213fcd.tar.gz
external_llvm-874384e20f618d6ac932628db64e048757213fcd.tar.bz2
Cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50160 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r--lib/CodeGen/PrologEpilogInserter.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp
index cb9916c..a59f62e 100644
--- a/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/lib/CodeGen/PrologEpilogInserter.cpp
@@ -68,7 +68,7 @@ namespace {
// Allow the target machine to make final modifications to the function
// before the frame layout is finalized.
- Fn.getTarget().getRegisterInfo()->processFunctionBeforeFrameFinalized(Fn);
+ TRI->processFunctionBeforeFrameFinalized(Fn);
// Calculate actual frame offsets for all of the abstract stack objects...
calculateFrameObjectOffsets(Fn);
@@ -484,14 +484,16 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) {
/// prolog and epilog code to the function.
///
void PEI::insertPrologEpilogCode(MachineFunction &Fn) {
+ const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo();
+
// Add prologue to the function...
- Fn.getTarget().getRegisterInfo()->emitPrologue(Fn);
+ TRI->emitPrologue(Fn);
// Add epilogue to restore the callee-save registers in each exiting block
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() && I->back().getDesc().isReturn())
- Fn.getTarget().getRegisterInfo()->emitEpilogue(Fn, *I);
+ TRI->emitEpilogue(Fn, *I);
}
}