aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-07 03:13:06 +0000
committerChris Lattner <sabre@nondot.org>2008-01-07 03:13:06 +0000
commit349c4952009525b27383e2120a6b3c998f39bd09 (patch)
treebc7819e296dc7afa567f6fc31691d31f16381d48 /lib/Target/PowerPC
parentcc8cd0cbf12c12916d4b38ef0de5be5501c8270e (diff)
downloadexternal_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/Target/PowerPC')
-rw-r--r--lib/Target/PowerPC/PPCISelDAGToDAG.cpp2
-rw-r--r--lib/Target/PowerPC/PPCRegisterInfo.cpp3
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
index 87c698b..7ab17bc 100644
--- a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -262,7 +262,7 @@ void PPCDAGToDAGISel::InsertVRSaveCode(Function &F) {
// Find all return blocks, outputting a restore in each epilog.
for (MachineFunction::iterator BB = Fn.begin(), E = Fn.end(); BB != E; ++BB) {
- if (!BB->empty() && TII.isReturn(BB->back().getOpcode())) {
+ if (!BB->empty() && BB->back().getDesc()->isReturn()) {
IP = BB->end(); --IP;
// Skip over all terminator instructions, which are part of the return
diff --git a/lib/Target/PowerPC/PPCRegisterInfo.cpp b/lib/Target/PowerPC/PPCRegisterInfo.cpp
index 7609e09..866c2bf 100644
--- a/lib/Target/PowerPC/PPCRegisterInfo.cpp
+++ b/lib/Target/PowerPC/PPCRegisterInfo.cpp
@@ -538,10 +538,9 @@ static void RemoveVRSaveCode(MachineInstr *MI) {
bool RemovedAllMTVRSAVEs = true;
// See if we can find and remove the MTVRSAVE instruction from all of the
// epilog blocks.
- const TargetInstrInfo &TII = *MF->getTarget().getInstrInfo();
for (MachineFunction::iterator I = MF->begin(), E = MF->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()) {
bool FoundIt = false;
for (MBBI = I->end(); MBBI != I->begin(); ) {
--MBBI;