summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCMachineFunctionInfo.h
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-03-17 04:43:44 +0000
committerHal Finkel <hfinkel@anl.gov>2013-03-17 04:43:44 +0000
commit324972904353594ad4a0cdfc79370f85e9fb9c8f (patch)
treee76ca878fe364f224939e7052ad31cedab49390f /lib/Target/PowerPC/PPCMachineFunctionInfo.h
parentea9b914d2f8991039eddb5f21e82ee65a3a752be (diff)
downloadllvm-324972904353594ad4a0cdfc79370f85e9fb9c8f.tar.gz
llvm-324972904353594ad4a0cdfc79370f85e9fb9c8f.tar.bz2
llvm-324972904353594ad4a0cdfc79370f85e9fb9c8f.tar.xz
Improve PPC VR (Altivec) register spilling
This change cleans up two issues with Altivec register spilling: 1. The spilling code was inefficient (using two instructions, and add and a load, when just one would do) 2. The code assumed that r0 would always be available (true for now, but this will change) The new code handles VR spilling just like GPR spills but forced into r+r mode. As a result, when any VR spills are present, we must now always allocate the register-scavenger spill slot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177231 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCMachineFunctionInfo.h')
-rw-r--r--lib/Target/PowerPC/PPCMachineFunctionInfo.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCMachineFunctionInfo.h b/lib/Target/PowerPC/PPCMachineFunctionInfo.h
index 10b2160b3d..b1636a20b8 100644
--- a/lib/Target/PowerPC/PPCMachineFunctionInfo.h
+++ b/lib/Target/PowerPC/PPCMachineFunctionInfo.h
@@ -40,6 +40,10 @@ class PPCFunctionInfo : public MachineFunctionInfo {
/// Does this function have any stack spills.
bool HasSpills;
+ /// Does this function spill using instructions with only r+r (not r+i)
+ /// forms.
+ bool HasNonRISpills;
+
/// SpillsCR - Indicates whether CR is spilled in the current function.
bool SpillsCR;
@@ -82,6 +86,7 @@ public:
: FramePointerSaveIndex(0),
ReturnAddrSaveIndex(0),
HasSpills(false),
+ HasNonRISpills(false),
SpillsCR(false),
LRStoreRequired(false),
MinReservedArea(0),
@@ -116,6 +121,9 @@ public:
void setHasSpills() { HasSpills = true; }
bool hasSpills() const { return HasSpills; }
+ void setHasNonRISpills() { HasNonRISpills = true; }
+ bool hasNonRISpills() const { return HasNonRISpills; }
+
void setSpillsCR() { SpillsCR = true; }
bool isCRSpilled() const { return SpillsCR; }