summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AVR/AVRFrameLowering.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-04-24 18:55:33 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-04-24 18:55:33 +0000
commit44e25f37ae2422bbfb0466d7b6d2836034817d32 (patch)
treed0e1d292f74866cb29b10df73d8d6ba11d721228 /llvm/lib/Target/AVR/AVRFrameLowering.cpp
parent49e033f41d45b8fdb09bfc2b195986704039a765 (diff)
downloadbcm5719-llvm-44e25f37ae2422bbfb0466d7b6d2836034817d32.tar.gz
bcm5719-llvm-44e25f37ae2422bbfb0466d7b6d2836034817d32.zip
Move size and alignment information of regclass to TargetRegisterInfo
1. RegisterClass::getSize() is split into two functions: - TargetRegisterInfo::getRegSizeInBits(const TargetRegisterClass &RC) const; - TargetRegisterInfo::getSpillSize(const TargetRegisterClass &RC) const; 2. RegisterClass::getAlignment() is replaced by: - TargetRegisterInfo::getSpillAlignment(const TargetRegisterClass &RC) const; This will allow making those values depend on subtarget features in the future. Differential Revision: https://reviews.llvm.org/D31783 llvm-svn: 301221
Diffstat (limited to 'llvm/lib/Target/AVR/AVRFrameLowering.cpp')
-rw-r--r--llvm/lib/Target/AVR/AVRFrameLowering.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/AVR/AVRFrameLowering.cpp b/llvm/lib/Target/AVR/AVRFrameLowering.cpp
index b8cb2215ddb..ab42a7aa990 100644
--- a/llvm/lib/Target/AVR/AVRFrameLowering.cpp
+++ b/llvm/lib/Target/AVR/AVRFrameLowering.cpp
@@ -239,7 +239,7 @@ bool AVRFrameLowering::spillCalleeSavedRegisters(
unsigned Reg = CSI[i - 1].getReg();
bool IsNotLiveIn = !MBB.isLiveIn(Reg);
- assert(TRI->getMinimalPhysRegClass(Reg)->getSize() == 1 &&
+ assert(TRI->getRegSizeInBits(*TRI->getMinimalPhysRegClass(Reg)) == 8 &&
"Invalid register size");
// Add the callee-saved register as live-in only if it is not already a
@@ -277,7 +277,7 @@ bool AVRFrameLowering::restoreCalleeSavedRegisters(
for (const CalleeSavedInfo &CCSI : CSI) {
unsigned Reg = CCSI.getReg();
- assert(TRI->getMinimalPhysRegClass(Reg)->getSize() == 1 &&
+ assert(TRI->getRegSizeInBits(*TRI->getMinimalPhysRegClass(Reg)) == 8 &&
"Invalid register size");
BuildMI(MBB, MI, DL, TII.get(AVR::POPRd), Reg);
OpenPOWER on IntegriCloud