diff options
author | Hal Finkel <hfinkel@anl.gov> | 2013-03-22 23:32:27 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2013-03-22 23:32:27 +0000 |
commit | dc3beb90178fc316f63790812b22201884eaa017 (patch) | |
tree | d3574ac59a9d120549452dd0f94db575bb04096e /lib/Target/XCore/XCoreFrameLowering.cpp | |
parent | a2e3834d1644889484ef3a8a94189b7369e3eaf9 (diff) | |
download | external_llvm-dc3beb90178fc316f63790812b22201884eaa017.zip external_llvm-dc3beb90178fc316f63790812b22201884eaa017.tar.gz external_llvm-dc3beb90178fc316f63790812b22201884eaa017.tar.bz2 |
Allow the register scavenger to spill multiple registers
This patch lets the register scavenger make use of multiple spill slots in
order to guarantee that it will be able to provide multiple registers
simultaneously.
To support this, the RS's API has changed slightly: setScavengingFrameIndex /
getScavengingFrameIndex have been replaced by addScavengingFrameIndex /
isScavengingFrameIndex / getScavengingFrameIndices.
In forthcoming commits, the PowerPC backend will use this capability in order
to implement the spilling of condition registers, and some special-purpose
registers, without relying on r0 being reserved. In some cases, spilling these
registers requires two GPRs: one for addressing and one to hold the value being
transferred.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177774 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore/XCoreFrameLowering.cpp')
-rw-r--r-- | lib/Target/XCore/XCoreFrameLowering.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/XCore/XCoreFrameLowering.cpp b/lib/Target/XCore/XCoreFrameLowering.cpp index 019c457..6b6480e 100644 --- a/lib/Target/XCore/XCoreFrameLowering.cpp +++ b/lib/Target/XCore/XCoreFrameLowering.cpp @@ -409,7 +409,7 @@ XCoreFrameLowering::processFunctionBeforeCalleeSavedScan(MachineFunction &MF, } if (RegInfo->requiresRegisterScavenging(MF)) { // Reserve a slot close to SP or frame pointer. - RS->setScavengingFrameIndex(MFI->CreateStackObject(RC->getSize(), + RS->addScavengingFrameIndex(MFI->CreateStackObject(RC->getSize(), RC->getAlignment(), false)); } |