Targets sometimes assign fixed stack object to spill certain callee-saved
authorEvan Cheng <evan.cheng@apple.com>
Thu, 9 Jul 2009 06:53:48 +0000 (06:53 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 9 Jul 2009 06:53:48 +0000 (06:53 +0000)
commit910139f9ca53fc20a680d51ae61bb1e072095141
treee81c343258b9cd4068b9008f1820962721174b85
parent1945b7b5c5da39b89c2a2d3083d02e2aabf3cf98
Targets sometimes assign fixed stack object to spill certain callee-saved
registers based on dynamic conditions. For example, X86 EBP/RBP, when used as
frame register has to be spilled in the first fixed object. It should inform
PEI this so it doesn't get allocated another stack object. Also, it should not
be spilled as other callee-saved registers but rather its spilling and restoring
are being handled by emitPrologue and emitEpilogue. Avoid spilling it twice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75116 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetRegisterInfo.h
lib/CodeGen/PrologEpilogInserter.cpp
lib/Target/X86/X86InstrInfo.cpp
lib/Target/X86/X86RegisterInfo.cpp
lib/Target/X86/X86RegisterInfo.h
test/CodeGen/X86/2004-02-13-FrameReturnAddress.ll
test/CodeGen/X86/2008-08-31-EH_RETURN32.ll
test/CodeGen/X86/2008-08-31-EH_RETURN64.ll