Improve PPC VR (Altivec) register spilling
authorHal Finkel <hfinkel@anl.gov>
Sun, 17 Mar 2013 04:43:44 +0000 (04:43 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sun, 17 Mar 2013 04:43:44 +0000 (04:43 +0000)
commit324972904353594ad4a0cdfc79370f85e9fb9c8f
treee76ca878fe364f224939e7052ad31cedab49390f
parentea9b914d2f8991039eddb5f21e82ee65a3a752be
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
lib/Target/PowerPC/PPCFrameLowering.cpp
lib/Target/PowerPC/PPCInstrInfo.cpp
lib/Target/PowerPC/PPCInstrInfo.h
lib/Target/PowerPC/PPCMachineFunctionInfo.h
lib/Target/PowerPC/PPCRegisterInfo.cpp
test/CodeGen/PowerPC/vrspill.ll