Provide an interface for Targets to specify their stack pointer register

for llvm.stacksave/restore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25275 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-01-13 17:47:52 +00:00
parent 544cbbd479
commit d90ef9ef2b

View File

@ -234,6 +234,13 @@ public:
bool usesUnderscoreSetJmpLongJmp() const {
return UseUnderscoreSetJmpLongJmp;
}
/// getStackPointerRegisterToSaveRestore - If a physical register, this
/// specifies the register that llvm.savestack/llvm.restorestack should save
/// and restore.
unsigned getStackPointerRegisterToSaveRestore() const {
return StackPointerRegisterToSaveRestore;
}
//===--------------------------------------------------------------------===//
// TargetLowering Configuration Methods - These methods should be invoked by
@ -267,6 +274,13 @@ protected:
UseUnderscoreSetJmpLongJmp = Val;
}
/// setStackPointerRegisterToSaveRestore - If set to a physical register, this
/// specifies the register that llvm.savestack/llvm.restorestack should save
/// and restore.
void setStackPointerRegisterToSaveRestore(unsigned R) {
StackPointerRegisterToSaveRestore = R;
}
/// setSetCCIxExpensive - This is a short term hack for targets that codegen
/// setcc as a conditional branch. This encourages the code generator to fold
/// setcc operations into other operations if possible.
@ -443,6 +457,11 @@ private:
/// UseUnderscoreSetJmpLongJmp - This target prefers to use _setjmp and
/// _longjmp to implement llvm.setjmp/llvm.longjmp. Defaults to false.
bool UseUnderscoreSetJmpLongJmp;
/// StackPointerRegisterToSaveRestore - If set to a physical register, this
/// specifies the register that llvm.savestack/llvm.restorestack should save
/// and restore.
unsigned StackPointerRegisterToSaveRestore;
/// RegClassForVT - This indicates the default register class to use for
/// each ValueType the target supports natively.