summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AVR
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/AVR')
-rw-r--r--llvm/lib/Target/AVR/AVRInstrInfo.cpp8
-rw-r--r--llvm/lib/Target/AVR/AVRRegisterInfo.cpp5
2 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/Target/AVR/AVRInstrInfo.cpp b/llvm/lib/Target/AVR/AVRInstrInfo.cpp
index 20746676c19..88f889260cc 100644
--- a/llvm/lib/Target/AVR/AVRInstrInfo.cpp
+++ b/llvm/lib/Target/AVR/AVRInstrInfo.cpp
@@ -142,9 +142,9 @@ void AVRInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
MFI.getObjectAlignment(FrameIndex));
unsigned Opcode = 0;
- if (TRI->hasType(*RC, MVT::i8)) {
+ if (RC->hasType(MVT::i8)) {
Opcode = AVR::STDPtrQRr;
- } else if (TRI->hasType(*RC, MVT::i16)) {
+ } else if (RC->hasType(MVT::i16)) {
Opcode = AVR::STDWPtrQRr;
} else {
llvm_unreachable("Cannot store this register into a stack slot!");
@@ -176,9 +176,9 @@ void AVRInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
MFI.getObjectAlignment(FrameIndex));
unsigned Opcode = 0;
- if (TRI->hasType(*RC, MVT::i8)) {
+ if (RC->hasType(MVT::i8)) {
Opcode = AVR::LDDRdPtrQ;
- } else if (TRI->hasType(*RC, MVT::i16)) {
+ } else if (RC->hasType(MVT::i16)) {
// Opcode = AVR::LDDWRdPtrQ;
//:FIXME: remove this once PR13375 gets fixed
Opcode = AVR::LDDWRdYQ;
diff --git a/llvm/lib/Target/AVR/AVRRegisterInfo.cpp b/llvm/lib/Target/AVR/AVRRegisterInfo.cpp
index 50d4ff58410..48798bd4a1d 100644
--- a/llvm/lib/Target/AVR/AVRRegisterInfo.cpp
+++ b/llvm/lib/Target/AVR/AVRRegisterInfo.cpp
@@ -78,12 +78,11 @@ BitVector AVRRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
const TargetRegisterClass *
AVRRegisterInfo::getLargestLegalSuperClass(const TargetRegisterClass *RC,
const MachineFunction &MF) const {
- const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo();
- if (TRI->hasType(*RC, MVT::i16)) {
+ if (RC->hasType(MVT::i16)) {
return &AVR::DREGSRegClass;
}
- if (TRI->hasType(*RC, MVT::i8)) {
+ if (RC->hasType(MVT::i8)) {
return &AVR::GPR8RegClass;
}
OpenPOWER on IntegriCloud